I've launched a CentOS install in HyperV and assigned a NIC the same way I've done on an Ubuntu VM, however, the device simply isn't picked up.
Only my loopback is found by ifconfig
.
How should I go about trouble shooting this?
I've launched a CentOS install in HyperV and assigned a NIC the same way I've done on an Ubuntu VM, however, the device simply isn't picked up.
Only my loopback is found by ifconfig
.
How should I go about trouble shooting this?
UPDATE: This has been updated to reflect the changes they made with the LIS v4 that no longer requires running the version-specific installer. Also, if all you need is for Hyper-V to report the info in the "Network" tab, only steps 1-4 are necessary)
I had the same problem; reinstalled the driver. Here is what I did:
sudo mount /dev/cdrom /media
install.sh
under the Linux Integration Services CD's LISISO Folder (Where xx is the latest version, or the specific version you need).sudo /LISISO/install.sh
ifcfg-eth0
file.nano /etc/sysconfig/network-scripts/ifcfg-eth0
Insert the following lines:
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
Save and quit
network
filenano /etc/sysconfig/network
Insert the following lines:
NETWORKING=yes
HOSTNAME=server-name.company.lan
Save and quit
It sounds like drivers for HyperV virtualized NICs are missing from the CentOS kernel version you are using and are present in the Ubuntu version you successfully installed. Microsoft has only recently gotten its virtual device drivers into the mainline kernel. My guess is that you are using a version of CentOS that does not include these drivers.
As far as how to troubleshoot it, you can look for kernel messages related to network hardware. Check the output of dmesg | less
and less /var/log/messages
. I would look for entries containing "net", "eth". Any kernel logging is going to be from module loading - success or error. If there are no kernel modules for the virtualized NIC, the kernel probably won't have anything to say about the unrecognized hardware.
When creating the VM, you can choose to add a "Legacy Network Adapter" in HyperV (at least the option used to be called that). This will present the NIC to the guest OS as essentially an older device, for which the guest will hopefully have drivers.
Once you have installed CentOS, you can install drivers from Microsoft to utilize the more efficient virtual devices.
In my case, I added a new VM to Windows 10 Hyper-V by importing a VHD of CentOS7 Linux. Installation was fine, but networking in CentOS wasn't working at all. To solve the issue, in Hyper-V, I selected the new VM and edited the settings. Under Network Adapter, the Virtual Switch was set to "Not Connected" by default. Changing this to "Default Switch" and saving fixed the issue. This solved errors such as no suitable device found for this connection and unable to find eth0.
lsmod
on the working Ubuntu VM show for a network card driver? Is that module loaded on the CentOS VM? What doesifconfig eth0 up
accomplish? – Caleb Jul 26 '11 at 20:21ifconfig -a
? Another, more compact way to see the network interfaces on a system is withip a l
(assumes iproute2, installed by default in CentOS I believe). – Eli Heady Aug 03 '11 at 03:45ifconfig -a
revealed that I have eth2 – Feb 24 '12 at 13:19