~ubuntu-virt/vmbuilder/trunk

« back to all changes in this revision

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

  • Committer: Soren Hansen
  • Date: 2008-06-27 12:47:26 UTC
  • Revision ID: soren.hansen@canonical.com-20080627124726-kj690sepircudc3h
Import python rewrite.. It's not quite at a useful point yet (only cli+kvm+hardy is in a usable state), but it's getting there..

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from VMBuilder import register_hypervisor, Hypervisor
 
2
import VMBuilder
 
3
import os.path
 
4
 
 
5
class KVM(Hypervisor):
 
6
    name = 'KVM'
 
7
    arg = 'kvm'
 
8
    filetype = 'qcow2'
 
9
 
 
10
    def convert(self):
 
11
        for disk in VMBuilder.disks:
 
12
            disk.convert('%s/%s.%s' % (VMBuilder.options.destdir, '.'.join(os.path.basename(disk.filename).split('.')[:-1]), self.filetype), self.filetype)
 
13
    
 
14
register_hypervisor(KVM)