~soren/vmbuilder/vmbuilder.refactoring

« back to all changes in this revision

Viewing changes to VMBuilder/plugins/kvm/vm.py

  • Committer: Soren Hansen
  • Date: 2009-12-05 01:11:03 UTC
  • Revision ID: soren@ubuntu.com-20091205011103-yzxztk3vyxrjwoa1
...

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    preferred_storage = VMBuilder.hypervisor.STORAGE_DISK_IMAGE
31
31
    needs_bootloader = True
32
32
 
 
33
    # This lives in the hypervisor plugin because the hypervisor may impose restrictions
 
34
    # on what sort of networking stuff can work. Soon this will be replaced with some sort
 
35
    # of Distro.write_network_config([NIC(type=NIC.STATIC, ip='192.168.10.1',...)]) sort
 
36
    # of thing, but this'll do for now.
 
37
    def build_network_configuration(self):
 
38
        self.vm.distro.write_network_configuration()
 
39
 
 
40
    def build_fstab(self):
 
41
        self.vm.distro.write_fstab()
 
42
 
 
43
    def make_bootable(self):
 
44
        self.vm.distro.install_kernel()
 
45
        self.vm.distro.install_bootloader()
 
46
 
33
47
    def finalize(self):
34
48
        self.imgs = []
35
49
        self.cmdline = ['kvm', '-m', str(self.vm.mem), '-smp', str(self.vm.cpus) ]