Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
What does lsmod on the working Ubuntu VM show for a network card driver? Is that module loaded on the CentOS VM? What does ifconfig eth0 up accomplish? – Caleb Jul 26 '11 at 20:21
The two OSs have a vast number of modules that aren't shared between them (ie, way over 20). ifconfig eth0 indicates "eth0: error fetching interface information: Device not found" – Incognito Jul 26 '11 at 20:36
Not to be condescending or too pedantic, but are you running ifconfig -a? Another, more compact way to see the network interfaces on a system is with ip a l (assumes iproute2, installed by default in CentOS I believe). – Eli Heady Aug 3 '11 at 3:45
ifconfig -a revealed that I have eth2 – user15902 Feb 24 '12 at 13:19

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.

share|improve this answer
I'm not sure if this solved it for me or if the case was that my VM only had eth0 set to manual mode, and I had to enable dhcp and onboot – jcolebrand Mar 20 '12 at 16:49

You can also check /var/log/messages on the VM and grep for eth0. In my situation the kernel switched from using eth0 to eth5 during boot (on legacy network adapter).

share|improve this answer
Should be a comment, I think, as it doesn't provide an answer. – vgoff Nov 12 '12 at 18:06

Had the same problem, reinstalled the driver. Here is what I did:

  1. Install CentOS 6.3
  2. Download "Linux Integration Disk 3.4" for HyperV from microsoft
  3. Mount the ISO Image file. mount /dev/cdrom/media
  4. Run INSTALL.sh under Linux Integration Services CD's RHEL63 Folder. /media/RHEL63/install.sh
  5. Create IFCFG-ETH0 file. nano /etc/sysconfig/network-scripts/ifcfg-eth0
  6. Insert following lines DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes
  7. SAVE and QUIT
  8. Edit or Create Network File nano /etc/sysconfig/network
  9. Insert following lines NETWORKING=yes HOSTNAME=server-name.company.lan
  10. Restart and now you can ping out
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.