[SOLVED] Networking broken after exporting VM disk

Sep 17, 2018
9
2
8
Hello All,

I have a need to export one of my VMs to be used in either VMWare or VirtualBox. I use qemu-img to convert the disk to a .vmdk, and everything works fine when I boot it in Workstation or Vbox, except networking. An interface shows up, but it won't take DHCP nor will static settings work if defined in /etc/networking/interfaces. NAT or bridged mode on the VM settings makes no difference.

The VM is of Ubuntu server 18.04 LTS, if that matters at all. Here's the command I use to convert it (while powered down):

qemu-img convert /dev/zvol/zfs_pool/vm-204-disk-0 -O vmdk vm204_disk.vmdk
 
Last edited:
Hi,

do you see the interfaces in the VM?

Code:
lspci 
ip a
 
Hi,

do you see the interfaces in the VM?

Code:
lspci
ip a

Yep (sorry for screencaps, can't copy/paste text from console....)
lspci:
W5l9JfH.png

ip a (skipping lo):
wq2HLS5.png
 
Figured this out. Ubuntu now uses netplan instead of ifupdown (and /etc/network/interfaces) to manage interfaces, and because VMware wasn't using the same PCI address for the interface as KVM was, the new interface had no settings.

created a match group in netplan for en* that leaves dhcp on so wherever it goes the interface should come up.