How to Create Ubuntu Virtual Machines Using KVM

kvm

I would like to create several Ubuntu Server Virtual Machines using KVM to test and use. How do I create Virtual Machines using KVM?

Best Answer

If you do not already have KVM installed, you will need to do that. There is a kvm metapackage in the repos.

sudo apt-get install kvm

To create VMs the easy way, use virt-manager (available in the repos). It provides a nice GUI to walk you through it.

sudo apt-get install virt-manager

Keep in mind you can use virt-manager either on your local KVM server, or on a remote one. Once you have it fired up and pointed to the right KVM server, just click the "Create New Virtual Machine" button. The rest of it is fairly self-explanatory.

Also, if you want to use a bridged interface for KVM, follow my guide here: http://john.wesorick.com/2012/01/setting-up-bridged-network-interface.html

Bridged mode works better for any kind of networking on the virtual machine.