Difference between revisions of "UEC: Hacks"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 6: | Line 6: | ||
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! | ||
− | + | --- /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== |
Revision as of 04:47, 22 October 2010
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/>