kvm:setup_kvm_with_bridged_networking_and_virt-manager
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
kvm:setup_kvm_with_bridged_networking_and_virt-manager [2018/06/18 10:18] – peter | kvm:setup_kvm_with_bridged_networking_and_virt-manager [2019/11/30 13:19] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== KVM - Setup KVM with bridged networking and virt-manager ====== | ||
- | |||
- | KVM is the Linux kernel' | ||
- | |||
- | |||
- | ====== Install The Packages ====== | ||
- | |||
- | Even though the capabilities for KVM are built into the kernel itself, there are a couple of packages that you'll need to get started. | ||
- | |||
- | <code bash> | ||
- | sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager | ||
- | </ | ||
- | |||
- | |||
- | |||
- | ===== Configure The Network Bridge ===== | ||
- | |||
- | Before you can dive in and start making virtual machines, you're going to need to set up a network bridge. | ||
- | |||
- | Find out what names your network interfaces have been assigned. | ||
- | |||
- | <code bash> | ||
- | ip a | ||
- | </ | ||
- | |||
- | Once you have your network interface, you need to edit a configuration file to tell Ubuntu that your connection is going to be bridged. | ||
- | |||
- | Edit / | ||
- | |||
- | <file bash / | ||
- | auto lo br0 | ||
- | iface lo inet loopback | ||
- | |||
- | iface eth0 inet manual | ||
- | |||
- | iface br0 inet dhcp | ||
- | bridge_ports eth0 | ||
- | </ | ||
- | |||
- | <WRAP center round info> | ||
- | In order to bring your new bridge interface up by default, **br0** is added at the end of the **auto lo**. | ||
- | |||
- | The bridge information lines tell Ubuntu that your bridge will use DHCP for automatic IP address assignment, and your bridge will manage your current interface. | ||
- | </ | ||
- | |||
- | <WRAP center round alert> | ||
- | Ubuntu 18.04 moves to using Netplan to handle Networking, and this therefore requires a different configuration to support bridging. | ||
- | |||
- | See: | ||
- | |||
- | https:// | ||
- | https:// | ||
- | </ | ||
- | |||
- | |||
- | |||
- | That's it for your bridge. | ||
- | |||
- | |||
- | |||
- | ===== Add Your User To The Groups ===== | ||
- | |||
- | Add your user to the appropriate groups so you don't need root privileges to manage your virtual machines. | ||
- | |||
- | <code bash> | ||
- | sudo adduser username libvirt | ||
- | sudo adduser username libvirt-qemu | ||
- | </ | ||
- | |||
- | |||
- | Restart your system. | ||
- | |||
- | |||
- | ====== Creating A VM ====== | ||
- | |||
- | Use **virt-manager** to create VMs. The window that opens up is fairly plain, but it has everything that you need to manage your VMs. To start making a new one, click on the icon that looks like a shining screen. | ||
- | |||
- | A new window will pop open to walk you through the process. | ||
- | |||
- | The next screen asks you to select your image. | ||
- | |||
- | On the following screen, you can allocate memory and cpu cores to the VM. Don't give it all of your system' | ||
- | |||
- | The next screen lets you determine the hard drive size of your VM. It's just a VM, so it doesn' | ||
- | |||
- | Finally, you can see an overview of your VM before you finalize it. On this screen, you can also name it. Once you finalize your VM, a new window will open and boot up the VM. In that window, you will see the installer for the image that you selected. | ||
- | |||
- | |||
- | ====== Closing Thoughts ====== | ||
- | |||
- | KVM provides a great amount of flexibility and power to your computer. | ||
kvm/setup_kvm_with_bridged_networking_and_virt-manager.1529317127.txt.gz · Last modified: 2020/07/15 09:30 (external edit)