Creating virtual machine with KVM
Ubuntu server gives you various options for your virtualization needs. You can choose from KVM, XEN, QEMU, VirtualBox, and various other proprietary and open source tools. KVM, or Kernel virtual machine, is the default hypervisor on Ubuntu. In this recipe, we will set up a virtual machine with the help of KVM. Ubuntu, being a popular cloud distribution provides prebuilt cloud images that can be used to start virtual machines in the cloud. We will use one of these prebuilt images to build our own local virtual machine.
Getting ready
As always, you will need access to the root account or an account with sudo
privileges.
How to do it…
Follows these steps to install KVM and launch a virtual machine using cloud image:
To get started, install the required packages:
$ sudo apt-get install kvm cloud-utils \ genisoimage bridge-utils
Tip
Before using KVM, you need to check whether your CPU supports hardware virtualization, which is required by KVM. Check CPU support with...