update qemu-img option format for RHEL-6

This commit is contained in:
Mike Bonnet 2010-09-23 13:56:18 -04:00
parent 3dc4cc8235
commit 8cb82d0c5f

View file

@ -406,7 +406,7 @@ class VMExecTask(BaseTaskHandler):
def mkqcow2(self, clone_name, source_disk, disk_num):
new_name = clone_name + '-disk-' + str(disk_num) + self.QCOW2_EXT
new_path = os.path.join(self.options.imagedir, new_name)
cmd = ['/usr/bin/qemu-img', 'create', '-b', source_disk, '-f', 'qcow2', new_path]
cmd = ['/usr/bin/qemu-img', 'create', '-f', 'qcow2', '-o', 'backing_file=%s' % source_disk, new_path]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True)
ret = proc.wait()
if ret: