Tags

,

Check hardware capability

kvm-ok

Install support packages

sudo apt-get install cpu-checker
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:gns3
sudo apt-get install qemu-kvm libvirt-bin bridge-utils vlan
sudo apt-get install virt-viewer virt-manager vnc4server ssh-askpass fluxbox xterm
sudo apt-get install vmbuilder
sudo apt-get install python-vm-builder

Add your user group libvirtd

sudo usermod -G libvirtd,sudo <your_user>

Configure your interface. We are using bridge interface as br0

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
 address 192.168.1.100
 network 192.168.1.0
 netmask 255.255.255.0
 broadcast 192.168.1.255
 gateway 192.168.1.1
 dns-nameservers 192.168.1.2
 bridge_ports eth0
 bridge_fd 9
 bridge_hello 2
 bridge_maxage 12
 bridge_stp off

Now it’s time to create your first VM.

vmbuilder kvm ubuntu 
—suite precise 
—flavour virtual 
—arch i386 
—ip 192.168.1.69 
—gw 192.168.1.1 
—dns 192.168.1.2 
—hostname vm20 
—bridge br0 
—mem=256 
—user user 
—pass password 
—addpkg openssh-server 
—dest /home/user/ubuntu-kvm/vm20 
—libvirt qemu:///system