[libvirt-users] invalid argument error when using cache parameter

hi, i tried to add a 'cache' argument to the 'driver' element in my domainxml for qemu/kvm. i tried adding cache="none" as well as "writethrough" and "writeback", but every time i get these errors: libvirtError: internal error process exited while connecting to monitor: char device redirected to /dev/pts/1 qemu: could not open disk image /vms/test.img: Invalid argument the full driver line looks like this: <driver name="qemu" type="raw" cache="none"/> the same domainxml works just fine without the cache parameter. does anyone know what i'm doing wrong? is there some other way to set the default cache policy on qemu/kvm? i didn't see anything in the config file... --igor

Actually, I only get the error when using cache='none' -- writethrough and writeback both work, and default works also but the cache parameter is gone from the driver element if I do a dumpxml. i also forgot to include versions: cloud1:~# qemu --version QEMU PC emulator version 0.12.5 (Debian 0.12.5+dfsg-3), Copyright (c) 2003-2008 Fabrice Bellard cloud1:~# virsh --version 0.8.6 --Igor On Sat, Jan 22, 2011 at 12:49:55AM -0600, Igor Serebryany wrote:
hi,
i tried to add a 'cache' argument to the 'driver' element in my domainxml for qemu/kvm. i tried adding cache="none" as well as "writethrough" and "writeback", but every time i get these errors:
libvirtError: internal error process exited while connecting to monitor: char device redirected to /dev/pts/1 qemu: could not open disk image /vms/test.img: Invalid argument
the full driver line looks like this: <driver name="qemu" type="raw" cache="none"/>
the same domainxml works just fine without the cache parameter. does anyone know what i'm doing wrong? is there some other way to set the default cache policy on qemu/kvm? i didn't see anything in the config file...
--igor
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users

于 2011年01月22日 14:57, Igor Serebryany 写道:
Actually, I only get the error when using cache='none' -- writethrough and writeback both work, and default works also but the cache parameter is gone from the driver element if I do a dumpxml.
Hi, Igor, Could you check the disk cache support of your qemu? [root@Osier libvirt]# qemu-kvm --help | grep cache [,cache=writethrough|writeback|none|unsafe][,format=f] And, also the qemu command line for your guest? /var/log/libvirt/qemu/$guest.log Regards Osier
i also forgot to include versions:
cloud1:~# qemu --version QEMU PC emulator version 0.12.5 (Debian 0.12.5+dfsg-3), Copyright (c) 2003-2008 Fabrice Bellard cloud1:~# virsh --version 0.8.6
--Igor
On Sat, Jan 22, 2011 at 12:49:55AM -0600, Igor Serebryany wrote:
hi,
i tried to add a 'cache' argument to the 'driver' element in my domainxml for qemu/kvm. i tried adding cache="none" as well as "writethrough" and "writeback", but every time i get these errors:
libvirtError: internal error process exited while connecting to monitor: char device redirected to /dev/pts/1 qemu: could not open disk image /vms/test.img: Invalid argument
the full driver line looks like this: <driver name="qemu" type="raw" cache="none"/>
the same domainxml works just fine without the cache parameter. does anyone know what i'm doing wrong? is there some other way to set the default cache policy on qemu/kvm? i didn't see anything in the config file...
--igor
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users

On Sat, Jan 22, 2011 at 12:49:55AM -0600, Igor Serebryany wrote:
hi,
i tried to add a 'cache' argument to the 'driver' element in my domainxml for qemu/kvm. i tried adding cache="none" as well as "writethrough" and "writeback", but every time i get these errors:
libvirtError: internal error process exited while connecting to monitor: char device redirected to /dev/pts/1 qemu: could not open disk image /vms/test.img: Invalid argument
the full driver line looks like this: <driver name="qemu" type="raw" cache="none"/>
the same domainxml works just fine without the cache parameter. does anyone know what i'm doing wrong? is there some other way to set the default cache policy on qemu/kvm? i didn't see anything in the config file...
What filesystem type is /vms ? I've seen this error message when the filesystem did not support O_DIRECT, which cache=none enables Regards, Daniel

On Mon, Jan 24, 2011 at 11:26:36AM +0000, Daniel P. Berrange wrote:
What filesystem type is /vms ? I've seen this error message when the filesystem did not support O_DIRECT, which cache=none enables
yup, that was the exact culprit -- /vms is a FUSE-mounted FS which doesn't support O_DIRECT. thanks! --igor
participants (3)
-
Daniel P. Berrange
-
Igor Serebryany
-
Osier Yang