> On Thu, 05 Jun 2014 10:30:31 -0600
> Eric Blake wrote:
> > What caching mode are you requesting? tmpfs can't (yet) support
> > O_DIRECT, and if the caching mode you request causes qemu to try
> > O_DIRECT, that would explain why it is failing.
> Is that qemu's default mode? I don't think anyone is explicitly
> setting it, but I'll have to find out from the folks actually
> trying this.
I can't recall what the defaults are, but if you run 'virsh dumpxml'
it will tell you the cache mode for each drive.
In any case, cache='none' (ie. O_DIRECT) won't work, and you shouldn't
use it for throwaway test machines anyway. Since tmpfs always
disappears at reboot, any machine you create on a tmpfs is a throwaway
one, whether you intended that or not!
Use cache='unsafe' on tmpfs.
(This advice applies to libguestfs, virt-builder, etc too)
For more info on caching modes, see:
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
virt mailing list