Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
1  
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

2 Answers 2

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

Your Answer

 
discard

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.