Hello @Rajkumar V Iyer Thanks for reaching Microsft QnA platform
if you have trouble connecting to your CentOS guest operating system running on Hyper-V inside your Azure VM with Windows 11. Here are some steps you can try to troubleshoot the connectivity issues:
Check Network Configuration: Ensure that your Hyper-V internal switch is correctly configured. If using an external switch, confirm that your physical network supports it, and it is connected correctly.
Make sure that the CentOS VM has a valid IP address. You can check this by logging into the CentOS VM console and running the command:
ip addr
If you're using DHCP to assign an IP, try setting a static IP to see if that resolves the issue.
Firewall Settings:
Confirm that there are no firewall rules in place on the CentOS VM that might be blocking inbound connections. You can check the firewall status with:
sudo firewall-cmd --state
If the firewall is active, ensure that it’s configured to allow connections to the services you are trying to access (like SSH).
Virtual Network Settings: Ensure that the network settings on the CentOS VM are correctly configured. Confirm that the network card is connected to the correct virtual switch.
If you're expecting to connect to this VM from an external network, you'll need to set up port forwarding or ensure that the related NSG rules on the Azure side allow for external traffic.
Check Hyper-V Settings: Make sure the virtual machine is running without issues. Sometimes a simple restart of the VM can also help.
If using Generation 2 VM, remember to check if Secure Boot is causing issues, especially with certain Linux distributions.
Logs and Diagnostics: Review the logs of both the Azure VM and the CentOS guest VM for any error messages that might provide clues on what is happening. You can access the logs in the Azure portal or via SSH if you get that working.
Reference Links: