Red Hat Bugzilla – Bug 1269446
unable to detach virtual function from the host
Last modified: 2015-10-17 01:13:22 EDT
Description of problem:
Unable to detach VF from the host.
Version-Release number of selected component (if applicable):
Kernel - Linux rhe7.1-hp-2 3.10.0-229.el7.x86_64 #1 SMP Thu Jan 29 18:37:38 EST 2015 x86_64 x86_64 x86_64 GNU/Linux
Handle 0x0009, DMI type 1, 27 bytes
Product Name: ProLiant DL380 Gen9
Version: Not Specified
Serial Number: SGH517XJX2
Wake-up Type: Power Switch
SKU Number: 719064-B21
Handle 0x00BD, DMI type 32, 11 bytes
System Boot Information
Status: No errors detected
How reproducible: every time
Steps to Reproduce:
1. Enabled intel_iommu=on in /etc/default/grub
2. echo 4 > /sys/bus/pci/devices/0000\:05\:00.0/sriov_numvfs
3. virsh nodedev-list | grep pci_0000_05
4. virsh nodedev-detach pci_0000_05_10_0
error: Failed to detach device pci_0000_05_10_0
error: Operation not supported: neither VFIO nor KVM device assignment is currently supported on this system
If connected with virt-manager without detaching - error
Error starting domain: unsupported configuration: host doesn't support passthrough of host PCI devices
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 125, in tmpcb
File "/usr/share/virt-manager/virtManager/domain.py", line 1393, in startup
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 966, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: unsupported configuration: host doesn't support passthrough of host PCI devices
The VF is supposed to detach from the Host manually and with virt-manager
1) What is the output of these two commands:
* "ls -l /dev/vfio/vfio"
* "ls -l /sys/kernel/iommu_groups/*"
2) does this change if you run "modprobe -i vfio" ?
Bug 1044595, which was resolved in time for RHEL7.0 was supposed to make vfio loaded and available by default, yet the error message you're reporting occurs only if either /sys/kernel/iommu_groups is missing or empty, or /dev/vfio/vfio doesn't exist, which I think shouldn't be the case.
Another suggestion from someone with a much better memory than me: check the BIOS configuration of the machine to make sure that VT-d is enabled there.
VT-d is enabled by default on the HP gen9 machines
[root@rhe7 Desktop]# ls -l /dev/vfio/vfio
crw-------. 1 root root 10, 196 Oct 7 21:46 /dev/vfio/vfio
[root@rhe7 Desktop]# ls -l /sys/kernel/iommu_groups/
This is exactly the symptoms displayed when intel_iommu=on is missing from the kernel commandline.
In the bug description you say that you've added that to /etc/default/grub, but have you run grub2-mkconfig (setting the appropriate output file) so that it actually gets added to the commandline used by grub during boot, and verified after booting that the commandline used for boot contained the option (this will be in the first several lines of the dmesg output)?
no, i had not run grub2-mkconfig
but now even after i ran it, i dont see any change.
Please attach dmesg from the system
Created attachment 1083652 [details]
Created attachment 1083653 [details]
Created attachment 1083654 [details]
grub2-mkconifg -o /boot/grub2/grub.cfg
The kernel commandline in dmesg indicates intel_iommu=on is not being enabled:
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.10.0-229.el7.x86_64 root=/dev/mapper/rhel-root ro nomodeset crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet LANG=en_US.UTF-8
Since your system is using UEFI, the output of grub2-mkconfig should be to /etc/grub2-efi.cfg. Please:
1) Run: grub2-mkconifg -o /etc/grub2-efi.cfg
And let us know if the problem is resolved.
wow, did not realize this even when i was seeing the OS not installing in GUI in the first place. I will try that, in addition to also checking if it works on legacy boot mode with the previous configurations.
thanks, this is working. Closing the bug.