Hello, all;
I have received some private messages about my post about running Windows guests on Eucalyptus. In the spirit of open source, my boss has kindly let me share my solution.
IMPORTANT NOTES:
- I am not a Eucalyptus developer. Please do not construe this patch to be official or supported or in any way related to future Eucalyptus functionality and development. No warranty is given for this code and I am not liable for anything it may cause.
- This patch is for Xen only. We do not use KVM so I did not bother with it.
- Authentication keys are not supported for Windows. You will have to simply rdesktop into the instance and log in using the username and password created under Windows.
- Unlike for Linux, the Windows disk images must be complete drive images, rather than simply partitions -- that is, with a boot loader, partition table, and partitions. The best test I have discovered is to make sure your prepared image launches properly in qemu without any special parameters: qemu -snapshot -m 512
- Because Windows tends to be large, this patch also adds optional support for qcow images. No more transferring 15 GB files with 11 GB of zeroes in them!
- There are two versions of this patch -- sparsedd and slowdd. The difference is that the sparsedd patch modifies Eucalyptus to create sparse swap and ephemeral drive files. This is VERY FAST but DANGEROUS. Although this makes launching machines many times faster, all space is not accounted for -- so if you don't manage your space carefully, more space will be reserved than is available on the drive. Once the space is filled, very bad things might happen. If you are concerned about what will happen if your instances run out of disk space, use the slowdd patch (where the file creation commands are not modified from the official Eucalyptus distribution).
To install it:
It should apply cleanly to the eucalyptus sources. Download them and run patch:
patch -p1 < winhacks-1.5.2-sparsedd.patch
Then compile and install as normal.
IMPLEMENTATION:
To avoid having to extensively modify Eucalyptus, I simply introduced the following two quick hacks:
- If your KERNEL bucket name starts with "windows", it will assume you are launching a Windows instance
- If your disk image filename ends with .qcow or .qcow2, it will assume you are using a qcow drive.
USAGE:
1. create a fake kernel file (for example, a text file that says 'fake windows kernel'), and upload it to Eucalyptus as a kernel to a bucket name beginning with "windows"
2. Create or obtain a Windows instance that will fully and correctly boot when executed as: qemu -snapshot -m 512
3. Bundle this image like normal, and upload it to Eucalyptus, associating it with the kernel above.
4. Launch this image and kernel just like you would a Linux instance. Don't give a ramdisk.
winhacks-1.5.2-sparsedd.patch
or
winhacks-1.5.2-slowdd.patch
Good luck, all! :) Hope someone finds this useful.
Alex[/]
[/]
[/]