* use raw devices instead of qcow2
* disable i/o caching, it reduces data copies and bus traffic
* set native aio instead of thread based
JIRA: FUEL-201
Change-Id: I8ac728cbb5be5948080fab8ae4d3d311e0a5c09c
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
(cherry picked from commit
ed79331c115eac4aad0eccd4b191c9e1e836c73d)
'%s |grep \"virtual size:\"'
% disk_file).split()[2]
delete(disk_file)
- exec_cmd('qemu-img create -f qcow2 %s %s' % (disk_file,
+ exec_cmd('qemu-img create -f raw %s %s' % (disk_file,
disk_size))
def node_eject_iso(self, node_id):
def create_storage(self, node_id, disk_path, disk_sizes):
role = self.dea.get_node_main_role(node_id, self.fuel_node_id)
disk_size = disk_sizes[role]
- exec_cmd('qemu-img create -f qcow2 %s %s' % (disk_path, disk_size))
+ exec_cmd('qemu-img create -f raw %s %s' % (disk_path, disk_size))
def create_vms(self):
temp_dir = tempfile.mkdtemp()
else:
err('No devices!')
- def create_volume(self, pool, name, su, img_type='qcow2'):
+ def create_volume(self, pool, name, su, img_type='raw'):
log('Creating image using Libvirt volumes in pool %s, name: %s' %
(pool, name))
size, unit = get_size_and_unit(su)
def create_image(self, disk_path, disk_size):
if os.environ.get('LIBVIRT_DEFAULT_URI') == None:
- exec_cmd('qemu-img create -f qcow2 %s %s' % (disk_path, disk_size))
+ exec_cmd('qemu-img create -f raw %s %s' % (disk_path, disk_size))
else:
pool = DEFAULT_POOL # FIXME
name = os.path.basename(disk_path)
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='qcow2' cache='writeback'/>
+ <driver name='qemu' type='raw' cache='none' io='native'/>
<target dev='vda' bus='virtio'/>
</disk>
<disk type='block' device='cdrom'>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='qcow2'/>
+ <driver name='qemu' type='raw' cache='none' io='native'/>
<target dev='vda' bus='virtio'/>
</disk>
<disk type='block' device='cdrom'>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='qcow2'/>
+ <driver name='qemu' type='raw' cache='none' io='native'/>
<target dev='vda' bus='virtio'/>
</disk>
<disk type='block' device='cdrom'>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='qcow2'/>
+ <driver name='qemu' type='raw' cache='none' io='native'/>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='qcow2'/>
+ <driver name='qemu' type='raw' cache='none' io='native'/>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>
<readonly/>
</disk>
<disk type='file' device='disk'>
- <driver name='qemu' type='qcow2'/>
+ <driver name='qemu' type='raw' cache='none' io='native'/>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>