~rtroy/vmbuilder/esxiimplementation-enhanced

« back to all changes in this revision

Viewing changes to VMBuilder/vm.py

  • Committer: Soren Hansen
  • Date: 2008-11-27 13:27:54 UTC
  • mfrom: (267.2.16 vmbuilder-fsimage)
  • Revision ID: soren@canonical.com-20081127132754-6sgolhe6f5csvlko
Merge my offline branch with the security fixes from jdstrand.

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
        #: directory where we build up the guest filesystem
73
73
        self.tmproot = None
74
74
 
 
75
        self.fsmounted = False
 
76
 
75
77
        self.optparser = _MyOptParser(epilog="ubuntu-vm-builder is Copyright (C) 2007-2008 Canonical Ltd. and written by Soren Hansen <soren@canonical.com>.", usage='%prog hypervisor distro [options]')
76
78
        self.optparser.arg_help = (('hypervisor', self.hypervisor_help), ('distro', self.distro_help))
77
79
 
360
362
            fs.mount()
361
363
            self.distro.post_mount(fs)
362
364
 
 
365
        self.fsmounted = True
 
366
 
363
367
    def umount_partitions(self):
364
368
        """Unmounts all the vm's partitions and filesystems"""
365
369
        logging.info('Unmounting target filesystem')
370
374
        for disk in self.disks:
371
375
            disk.unmap()
372
376
 
 
377
        self.fsmounted = False
 
378
 
373
379
    def install(self):
374
380
        if self.in_place:
375
381
            self.installdir = self.rootmnt