Package VMBuilder :: Package plugins :: Package ubuntu :: Module hardy
[frames] | no frames]

Source Code for Module VMBuilder.plugins.ubuntu.hardy

 1  # 
 2  #    Uncomplicated VM Builder 
 3  #    Copyright (C) 2007-2009 Canonical Ltd. 
 4  #     
 5  #    See AUTHORS for list of contributors 
 6  # 
 7  #    This program is free software: you can redistribute it and/or modify 
 8  #    it under the terms of the GNU General Public License version 3, as 
 9  #    published by the Free Software Foundation. 
10  # 
11  #    This program is distributed in the hope that it will be useful, 
12  #    but WITHOUT ANY WARRANTY; without even the implied warranty of 
13  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
14  #    GNU General Public License for more details. 
15  # 
16  #    You should have received a copy of the GNU General Public License 
17  #    along with this program.  If not, see <http://www.gnu.org/licenses/>. 
18  # 
19  import suite 
20  from VMBuilder.plugins.ubuntu.gutsy import Gutsy 
21   
22 -class Hardy(Gutsy):
23 virtio_net = True 24 ec2_kernel_info = { 'i386' : 'aki-6e709707', 'amd64' : 'aki-6f709706' } 25 ec2_ramdisk_info = { 'i386' : 'ari-6c709705', 'amd64' : 'ari-61709708' } 26
27 - def apply_ec2_settings(self):
28 self.vm.addpkg += ['ec2-init', 29 'openssh-server', 30 'ec2-modules', 31 'standard^', 32 'ec2-ami-tools', 33 'update-motd'] 34 35 if not self.vm.ppa: 36 self.vm.ppa = [] 37 38 self.vm.ppa += ['ubuntu-on-ec2/ppa']
39
40 - def install_ec2(self):
41 42 if self.vm.arch == 'i386': 43 self.run_in_target('apt-get' ,'--force-yes', '-y', 'install', 'libc6-xen') 44 self.run_in_target('apt-get','--purge','--force-yes', '-y', 'remove', 'libc6-i686') 45 self.install_from_template('/etc/ld.so.conf.d/libc6-xen.conf', 'xen-ld-so-conf') 46 self.install_from_template('/etc/event.d/xvc0', 'upstart', { 'console' : 'xvc0' }) 47 self.run_in_target('update-rc.d', '-f', 'hwclockfirst.sh', 'remove') 48 self.install_from_template('/etc/update-motd.d/51_update-motd', '51_update-motd-hardy') 49 self.run_in_target('chmod', '755', '/etc/update-motd.d/51_update-motd')
50
51 - def xen_kernel_path(self):
52 return '/boot/vmlinuz-2.6.24-19-xen'
53
54 - def xen_ramdisk_path(self):
55 return '/boot/initrd.img-2.6.24-19-xen'
56