Difference between revisions of "UEC: Hacks"

From OnnoWiki
Jump to navigation Jump to search
(New page: 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...)
 
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
Here is the patch for /usr/share/eucalyptus/gen_kvm_libvirt_xml that ships with Ubuntu 10.04 (Lucid Lynx)
 
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!
 
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!
view source
 
print?
 
01 --- /usr/share/eucalyptus/gen_kvm_libvirt_xml
 
02 +++ gen_kvm_libvirt_xml.modified
 
03 @@ -75,7 +75,7 @@
 
04 our $use_ramdisk = 0;
 
05
 
06 # deal with command-line parameters
 
07 -GetOptions('ramdisk'        => sub { $use_ramdisk = 1; },
 
08 +GetOptions('ramdisk'        => sub { $use_ramdisk = 0; },
 
09             'ephemeral'      => sub { }, # option ignored
 
10                   ) or exit (1);
 
11
 
12 @@ -84,7 +84,6 @@
 
13     <name>NAME</name>
 
14     <os>
 
15     <type>hvm</type>
 
16 -        <kernel>BASEPATH/kernel</kernel>
 
17 EOF
 
18
 
19 if ( $use_ramdisk ) {
 
20 @@ -92,7 +91,6 @@
 
21 }
 
22
 
23 print <<EOF;
 
24 -        <cmdline>root=/dev/sda1 console=ttyS0</cmdline>
 
25     </os>
 
26     <features>
 
27         <acpi/>
 
  
 +
--- /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/>
  
 
==Referensi==
 
==Referensi==
Line 42: Line 41:
 
==Pranala Menarik==
 
==Pranala Menarik==
  
* [[Ubuntu Enterprise Cloud: Eucalyptus Beginner’s Guide]] '''RECOMMENDED'''
+
* [[Ubuntu Enterprise Cloud: Panduan Untuk Pemula]] '''RECOMMENDED'''
 
* [[Ubuntu Enterprise Cloud: Instalasi UEC]]
 
* [[Ubuntu Enterprise Cloud: Instalasi UEC]]
 
* [[Cloud Computing]]
 
* [[Cloud Computing]]

Latest revision as of 19:33, 6 January 2011

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/>

Referensi

Pranala Menarik