[Pkg-escience-soc2009] [SCM] Tool for creating VM images. branch, master, updated. fdb495eb09d41c23e785a0ddd983c84681e51dcc
David Wendt
dcrkid at yahoo.com
Wed Jun 24 20:35:21 UTC 2009
The following commit has been merged in the master branch:
commit fdb495eb09d41c23e785a0ddd983c84681e51dcc
Merge: b5f30037cdc55e58963602a1e8eac2609c4724cd 98a51dbc08baf5d0b2c98e60a6b01c0de4933d4a
Author: David Wendt <dcrkid at yahoo.com>
Date: Wed Jun 24 15:57:28 2009 -0400
Merge branch 'ckaenzig_junk_lenny'
Conflicts:
VMBuilder/plugins/ec2/__init__.py
VMBuilder/plugins/ubuntu/dapper.py
VMBuilder/plugins/ubuntu/distro.py
VMBuilder/plugins/ubuntu/intrepid.py
VMBuilder/plugins/virtualbox/templates/vm_deploy_script.tmpl
diff --combined VMBuilder/plugins/debian/distro.py
index 67a8a53,56c0a33..a2d28cb
--- a/VMBuilder/plugins/debian/distro.py
+++ b/VMBuilder/plugins/debian/distro.py
@@@ -30,7 -30,7 +30,7 @@@ from VMBuilder.exception import VMBui
class Debian(Distro):
name = 'Debian'
arg = 'debian'
- suites = ['etch']
+ suites = ['etch', 'lenny']
# Maps host arch to valid guest archs
# FIXME: Running a amd64 kernel with an i386 userspace allows us to run
@@@ -163,24 -163,14 +163,24 @@@ EOT'''
def xen_kernel_version(self):
if self.suite.xen_kernel_flavour:
if not self.xen_kernel:
- rmad = run_cmd('rmadison', 'linux-image-%s' % self.suite.xen_kernel_flavour)
+ rmad = run_cmd('rmadison', 'linux-image-2.6-%s-%s' % (self.suite.xen_kernel_flavour, self.vm.arch))
version = ['0', '0','0', '0']
for line in rmad.splitlines():
sline = line.split('|')
- if sline[2].strip().startswith(self.vm.suite):
+ #Linux XEN kernel is referred to in Debian by rmadison as:
+ #linux-image-2.6-xen-amd64 | 2.6.18+6etch3 | oldstable | amd64
+ #Specifically, etch is called 'oldstable' in the 3rd field, to get the suite you need
+ #excavate it from the 2nd field.
+
+ if sline[1].strip().count(self.vm.suite) > 0:
+ #Fix for Debian handling of kernel version names
+ #It's x.y.z+w, not x.y.z.w
vt = sline[1].strip().split('.')
+ deb_vt = vt[2].split('+')
+ vt = [vt[0], vt[1], deb_vt[0], deb_vt[1]]
+
for i in range(4):
if int(vt[i]) > int(version[i]):
version = vt
diff --combined VMBuilder/plugins/ubuntu/intrepid.py
index 297450a,6f2703e..054e3af
--- a/VMBuilder/plugins/ubuntu/intrepid.py
+++ b/VMBuilder/plugins/ubuntu/intrepid.py
@@@ -32,16 -32,6 +32,6 @@@ class Intrepid(Hardy)
ec2_ramdisk_info = { 'i386': 'ari-7e4daa17', 'amd64' : 'ari-4c4daa25' }
def install_ec2(self):
- # workaround for policy bug on ubuntu-server. (see bug #275432)
- self.run_in_target('apt-get', '--force-yes', '-y', 'install', 'policykit')
- self.run_in_target('apt-get', '--force-yes', '-y', 'install', 'server^')
- self.install_from_template('/etc/update-motd.d/51_update-motd', '51_update-motd')
- self.run_in_target('chmod', '755', '/etc/update-motd.d/51_update-motd')
-
- ec2_kernel_info = { 'i386' : 'aki-714daa18', 'amd64' : 'aki-4f4daa26' }
- ec2_ramdisk_info = { 'i386': 'ari-7e4daa17', 'amd64' : 'ari-4c4daa25' }
-
- def install_ec2(self):
# workaround for policy bug on ubuntu-server. (see bug #275432)
self.run_in_target('apt-get', '--force-yes', '-y', 'install', 'policykit')
self.run_in_target('apt-get', '--force-yes', '-y', 'install', 'server^')
@@@ -53,9 -43,3 +43,9 @@@
run_cmd('sed', '-ie', 's/^# kopt=root=\([^ ]*\)\(.*\)/# kopt=root=UUID=%s\\2/g' % bootdev.fs.uuid, '%s/boot/grub/menu.lst' % self.destdir)
run_cmd('sed', '-ie', 's/^# groot.*/# groot=%s/g' % bootdev.fs.uuid, '%s/boot/grub/menu.lst' % self.destdir)
run_cmd('sed', '-ie', '/^# kopt_2_6/ d', '%s/boot/grub/menu.lst' % self.destdir)
+
+ def install_xen_kernel(self):
+ import VMBuilder.plugins.xen
+
+ if isinstance(self.vm.hypervisor, VMBuilder.plugins.xen.Xen):
+ logging.info('Skipping Xen kernel installation.')
--
Tool for creating VM images.
More information about the Pkg-escience-soc2009
mailing list