Booting Ubuntu as VM with KVM on Ubuntu 12.04
Posted
by
CrazycodeMonkey
on Server Fault
See other posts from Server Fault
or by CrazycodeMonkey
Published on 2013-11-04T17:49:13Z
Indexed on
2013/11/04
21:57 UTC
Read the original article
Hit count: 251
ubuntu
|kvm-virtualization
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
qemu-img create -f qcow2 foo.img 100G --- create a virtual disk for your VM
kvm --name foo -m 1024 -hda foo.img -cdrom whatever.iso -boot d -- This runs kvm.
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 stackover flow http://stackoverflow.com/questions/4841908/sdl-init-failure-reason-is-no-available-video-device The answer provided here 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?
© Server Fault or respective owner