I'm trying to figure out how to create KVM VM. I'm doing this via virt-manager GUI on Ubuntu 12.10 host. What I did was that I downloaded the image we are using in Rackspace cloud ( ie. the tar.gz file) to the KVM host, then I tried to build the VM locally however as soon as the terminal window starts it looks like the image can't boot saying "no boot disk found". Strange thing is that it is first trying to PXE boot and then fails. Any ideas would be hugely appreciated.
Same thing happens if I try to use any of Ubuntu images. ie any of these http://uec-images.ubuntu.com/precise/20120808/
However when I follow the guide on this link: http://www.howtoforge.com/virtualization-with-kvm-on-ubuntu-12.04-lts All works fine - obviously not something I'm looking for as I'd like to find out how to boot Rackspace cloud images.
Cloud images are not disk images, they are partition images and KVM needs a disk image. Disk image represents a whole disk, it has a partition table and can contain multiple partitions. I was able to mount an image from http://uec-images.ubuntu.com/precise/20120808/ using
mount -o loop ./precise-server-cloudimg-i386.img /mnt/
so this file was obviously a partition image. To mount these images in KVM you will need a working KVM VM created from scratch. You will have to create a second empty disk image and a fresh partition on it with a newly created filesystem. Then you will be able to attach your existing image and mount it as a whole, saymount /dev/sdc /mnt/existing-image
. You will be able torsync
everything from your existing mounted partition image to your new disk image then. You will also need to setup GRUB to the MBR of your new disk image.I've written a guide on how to run a rackspace image locally under Xen, but the steps for extracting the the disk image are the same.
Check steps 5-11 at http://www.everichon.com/blog/2013/05/29/running-rackspace-images-locally/, that should help you get a correct image for your KVM setup.