In playing around with the OpenStack Private Cloud distro (here), it comes with two Linux distributions by default. However, having come from a Windows background, I needed to get that going. In order to do that, I first had to convert one of my existing Windows images to a KVM format, that is what follows:
- A flat VMDK file or vmware-vdiskmanager (Part of the VDDK toolkit)
Note: This will take a lot of time, and quite a bit of space… I used a helper VM to do the conversions with both vmware-vdiskmanager and QEMU installed along with an NFS mount to some decent storage.
Starting with a sparse file (lots of little 2 GB vmdks):
-rwxr-xr-x 1 provmware provmware 2.5K Aug 17 19:28 NovaWin2k8R2.vmx
-rw-r–r– 1 provmware provmware 267 Aug 17 19:28 NovaWin2k8R2.vmxf
-rw——- 1 provmware provmware 1.5G Aug 17 19:30 Virtual Disk-s001.vmdk
-rw——- 1 provmware provmware 1.9G Aug 17 19:33 Virtual Disk-s002.vmdk
-rw——- 1 provmware provmware 2.0G Aug 17 19:35 Virtual Disk-s003.vmdk
-rw——- 1 provmware provmware 1.6G Aug 17 19:37 Virtual Disk-s004.vmdk
-rw——- 1 provmware provmware 320K Aug 17 19:37 Virtual Disk-s005.vmdk
-rw——- 1 provmware provmware 320K Aug 17 19:37 Virtual Disk-s006.vmdk
- vmware-vdiskmanager -r Virtual Disk.vmdk -t 0 NovaWin2k8R2.vmdk
- Get some coffee… step 1 takes a while.
- qemu-image convert NovaWin2k8R2.vmdk -o qcow2 NovaWin2k8R2.qemu
- scp the image to the controller node:
- scp ./NovaWin2k8R2.qemu firstname.lastname@example.org:/home/alamo
Import to OpenStack (KVM)
Now that you have this image… you need to get it to your OpenStack Glance server. When using the Rackspace Private Cloud distro as we are, this is on your controller node:
# glance add name=Win2k8R2 is_public=true container_format=raw disk_format=qcow2 < ./NovaWin2k8R2.qemu
Uploading image ‘Win2k8R2’
Everything above from “glance add” to “qemu” is a single line.
Can we start it?
Well, I’m not really sure. If you recall from my first post, at this point, all of this is running nested with that Windows image being 64bit and my underlying hardware does not support all of what is needed to run nested 64bit VMs (it does 32bit like a boss, however).
Is this working for you? Is it not? Did I miss the point? Drop a note in the comments. Also, follow me on twitter here.