Skip to contentSkip to conversation

dynamic block device attach/detach not functional with karmic KVM

Qemu-devel Anthony Liguori 2 participants 8 messages Jun 3, 2010 – Dec 20, 2011 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

** Changed in: qemu
Status: Fix Committed => Fix Released

Signature · 53 lines
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 member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: Fix Released
Status in “eucalyptus” package in Ubuntu: Invalid
Status in “libvirt” package in Ubuntu: Invalid
Status in “qemu-kvm” package in Ubuntu: Fix Released
Status in “eucalyptus” source package in Karmic: Invalid
Status in “libvirt” source package in Karmic: Invalid
Status in “qemu-kvm” source package in Karmic: Fix Released

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.
#2 lore raw
In reply to a message not in the archive

I believe this bug is still existing in the latest 10.10 server release. When attaching a volume the nc.log shows that it was properly mounted via iSCSI and one can access it on the node but it will not appear in the guest. The guest is the latest UEC release of Lucid. Can anybody confirm that this problem exists in 10.10 UEC?

Signature · 53 lines
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 member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: Fix Released
Status in “eucalyptus” package in Ubuntu: Invalid
Status in “libvirt” package in Ubuntu: Invalid
Status in “qemu-kvm” package in Ubuntu: Fix Released
Status in “eucalyptus” source package in Karmic: Invalid
Status in “libvirt” source package in Karmic: Invalid
Status in “qemu-kvm” source package in Karmic: Fix Released

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.
#3 lore raw
In reply to a message not in the archive

@Wolfgang I believe this is still an issue in maverick/10.10 aswell. I can attach a volume with UEC (10.10 metal and 10.10 instance).

If you issue a shutdown -r now within the instance, the volume will be attached after the reboot... just spent about 8 hours getting that far!

Signature · 53 lines
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 member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: Fix Released
Status in “eucalyptus” package in Ubuntu: Invalid
Status in “libvirt” package in Ubuntu: Invalid
Status in “qemu-kvm” package in Ubuntu: Fix Released
Status in “eucalyptus” source package in Karmic: Invalid
Status in “libvirt” source package in Karmic: Invalid
Status in “qemu-kvm” source package in Karmic: Fix Released

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.
#4 lore raw
In reply to a message not in the archive

@Wolfgang and @Kiall: are you sure that the acpiphp module is loaded in your guest?

Signature · 53 lines
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 member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: Fix Released
Status in “eucalyptus” package in Ubuntu: Invalid
Status in “libvirt” package in Ubuntu: Invalid
Status in “qemu-kvm” package in Ubuntu: Fix Released
Status in “eucalyptus” source package in Karmic: Invalid
Status in “libvirt” source package in Karmic: Invalid
Status in “qemu-kvm” source package in Karmic: Fix Released

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.
#5 lore raw
In reply to a message not in the archive

Yes - 100% sure.

I've since discovered that using /dev/vdX works without a reboot, while /dev/sdX does not work until after a reboot!

vdX triggers the use of virtio, while sdX uses the "standard" method .. whatever that is! I stopped digging once i got it working with vdX :)

Signature · 53 lines
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 member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: Fix Released
Status in “eucalyptus” package in Ubuntu: Invalid
Status in “libvirt” package in Ubuntu: Invalid
Status in “qemu-kvm” package in Ubuntu: Fix Released
Status in “eucalyptus” source package in Karmic: Invalid
Status in “libvirt” source package in Karmic: Invalid
Status in “qemu-kvm” source package in Karmic: Fix Released

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.
#6 lore raw
In reply to a message not in the archive

@Serge: Yes acpiphp is definitely loaded. I used the UEC images.

@Kiall: Thanks for the hint about vdX. Does that mean you just specify (for example) vda when attaching the device to the instance and that will work? I have no cluster installed with which i could test atm.

Signature · 53 lines
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 member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: Fix Released
Status in “eucalyptus” package in Ubuntu: Invalid
Status in “libvirt” package in Ubuntu: Invalid
Status in “qemu-kvm” package in Ubuntu: Fix Released
Status in “eucalyptus” source package in Karmic: Invalid
Status in “libvirt” source package in Karmic: Invalid
Status in “qemu-kvm” source package in Karmic: Fix Released

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.
#7 lore raw
In reply to a message not in the archive

@Wolfgang: Yes - Specifying, for example, /dev/vda triggers the use of virtio over the "standard" - and works exactly as you would expect EBS volumes to :)

There *is* still a bug preventing /dev/sdX from working .. but I've sank too much time into finding it at the moment, I'll probably dig in again later.

Signature · 53 lines
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 member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: Fix Released
Status in “eucalyptus” package in Ubuntu: Invalid
Status in “libvirt” package in Ubuntu: Invalid
Status in “qemu-kvm” package in Ubuntu: Fix Released
Status in “eucalyptus” source package in Karmic: Invalid
Status in “libvirt” source package in Karmic: Invalid
Status in “qemu-kvm” source package in Karmic: Fix Released

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.
#8 lore raw
In reply to a message not in the archive

I spent about 3 hr before I can find correct command to attach iSCSI /dev/vda to my instance euca-attach-volume vol-59A00634 -d /dev/vdb -i i-511908A5
I hope this tip save time for somebody.

Signature · 68 lines
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/432154

Title:
  dynamic block device attach/detach not functional with karmic KVM

Status in QEMU:
  Fix Released
Status in “eucalyptus” package in Ubuntu:
  Invalid
Status in “libvirt” package in Ubuntu:
  Invalid
Status in “qemu-kvm” package in Ubuntu:
  Fix Released
Status in “eucalyptus” source package in Karmic:
  Invalid
Status in “libvirt” source package in Karmic:
  Invalid
Status in “qemu-kvm” source package in Karmic:
  Fix Released

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/432154/+subscriptions