[SOLVED] No eth0 in Ubuntu VM


Recommended Posts

Hello, I am attempting to run  this VM in KVM. I can get the machine to boot up, however I cannot get it attached to my network via dhcp or statically.  When i do an "ifconfig -a" the only interface that shows up is "lo", and if I try to manually enable an interface, it gives me the following error: ERROR while getting interface flags: No such device.  Any help would be appreciated.

xml.txt

Edited by Biloxi_1
issue resolved
Link to comment

You have the VM set to use vfio for the network, so the problem probably is that the VM does not have vfio drivers installed.   You would need to either get the vfio drivers installed into the VM, or alternatively set the VM to emulate some other type of network card for which the VM does have drives.

Link to comment

Thank you for your response. I am unsure how to do either of those things. I attempted to set the vm to emulate another type of network card, but it keeps giving me an error when I try to start it. I don't think I have the correct syntax. I have attached a screenie of an lspci command. Is that where I should be looking for supported nics?

lspci.jpg

Link to comment

I had what appears to be a similar issue but with CentOS.

Basically your vm is not automatically seeing the nic and you have to manually pass it through by editing the xml for the vm.

Take a look at this post here:

 

 

Or just check out his video here: 

 

 

It is surprisingly easy once you get to know it.

Hope this helps!

 

 

  • Like 1
Link to comment
15 minutes ago, Biloxi_1 said:

This is super helpful! Thank you so much! Unfortunately my NIC is not in it's own IOMMU group, and I don't want to blacklist it, because it is the NIC for the whole machine. I'm gonna see if I can borrow an additional NIC and get this working.

You could probably solve this in two ways without passing through the NIC:

  • Install the 'vfio' network drivers inside the Ubuntu VM.  They should be on the vfio CD image that you probably already have attached to the VM.
  • Change the 'model' of the network card in the VM XML to something for which VM Ubuntu already has drivers.   Something like 'e1000' is likely to work.   To make this change to the VM settings you have to make the edit in XML mode.

I have used both approaches on different VMs when using 'br0' as the network connection without passing through a network card (my hardware does not support pass-through).

  • Like 2
Link to comment
10 minutes ago, itimpi said:

You could probably solve this in two ways without passing through the NIC:

  • Install the 'vfio' network drivers inside the Ubuntu VM.  They should be on the vfio CD image that you probably already have attached to the VM.
  • Change the 'model' of the network card in the VM XML to something for which VM Ubuntu already has drivers.   Something like 'e1000' is likely to work.   To make this change to the VM settings you have to make the edit in XML mode.

I have used both approaches on different VMs when using 'br0' as the network connection without passing through a network card (my hardware does not support pass-through).

Changing the model to e1000 did the trick. Thank you for your assistance!

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.