[Pkg-escience-soc2009] [SCM] Tool for creating VM images. branch, master, updated. 72c8e53f3bf6d06b31972668eefa7747148aeefd

David Wendt dcrkid at yahoo.com
Thu Jun 18 22:03:22 UTC 2009


The following commit has been merged in the master branch:
commit 72c8e53f3bf6d06b31972668eefa7747148aeefd
Merge: d20945b6e0e2ba8fe1ab17e1f1a818030a7211dc 007ab102b6484ed2b9a60bf9ea66e27de93789a9
Author: David Wendt <dcrkid at yahoo.com>
Date:   Thu Jun 18 17:52:06 2009 -0400

    Merge branch 'dwendt_vmbuilder_debian'.
    
    Conflicts:
    
    	VMBuilder/plugins/ec2/__init__.py
    	VMBuilder/plugins/ubuntu/dapper.py
    	VMBuilder/plugins/ubuntu/distro.py

diff --combined VMBuilder/plugins/ubuntu/intrepid.py
index 543afca,6f2703e..297450a
--- a/VMBuilder/plugins/ubuntu/intrepid.py
+++ b/VMBuilder/plugins/ubuntu/intrepid.py
@@@ -28,25 -28,18 +28,34 @@@ class Intrepid(Hardy)
                         'lpia'  : ['lpia', 'lpiacompat'] }
      default_flavour = { 'i386' : 'virtual', 'amd64' : 'virtual', 'lpia' : 'lpia' }
      xen_kernel_flavour = 'virtual'
+     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^')
+         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^')
 +        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')
 +
      def mangle_grub_menu_lst(self):
          bootdev = disk.bootpart(self.vm.disks)
          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.')
diff --combined VMBuilder/plugins/virtualbox/templates/vm_deploy_script.tmpl
index 0d39637,ed1536d..03b8de4
--- a/VMBuilder/plugins/virtualbox/templates/vm_deploy_script.tmpl
+++ b/VMBuilder/plugins/virtualbox/templates/vm_deploy_script.tmpl
@@@ -10,15 -10,10 +10,14 @@@
  #import os
  #import os.path
  
 -os_type="Linux"
 +#if $os_type == "Ubuntu"
 +os_type="Ubuntu"
 +#else
 +os_type="Other"
 +#end if
  
 -disk_path="#echo os.path.abspath(os.path.dirname($vm_disks[0]))#/"
 +disk_path="#echo os.path.abspath(os.path.dirname($vm_disks[0]))#"
  
- 
  VBoxManage createvm -name $vm_name -ostype \$os_type -register
  
  VBoxManage openmedium #slurp

-- 
Tool for creating VM images.



More information about the Pkg-escience-soc2009 mailing list