Commit c4b38b1e authored by Guillaume Hervier's avatar Guillaume Hervier Committed by Rafael Monnerat

software/kvm: Fix native aio flags

Set cache.direct=on when using native aio (needed by qemu)

/reviewed-on nexedi/slapos!399
parent e26a65e8
......@@ -186,7 +186,7 @@ ignore-existing = true
url = ${:_profile_base_location_}/template/template-kvm-run.in
mode = 644
filename = template-kvm-run.in
md5sum = 0a076a9338ea0c25fa4e7c9369473d8a
md5sum = 8d681430f03ae4d35fc64b1625653a22
download-only = true
on-update = true
......
......@@ -238,6 +238,11 @@ if disk_storage_dict:
print('Data folder %s was not used to create external disk %r' % (index +1))
index += 1
additional_disk_options = ''
if disk_aio == 'native':
additional_disk_options += ',cache.direct=on'
# Generate network parameters
# XXX: use_tap should be a boolean
......@@ -293,7 +298,8 @@ else:
kvm_argument_list = [qemu_path,
'-enable-kvm', '-smp', smp, '-name', vm_name, '-m', ram, '-vga', 'std',
'-drive', 'file=%s,if=%s,cache=%s,aio=%s' % (disk_path, disk_type, disk_cache, disk_aio),
'-drive', 'file=%s,if=%s,cache=%s,aio=%s%s' % (disk_path, disk_type, disk_cache,
disk_aio, additional_disk_options),
'-vnc', '%s:1,ipv4,password' % listen_ip,
'-boot', 'order=cd,menu=on',
'-qmp', 'unix:%s,server' % socket_path,
......
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 to comment