Commit b21ada3c by Karsa Zoltán István

bugfix

parent 75fd709e
......@@ -386,6 +386,7 @@ class Disk(object):
def snapshot(self):
""" Creating qcow2 snapshot with base image.
"""
logger.debug('Create snapshot from base-image: %s', self.get_desc())
# Check if snapshot type and qcow2 format matchmatch
if self.type != 'snapshot':
raise Exception('Invalid type: %s' % self.type)
......@@ -401,10 +402,10 @@ class Disk(object):
elif self.format == 'raw':
raise NotImplemented()
else:
cmdline = ['ionice', '-c', 'idle',
cmdline = [# 'ionice', '-c', 'idle',
'qemu-img', 'create',
'-f', self.format, '-F', 'qcow2',
'-b', self.get_base(),
'-f', self.format,
self.get_path()]
# Call subprocess
subprocess.check_output(cmdline)
......
......@@ -33,7 +33,7 @@ def create_ci_disk(disk_desc, meta_data, user_data):
disk = Disk.deserialize(disk_desc)
disk.create_ci_disk(meta_data=meta_data, user_data=user_data)
return {'size': disk.size,
'type': disk.format,
'type': 'raw-ro',
'checksum': disk.checksum, }
......
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