[karmic] libvirt fails to list node devices

Bug #453653 reported by Nathan Crawford
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: libvirt-bin

Ubuntu release: 9.10 server x86_64
libvirt-bin version: 0.7.0-1ubuntu11

Libvirt is unable to list node devices via virsh or virt-manager add hardware dialog.
It looks like libvirt relies on hal for finding devices:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522310

However, hal is being deprecated for Karmic:
http://www.ubuntu.com/testing/karmic/beta#hal%20deprecation

Steps to reproduce:
1. Install Karmic (I used the beta server cd, then updated to the latest packages)
2. Install ubuntu-virt-server
3. run 'virsh nodedev-list'

Expected results:
virsh should list devices on the system

Actual results:
'virsh noddev-list' outputs an error:
error: Failed to count node devices
error: this function is not supported by the hypervisor: virNodeNumOfDevices

ProblemType: Bug
Architecture: amd64
Date: Fri Oct 16 21:52:21 2009
DistroRelease: Ubuntu 9.10
Package: libvirt-bin 0.7.0-1ubuntu11
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.47-server
SourcePackage: libvirt
Uname: Linux 2.6.31-14-server x86_64

Revision history for this message
Nathan Crawford (njcrawford) wrote :
Revision history for this message
Chuck Short (zulcss) wrote :

Hi Nathan,

I was not able to reproduce this, is there anything extra you have to do to reproduce this:

Regards
chuck

======

chuck@kenny:~/work/server/bugs/karmic/rabbitmq-server/rabbitmq-server-1.6.0/debian$ virsh nodedev-list
Connecting to uri: qemu:///system
computer
net_00_19_d1_5f_3e_c0
net_00_19_d1_5f_3e_c0_0
net_2e_5d_97_22_f7_bf
net_72_97_bf_e3_96_f7
net_ce_31_09_e1_05_a9
net_computer_loopback
pci_10de_400
pci_1102_5
pci_11c1_5811
pci_1971_1011
pci_8086_104b
pci_8086_244e
pci_8086_2812
pci_8086_2822
pci_8086_2822_scsi_host
pci_8086_2822_scsi_host_0
pci_8086_2822_scsi_host_0_scsi_device_lun0
pci_8086_2822_scsi_host_0_scsi_host
pci_8086_2822_scsi_host_1
pci_8086_2822_scsi_host_1_scsi_device_lun0
pci_8086_2822_scsi_host_1_scsi_host
pci_8086_2822_scsi_host_2
pci_8086_2822_scsi_host_3
pci_8086_2822_scsi_host_4
pci_8086_2822_scsi_host_scsi_device_lun0
pci_8086_2822_scsi_host_scsi_host
pci_8086_2830
pci_8086_2831
pci_8086_2832
pci_8086_2834
pci_8086_2835
pci_8086_2836
pci_8086_283a
pci_8086_283e
pci_8086_283f
pci_8086_2847
pci_8086_284b
pci_8086_29a0
pci_8086_29a1
storage_model_CDRWDVD_TS_H493A
storage_model_DVD__RW_TS_H653A
storage_serial_ST3320620AS_5QF4H439
storage_serial_TEAC_USB_HS_CF_Card_00000309C665_0_0
storage_serial_TEAC_USB_HS_MS_Card_00000309C665_0_2
storage_serial_TEAC_USB_HS_SD_Card_00000309C665_0_3
storage_serial_TEAC_USB_HS_xD_SM_00000309C665_0_1
usb_device_1d6b_1_0000_00_1a_0
usb_device_1d6b_1_0000_00_1a_0_if0
usb_device_1d6b_1_0000_00_1a_1
usb_device_1d6b_1_0000_00_1a_1_if0
usb_device_1d6b_1_0000_00_1d_0
usb_device_1d6b_1_0000_00_1d_0_if0
usb_device_1d6b_1_0000_00_1d_1
usb_device_1d6b_1_0000_00_1d_1_if0
usb_device_1d6b_1_0000_00_1d_2
usb_device_1d6b_1_0000_00_1d_2_if0
usb_device_1d6b_2_0000_00_1a_7
usb_device_1d6b_2_0000_00_1a_7_if0
usb_device_1d6b_2_0000_00_1d_7
usb_device_1d6b_2_0000_00_1d_7_if0
usb_device_644_200_00000309C665
usb_device_644_200_00000309C665_if0
usb_device_644_200_00000309C665_if0_scsi_host
usb_device_644_200_00000309C665_if0_scsi_host_scsi_device_lun0
usb_device_644_200_00000309C665_if0_scsi_host_scsi_device_lun1
usb_device_644_200_00000309C665_if0_scsi_host_scsi_device_lun2
usb_device_644_200_00000309C665_if0_scsi_host_scsi_device_lun3
usb_device_644_200_00000309C665_if0_scsi_host_scsi_host
usb_device_d3d_1_noserial
usb_device_d3d_1_noserial_if0
usb_device_d3d_1_noserial_if1

Changed in libvirt (Ubuntu):
status: New → Incomplete
importance: Undecided → Low
Revision history for this message
Nathan Crawford (njcrawford) wrote :

Sorry, this was my bad... hal is not installed by default on the server flavor and ubuntu-virt-server doesn't bring it in either. I saw libhal1 was installed and assumed that would be enough. Installing hal and rebooting fixed the issue.

Changed in libvirt (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Janusz (janusz-m) wrote :

i have the same problem, HAL is installed
Ubuntu server 9.10 amd64

also i have a problem with PCI passthrough, maybe it is somehow connected
when i try to add a physical pci device to my VM:

get_real_device: /sys/bus/pci/devices/0000:08:08.0/config: Permission denied
init_assigned_device: Error: Couldn't get real device (08:08.0)!
Failed to initialize assigned device host=08:08.0

and of course:

# virsh nodedev-list
Connecting to uri: qemu:///system
error: Failed to count node devices
error: this function is not supported by the hypervisor: virNodeNumOfDevices

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Janusz, your permission denied issue seems different and likely a result of AppArmor protections. For pcidev and hostdev access on Karmic, you will likely need to adjust the AppArmor profile. Please see /usr/share/doc/libvirt-bin/README.Debian.gz for details.

Revision history for this message
Janusz (janusz-m) wrote :

yes, thanks, that's it, i disabled libvirt profile for apparmor and then ... i get another error ;)

Failed to assign irq for "08:08.0": Operation not permitted
Perhaps you are assigning a device that shares an IRQ with another device?
Failed to initialize assigned device host=08:08.0

but i guess it is a completely different story ;)

Revision history for this message
flashydave (dave-opensourcesolutions) wrote :

To answer janusz comments -
To reassign IRQ's etc you need:
(Recompiled) Kernel with
CONFIG_DMAR=y
CONFIG_DMAR_DEFAULT_ON=y

To check your available kernels:
grep DMAR /boot.config*
If you look at other launchpad entries you will see there has been discussion on this so it might have been resolved already.
Sadly Maverick Beta does not have it set.

Apparmor set up as follows:
/etc/apparmor.d/abstractions/libvirt-qemu needs to contain

# required for IRQ remapping with PCI Pass Through
capability sys_rawio,
# For hostdev access
/sys/devices/ r,
/sys/devices/** r,

Dave

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.