Commit a668d255 by IK

legacy qemu

parent 1d313f3d
......@@ -103,7 +103,7 @@ class Disk(object):
""" Create disk from path
"""
path = os.path.realpath(dir + '/' + name)
output = subprocess.check_output(['qemu-img', 'info', '--force', path])
output = subprocess.check_output(['qemu-img', 'info', path])
type = 'normal'
base_name = None
......@@ -126,7 +126,7 @@ class Disk(object):
"""Create disk from path."""
path = os.path.realpath(dir + '/' + name)
output = subprocess.check_output(
['qemu-img', 'info', '--force', '--output=json', path])
['qemu-img', 'info', '--output=json', path])
disk_info = json.loads(output)
name = name
format = disk_info.get('format')
......@@ -289,7 +289,7 @@ class Disk(object):
else:
cmdline = ['ionice', '-c', 'idle',
'qemu-img', 'convert',
'-m', '2', '-O', 'qcow2',
'-O', 'qcow2',
downloaded_file,
self.get_path()]
subprocess.check_output(cmdline)
......@@ -321,7 +321,7 @@ class Disk(object):
'qemu-img', 'convert']
if disk_format == 'qcow2':
cmdline.append('-c')
cmdline.extend(['-m', '4', '-O', disk_format,
cmdline.extend(['-O', disk_format,
self.get_path(),
exported_path])
subprocess.check_output(cmdline)
......@@ -390,7 +390,7 @@ class Disk(object):
proc = None
try:
cmdline = ['ionice', '-c', 'idle',
'qemu-img', 'convert', '-m', '4']
'qemu-img', 'convert']
if new_disk.format == 'qcow2':
cmdline.append('-c')
cmdline.extend(['-O', new_disk.format,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment