I am trying to boot my very first VM using KVM. I have Ubuntu 12.04 installed, i made sure the BIOS had the right virtualization flag enabled for intel processor by running kvm-ok. I have researched this on google and all the instructions that i have found so far are outdated. for e.g. most instructions talk about booting a virtual machine with the following commands
Create a virtual disk for your VM:
qemu-img create -f qcow2 foo.img 100G
This runs kvm:
kvm --name foo -m 1024 -hda foo.img -cdrom whatever.iso -boot d
This command line is incomplete. First you need to be root to run this. Second, it is missing option for the video device. When you run this command you get the following error:
Could not initialize SDL(No available video device) - exiting
Googled this error and looked it up on StackOverflow. The answer provided in that thread does not work on Ubuntu 12.04.
Googled this problem further and found out that I need to specify a video device so I finally ran the following command:
sudo kvm --name mymachine -m 8096 -hda myimage.img --cdrom ubuntu.iso -boot d -vga cirruss -k en-us -vmc :0
This was after I had created the
myimage.img image on the drive. Now this command does not give me an error but it just hangs.
Does anyone have clear instructions on how to run a VM using KVM on Ubuntu?