CSS Corp Open Source Services

[Eucalyptus Beginner’s Guide – UEC edition] Chapter 11 – Hacks

with 8 comments

Chapter 10
Euca Commands

Bringing up a windows instance without using kernel and ramdisk images

Edit /usr/share/eucalyptus/gen_kvm_libvirt_xml to  remove the lines that add “-kernel” and “-initrd” options in the libvirt.xml.

Here is the patch for /usr/share/eucalyptus/gen_kvm_libvirt_xml that ships with Ubuntu 10.04 (Lucid Lynx)

DISCLAIMER: This patch works  with the windows instances  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. If you need the flexibility of launching instances using different kernel/ramdisk combinations, this hack is not for you!

--- /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 @@
     <name>NAME</name>
     <os>
     <type>hvm</type>
-        <kernel>BASEPATH/kernel</kernel>
 EOF

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

 print <<EOF;
-        <cmdline>root=/dev/sda1 console=ttyS0</cmdline>
     </os>
     <features>
         <acpi/>
Chapter 10
Euca Commands
Advertisements

8 Responses

Subscribe to comments with RSS.

  1. Hello Kiran.

    I had in exactly the same situation, an eucalyptus built from ubuntu repository packages for lucid (10.04).

    I did this hack and now Windows machines are running fine.

    All my other linux virtual machines just don’t boot, but I don’t care about those machines. What I need now is to know how to bundle a custom bootable image of some kind of linux …

    Could you please send me a link ?

    Thanks in advance !

    David Martinez

    June 15, 2010 at 6:08 am

    • Hi David,

      Please refer to Image Management chapter on how to bundle custom bootable images for Linux. Please, let us know how it goes.

      Kiran

      kiranmurari

      June 15, 2010 at 4:35 pm

  2. Hi
    have you tried creating image for Windows Server 2008 R2? I did apply the patch and the vm started but i am not able to connect to RDP service.
    Thanks
    Shiva

    Shiva Shankar

    July 7, 2010 at 11:07 am

    • Hi Siva,

      We haven’t tried with 2008 Server. But with the above hack, it should be possible to get Win2008 working.

      As you see the instance is coming from “pending” to “running” state, but that does not guarantee that the instance has booted completely.

      Can you ensure that the bundling process was done perfectly. Also you can look at “Launching an instance with VNC attached” in Chapter-9 for debugging any boot up related issues.

      Hope that helps.

      Kiran

      kiranmurari

      July 8, 2010 at 1:14 pm

  3. iam using 10.04, i change the file on /usr/share/eucalyptus/gen_kvm_libvirt_xml like u said…
    after that my insntace always go to terminate state after pending state… could you gime me the complete one of the file /usr/share/eucalyptus/gen_kvm_libvirt_xml
    ‘thanks

    Indra Suryatama

    January 27, 2011 at 2:48 pm

  4. Hello Mr.Kiran Murari,

    Thank You for Creating this Knowledge Base Blog, we made use of this blog when we’re in trouble. but we could not able to understand, how does the Created VM’s can be accessed from Remote Place or (web). We had successfully created CC, CLC, WS. in one Node (eth1-192.168.1.7) and Nodal Controller (192.168.1.8) using Ubuntu 10.04 Server (GUI-Converted) and Created VM Using Virtual Box and installed Ubuntu 10.10 on VM (192.168.1.13) All the nodes (CC, NC, & VM) are configured and bridged and it is communicating. we are also having 1 static(WAN) IP and it is already configured to eth0 of CC.

    Update: I found how to access through SSH, but i need to know, how to connect through VNC or similar interfaces

    Thanking You
    Srinivas

    srinivas

    March 13, 2011 at 9:17 pm

  5. In 10.10, the gen_kvm_libvirt_xml changed a lot … this patch is not working any more. I can manually remove the kernel and ramdisk line, but they have changed the way they create the scsi drive. If I debug with VNC, the BIos will tell me that the drive is not bootable anymore. But my image worked on 10.04.

    pallaire

    March 23, 2011 at 9:58 pm

  6. hi , i just curios with which component the gen_kmv_libvirt_xml will be comunicated

    Indra Suryatama

    April 13, 2011 at 11:55 am


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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: