1

When I started my VirtualBox instances I planned ahead and used vhd drive files. Creating a new instance in Hyper-v using the drive has been painless and my main instance is booting up but has no network connection. I tried adding a legacy network adapter but that isn't working either, however it does show as being detected. The Ubuntu installer sees the device just fine at setup so there has to be a way to get it installed or something. I'm not a Linux guru and am having a hard time finding an answer online or from my Linux friends.

Ubuntu Server 18.04

Please help.

  • So are you using Hyper-V or VirtualBox, they are incompatible with one another, and if you are using Hyper-V what is your host os? – Ramhound Aug 2 '18 at 23:45
1

Ubuntu 18.04 uses /etc/netplan/50-cloud-init.yaml for network configuration instead of /etc/network/interfaces

If Ubuntu is installed into VirtualBox, the interface listed in 50-cloud-init.yaml is a weird name like enp0s3. Hyper-V uses a standard eth0 or something. I don't really know the technicalities of it, but when I changed it to say eth0, it started working after a reboot.

The file looks like this:

network:
    ethernets:
        eth0:
            addresses: []
            dhcp4: true
            optional: true
    version: 2

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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