qemu plumbs virtual to wrong backing devices
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| QEMU |
Invalid
|
Undecided
|
Adam Jacob Muller | ||
Bug Description
This seems inexplicable but has been verified in a number of ways.
Given the following domain XML (from libvirt):
<devices>
<emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source dev='/dev/
<target dev='vda' bus='virtio'/>
<alias name='virtio-
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source dev='/dev/
<target dev='vdb' bus='virtio'/>
<alias name='virtio-
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
creates the following qemu command line:
LC_ALL=C PATH=/usr/
The following bits are important:
-drive file=/dev/
-device virtio-
-drive file=/dev/
-device virtio-
Given the following one would expect two devices inside the qemu guest (vda/vdb) with vda connected to /dev/vg/
This is, however, NOT how they are connected. Both vda and vdb both connect to /dev/vg/
This is verified in a number of ways:
A) the actual contents of the drives, _disk was modified (touch /root/blah) and these changes did show on vda.
B) disk I/O throughput. dd'ing large amounts of data to vda/vdb shows all data going to _disk, no writes/reads from _disk.rescue.
C) strace'ing the process shows all writes/reads (pwrite /pread) for both vda and vdb going to the file descriptor associated with the _disk device. No writes/reads were observed that go to the file descriptor associated with the _disk.rescue device.
qemu-1.0 and qemu-1.2 were both tested and appeared to have this issue.

this was not a qemu bug, i hate linux disk labels.