Installing kvm on Ubuntu Linux using apt-get

Fig.02: Installing kvm on Ubuntu Linux using apt-get

Fig.02: Installing kvm on Ubuntu Linux using apt-get

To install KVM on Ubuntu Linux (headless server i.e. no GUI needed), enter:
$ sudo apt-get install qemu-kvm libvirt-bin virtinst bridge-utils

 

You can now use the virt-install command to create your first virtual machine. In this example, I’m creating CentOS Linux 7.x VM with 1024MB RAM, 1CPU and 40GB hard disk:
$ sudo virt-install \
--virt-type=kvm \
--name CentOS \
--ram 1024 \
--vcpus=1 \
--os-variant=rhel7 \
--hvm \
--cdrom=/var/lib/libvirt/boot/centos-boot-image.iso \
--network network=default,model=virtio \
--graphics vnc \
--disk path=/var/lib/libvirt/images/centos7.img,size=40,bus=virtio

Examples and usage: How to install KVM on Ubuntu 14.04 LTS Headless Server