Received: from eggs.gnu.org ([208.118.235.92]:51921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th6pT-0006Do-I9 for qemu-devel@nongnu.org; Fri, 07 Dec 2012 17:55:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Th6pP-0008HD-2P for qemu-devel@nongnu.org; Fri, 07 Dec 2012 17:55:35 -0500 Received: from indium.canonical.com ([91.189.90.7]:45096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th6pO-0008H9-QF for qemu-devel@nongnu.org; Fri, 07 Dec 2012 17:55:30 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Th6pN-00081z-NS for ; Fri, 07 Dec 2012 22:55:29 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 9420A2E8043 for ; Fri, 7 Dec 2012 22:55:29 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Fri, 07 Dec 2012 22:49:12 -0000 From: Adam Jacob Muller Sender: bounces@canonical.com References: <20121205224340.27947.41219.malonedeb@gac.canonical.com> Message-Id: <20121207224913.17303.57336.malone@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1087035] Re: qemu plumbs virtual to wrong backing devices Reply-To: Bug 1087035 <1087035@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org this was not a qemu bug, i hate linux disk labels. ** Changed in: qemu Assignee: (unassigned) =3D> Adam Jacob Muller (78luphr0rnk2nuqimstywep= ozxn9kl19tqh0tx66b5dki1xxsh5mkz9gl21a5rlwfnr8jn6ln0m3jxne2k9x1ohg85w3jabxlr= qbgszpjpwcmvk-launchpad) ** Changed in: qemu Status: New =3D> Invalid -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1087035 Title: qemu plumbs virtual to wrong backing devices Status in QEMU: Invalid Bug description: This seems inexplicable but has been verified in a number of ways. Given the following domain XML (from libvirt): /usr/bin/kvm
creates the following qemu command line: LC_ALL=3DC PATH=3D/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin QEMU_AUDIO_DRV=3Dnone /usr/bin/kvm -name instance-00000442 -S -M pc-1.0 -cpu core2duo,+lahf_lm,+rdtscp,+pdpe1gb,+avx,+osxsave,+xsave,+aes ,+tsc- deadline,+popcnt,+x2apic,+sse4.2,+sse4.1,+dca,+pdcm,+xtpr,+cx16,+tm2,+est= ,+smx,+vmx,+ds_cpl,+dtes64,+pclmuldq,+pbe,+tm,+ht,+ss,+acpi,+ds -enable-kvm -m 45056 -smp 16,sockets=3D16,cores=3D1,threads=3D1 -uuid 4080aa58-7e92-4d59-8fd4-38cc6cd6b1d1 -nodefconfig -nodefaults -chardev socket,id=3Dcharmonitor,path=3D/var/lib/libvirt/qemu/instance-00000442.mo= nitor,server,nowait -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc base=3Dutc,driftfix=3Dslew -no-kvm-pit-reinjection -no-shutdown -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 -drive file=3D/dev/vg /instance-00000442_disk.rescue,if=3Dnone,id=3Ddrive-virtio- disk0,format=3Draw,cache=3Dnone -device virtio-blk- pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x5,drive=3Ddrive-virtio-disk0,id=3Dvir= tio- disk0,bootindex=3D1 -drive file=3D/dev/vg/instance- 00000442_disk,if=3Dnone,id=3Ddrive-virtio-disk1,format=3Draw,cache=3Dnone -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x6,drive=3Ddrive-vi= rtio- disk1,id=3Dvirtio-disk1 -netdev tap,fd=3D21,id=3Dhostnet0 -device virtio- net- pci,netdev=3Dhostnet0,id=3Dnet0,mac=3Dfa:16:3e:4d:c1:78,bus=3Dpci.0,addr= =3D0x3 -netdev tap,fd=3D22,id=3Dhostnet1 -device virtio-net- pci,netdev=3Dhostnet1,id=3Dnet1,mac=3Dfa:16:3e:55:26:4e,bus=3Dpci.0,addr= =3D0x4 -chardev file,id=3Dcharserial0,path=3D/var/lib/nova/instances/instance-00000442/co= nsole.log -device isa-serial,chardev=3Dcharserial0,id=3Dserial0 -chardev pty,id=3Dcharserial1 -device isa-serial,chardev=3Dcharserial1,id=3Dserial1 -device usb-tablet,id=3Dinput0 -vnc 10.145.0.11:0 -k en-us -vga cirrus -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x7 The following bits are important: -drive file=3D/dev/vg/instance-00000442_disk.rescue,if=3Dnone,id=3Ddrive-= virtio-disk0,format=3Draw,cache=3Dnone -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x5,drive=3Ddrive-vi= rtio-disk0,id=3Dvirtio-disk0,bootindex=3D1 -drive file=3D/dev/vg/instance-00000442_disk,if=3Dnone,id=3Ddrive-virtio-= disk1,format=3Draw,cache=3Dnone -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x6,drive=3Ddrive-vi= rtio-disk1,id=3Dvirtio-disk1 = Given the following one would expect two devices inside the qemu guest (v= da/vdb) with vda connected to /dev/vg/instance-00000442_disk.rescue and vdb= connected to /dev/vg/instance-00000442_disk = This is, however, NOT how they are connected. Both vda and vdb both conne= ct to /dev/vg/instance-00000442_disk. This is verified in a number of ways: A) the actual contents of the drives, _disk was modified (touch /root/bla= h) 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 wi= th the _disk.rescue device. qemu-1.0 and qemu-1.2 were both tested and appeared to have this issue. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1087035/+subscriptions