Comment 5 for bug 432154

Revision history for this message
Daniel Nurmi (nurmi) wrote : Re: [Bug 432154] Re: dynamic block device attach/detach not functional with karmic KVM

Dustin, here is my progress thus far. On a install of Karmic alpha6 CD,
with qemu-kvm 0.11.0~rc2-0ubuntu4

FIRST:
-----------------------------------
boot VM
   ubuntu jaunty
   kernel 2.6.28-11-generic

load 'acpiphp' module in VM
   modprobe acpiphp

try 'virsh attach-device
   dd if=/dev/zero of=/tmp/foobar bs=1M count=64
   cat /tmp/meh
      <disk type='block'><driver name='phy'/><source
dev='/tmp/foobar'/><target dev='sdb'/></disk>
   virsh attach-device 1 /tmp/meh
      Connecting to uri: qemu:///system
      Device attached successfully

no dice, just see some SCSI init stuff in dmesg (see bug report), but no
actual disk devices are showing up

NEXT:
------------------------------------------

roll back qemu-kvm to version 0.11.0~rc2-0ubuntu2, same result

NEXT:
-------------------------------------------

grab the 'kvm' binary from a jaunty box (1:84+dfsg-0ubuntu12.3), throw it in
/usr/bin on the karmic box, softlink /usr/share/qemu to /usr/share/kvm -
success! Somewhere between this version and 0ubuntu2, the problem cropped
up. I'm not sure if this is helpful or not. Here is the nice dmesg I get
with the older KVM, in the guest:

[ 258.062895] pci 0000:00:07.0: reg 10 io port: [0x00-0xff]
[ 258.062964] pci 0000:00:07.0: reg 14 32bit mmio: [0x000000-0x0003ff]
[ 258.063026] pci 0000:00:07.0: reg 18 32bit mmio: [0x000000-0x001fff]
[ 258.063692] pci 0000:00:02.0: BAR 6: bogus alignment [0x0-0x0] flags 0x2
[ 258.063868] decode_hpp: Could not get hotplug parameters. Use defaults
[ 258.092439] sym53c8xx 0000:00:07.0: enabling device (0000 -> 0003)
[ 258.093953] sym53c8xx 0000:00:07.0: PCI INT A -> Link[LNKC] -> GSI 10
(level, high) -> IRQ 10
[ 258.097161] sym1: <895a> rev 0x0 at pci 0000:00:07.0 irq 10
[ 258.100701] sym1: No NVRAM, ID 7, Fast-40, LVD, parity checking
[ 258.104043] sym1: SCSI BUS has been reset.
[ 258.113949] scsi3 : sym-2.2.3
[ 261.120993] scsi 3:0:1:0: Direct-Access QEMU QEMU HARDDISK
0.9. PQ: 0 ANSI: 3
[ 261.121008] scsi target3:0:1: tagged command queuing enabled, command
queue depth 16.
[ 261.121038] scsi target3:0:1: Beginning Domain Validation
[ 261.122125] scsi target3:0:1: Domain Validation skipping write tests
[ 261.122129] scsi target3:0:1: Ending Domain Validation
[ 261.133097] sd 3:0:1:0: [sdb] 131072 512-byte hardware sectors: (67.1
MB/64.0 MiB)
[ 261.133285] sd 3:0:1:0: [sdb] Write Protect is off
[ 261.133290] sd 3:0:1:0: [sdb] Mode Sense: 14 00 00 00
[ 261.133610] sd 3:0:1:0: [sdb] Write cache: enabled, read cache: enabled,
doesn't support DPO or FUA
[ 261.134228] sd 3:0:1:0: [sdb] 131072 512-byte hardware sectors: (67.1
MB/64.0 MiB)
[ 261.134426] sd 3:0:1:0: [sdb] Write Protect is off
[ 261.134431] sd 3:0:1:0: [sdb] Mode Sense: 14 00 00 00
[ 261.134738] sd 3:0:1:0: [sdb] Write cache: enabled, read cache: enabled,
doesn't support DPO or FUA
[ 261.134752] sdb: unknown partition table
[ 261.137920] sd 3:0:1:0: [sdb] Attached SCSI disk
[ 261.138465] sd 3:0:1:0: Attached scsi generic sg2 type 0

Let me know how you would like me to proceed, if I can help in any way!

-d

On Sat, Sep 19, 2009 at 10:15 PM, Dustin Kirkland <<email address hidden>
> wrote:

> Okay, any chance you can help narrow down where this functionality
> regressed?
>
> :-Dustin
>
> --
> dynamic block device attach/detach not functional with karmic KVM
> https://bugs.launchpad.net/bugs/432154
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in qemu-kvm: New
> Status in “eucalyptus” package in Ubuntu: New
> Status in “qemu-kvm” package in Ubuntu: New
>
> Bug description:
> The version of KVM currently in karmic does not appear to have a fully
> functional dynamic block device attach/detach:
>
>
> outside VM:
> ---------------------------------------------------------------
> root@explorer:/root# virsh list
> Connecting to uri: qemu:///system
> Id Name State
> ----------------------------------
> 1 i-512A0927 running
>
> root@explorer:/root# ls -l /tmp/foobar
> -rw-r--r-- 1 root root 33554432 2009-09-17 15:09 /tmp/foobar
> root@explorer:/root# cat /tmp/meh
> <disk type='block'><driver name='phy'/><source dev='/tmp/foobar'/><target
> dev='sdb'/></disk>
> root@explorer:/root# virsh attach-device 1 /tmp/meh
> Connecting to uri: qemu:///system
> Device attached successfully
>
> root@explorer:/root#
>
> inside VM (with acpiphp loaded)
> --------------------------------------------------------------
> root@10:/lib/modules# dmesg
> [ 1482.978287] pci 0000:00:06.0: reg 10 io port: [0x00-0xff]
> [ 1482.978327] pci 0000:00:06.0: reg 14 32bit mmio: [0x000000-0x0003ff]
> [ 1482.978365] pci 0000:00:06.0: reg 18 32bit mmio: [0x000000-0x001fff]
> [ 1482.978673] pci 0000:00:02.0: BAR 6: bogus alignment [0x0-0x0] flags 0x2
> [ 1482.978750] decode_hpp: Could not get hotplug parameters. Use defaults
> [ 1482.982167] sym53c8xx 0000:00:06.0: enabling device (0000 -> 0003)
> [ 1482.982274] sym53c8xx 0000:00:06.0: PCI INT A -> Link[LNKB] -> GSI 10
> (level, high) -> IRQ 10
> [ 1482.984011] sym1: <895a> rev 0x0 at pci 0000:00:06.0 irq 10
> [ 1482.989722] sym1: No NVRAM, ID 7, Fast-40, LVD, parity checking
> [ 1482.992017] sym1: SCSI BUS has been reset.
> [ 1483.001733] scsi6 : sym-2.2.3
> root@10:/lib/modules#
> ----------------------------------------------------------------
>
> libvirt/kvm appear to believe that the block device has been attached, but
> the device is not showing up in the guest (this process with the same
> VM/kernel works on Jaunty). Apparmor is disabled.
>

--
Daniel Nurmi
Co-Founder, Engineer
Eucalyptus Systems, Inc.

130 Castilian Dr. | Goleta, CA | 93117
Office: 805-845-8000 | Cell: 805-259-5269
Email: <email address hidden>
www.eucalyptus.com

________________________________________