Description of problem: In Fedora 19's libguestfs, qemu is started with cache=none when attempting to mount the new image in order to inject the configuration. This fails to pread the qcow2 image: pread(9, 0x7f1d44000a00, 512, 0) = -1 EINVAL (Invalid argument) if the image is on xfs with sectsz=4096: meta-data=/dev/mapper/fedora_ewcs9-var isize=256 agcount=49, agsize=319872 blks = sectsz=4096 attr=2 data = bsize=4096 blocks=15360000, imaxpct=25 = sunit=128 swidth=256 blks naming =version 2 bsize=4096 ascii-ci=0 log =internal bsize=4096 blocks=2560, version=2 = sectsz=4096 sunit=1 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 Version-Release number of selected component (if applicable): libguestfs-1.22.7-1.fc19 How reproducible: Always Steps to Reproduce: Install with packstack. 1. mkfs -s 4096 /dev/vgfoo/lvbar 2. mount /dev/vgfoo/lvbar /var/lib/nova/instances 3. Install with packstack 4. start openstack 5. Install an image and launch a VM from that image Actual results: The VM is not started. A log entry about ignoring the failure to inject data into the image is logged. An strace revealed that qemu is being called by libguestfs attempting to use -drive file={image filename},if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none Attempting that same command results in the error, "Invalid argument" A further strace reveals the EINVAL comes from pread due to the block size mismatch. Expected results: The data is injected and the VM starts. Additional info: This bug is fixed in libguestfs 1.24 because it uses writeback or unsafe depending on mode, and never uses cache=none
Note this is (effectively) a bug in libguestfs in F19, or if not a bug then the fix will involve that component.
RHEL bug (private) is bug 999239.
I've backported the cachemode stuff to F19, so by default it will now use cache=writeback, and cache=unsafe for temporary/throwaway disks. http://koji.fedoraproject.org/koji/taskinfo?taskID=6321380
Comment 3 really applies to bug 1044763, I just added the comment to the wrong bug. In any case, nothing needs to be changed in nova. It'll just be fixed automatically when libguestfs is upgraded. In particular there is no need for nova to explicitly use the new cachemode parameter because the new default for disks (writeback) doesn't use O_DIRECT.
libguestfs-1.22.7-4.fc19 is in already in f19 stable (see bug 1044763).