CSS Corp Open Source Services

UEC: Windows instance on Lucid Lynx [HACK]

with 3 comments

Bundling Windows instances on UEC setup on Lucid Lynx (Ubuntu 10.04) was not as straight forward as it was with Karmic Koala (Ubuntu 9.10).  The steps for bundling, uploading and registering were the same as I mentioned here. The instance comes up nicely from pending to running state, acquires the public and private ip addresses.

Lo!!! there ends the similarity….

I wasn’t able to access the instance. No network connectivity….. neither PING nor RDP works. And this was frustrating!!!

As mentioned in my earlier post about UEC/Eucalyptus – Debugging instances, I tweaked the /usr/share/gen_kvm_libvirt_xml file on the Node Controller and added the VNC display option.

The outcome of this was surprising!!!!

When I connect to VNC, the following error stares at me….

Invalid BOOT.INI file
Booting from C:\WINDOWS
Windows could not start because of a computer disk hardware configuration problem.
Could not read from the selected boot disk. Check boot path and disk hardware.
Please check the windows documentation about hardware disk configuration

But what I had uploaded was a working image, booting fine, with network connectivity etc on KVM and even on my Karmic UEC setup.

Playing around with gen_kvm_libvirt_xml, I removed the lines that add “-kernel” and “-initrd” options in the libvirt.xml, because the disk image was anyway bootable. The instance came up nicely and everything worked fine.

And here is the patch that worked for me….

DISCLAIMER: This patch had just got my Windows instances up and running in UEC on Lucid Lynx. This would work as long as all your disk images are bootable and you don’t need the kernel and ramdisk images. Do not hold me responsible, if this breaks a working system!

The following patch modifies /usr/share/eucalyptus/gen_kvm_libvirt_xml file on NC, so that KVM command doesn’t use “-kernel” and “-initrd” option while starting an instance.

--- /usr/share/eucalyptus/gen_kvm_libvirt_xml
+++ gen_kvm_libvirt_xml.modified
@@ -75,7 +75,7 @@
 our $use_ramdisk = 0;

 # deal with command-line parameters
-GetOptions('ramdisk'        => sub { $use_ramdisk = 1; },
+GetOptions('ramdisk'        => sub { $use_ramdisk = 0; },
            'ephemeral'      => sub { }, # option ignored
                   ) or exit (1);

@@ -84,7 +84,6 @@
-        <kernel>BASEPATH/kernel</kernel>

 if ( $use_ramdisk ) {
@@ -92,7 +91,6 @@

 print <<EOF;
-        <cmdline>root=/dev/sda1 console=ttyS0</cmdline>

With this I was able to raise Linux instances as well. But you loose the flexibility of specifying a particular kernel and ramdisk that you want to use for the instance.


But still wondering that “Bundling Windows Images” which worked in UEC on Karmic Koala, failed so on Lucid Lynx.

So where to ask… Eucalyptus??? Qemu/KVM??? Libvirt???

Any thoughts…..?

3 Responses

Subscribe to comments with RSS.

  1. Hello, I am facing the same problem in 10.10 ! But the gen_kvm_libvirt_xml is really different. I didnt have any problem running my XP image in 10.04, but on 10.10 it wont start. Did you see the same problem on 10.10 ?


    March 23, 2011 at 8:25 pm

  2. Hi,
    I am facing the same problems with Windows instances on Ubuntu 11.04. The /usr/share/gen_kvm_libvirt_xml file looks very different in this edition, and so I am not sure how to use the patch. Can you please put up the patch for Ubuntu 11.04?

    Thanks a lot!


    January 20, 2012 at 3:00 pm

  3. […] A hack has been given for the /usr/share/gen_kvm_libvirt_xml file on the NC to correct this problem in Ubuntu 10.04 https://cssoss.wordpress.com/2010/05/…k/#comment-504 […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: