I recently set up KVM hypervisor on my Ubuntu 18 LTS ThinkPad Carbon. I installed qemu, virt-manager, and libvirt to manage the VMs.

sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager

I have also added my user to the appropriate groups.

sudo adduser [username] libvirt
sudo adduser [username] libvirt-qemu

...and enabled virtualization in the BIOS.

However, none of the VMs I boot up have an internet connection. I assume that is because KVM is designed to be hosted on a server on a wired network, and I am trying to launch the VMs locally with only a WiFi connection.

How can I enable VMs on my laptop to have an internet connection? Do I need to install a certain driver, set up a subnetwork on Virtualization Manager, or set up a 'bridge' between the host and guest machines?

  • Your Assumption is wrong, the hypervisor doesn't care how it's connected upstream. You can set up a NATed Network in Virt-Manager using the GUI. You can also bridge with WIFI, if your Wifi-card (and AP) can do "4addr mode" (WDS). This is what i usually do for VMs on my notebook. Google, or ask more specific questions. – Alex Stragies Jan 21 at 18:05
  • I updated this question in askubuntu.com/questions/1111768/… – Justin Brunkow Jan 22 at 15:33
  • @JustinBrunkow Please don't double post the same question. BTW Your AskUbuntu question got an upvote while this got a downvote. This question isn't really a question, the other was. – FreeSoftwareServers May 22 at 3:08

I modified the default yaml file in /etc/netplan as follows:

  version: 2
  renderer: NetworkManager
      dhcp4: no
      dhcp4: yes
        - enp0s25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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