Hey everyone and Happy Holidays!
I've been struggling with KVM and PCI-Passthrough over the past few days. I'm trying to pass through a Dvico Dual-Digital TV card into a Win 7 VM (media server) and an Intel Gb network card into a Fedora VM (firewall); but, am not having any success. I'm hoping that someone out there can answer these few questions (explanations follow):
1) According to my bios and the ASUS website, my motherboard supports VT-d (directed I/O). My trawling around the Interweb has revealed that some people out there don't believe that ASUS supports Linux well. I'm not sure what they mean by that (apart from the lack of Linux drivers?) since it's Linux that should support the M/B, but, they infer that ASUS doesn't implement VT-d to Intel's standard. Should I continue with my efforts on this M/B or should I be moving to a new one?
2) MOST IMPORTANT QUESTION: Whenever I try to start a VM with a PCI device attached, it fails. What does the “failed to retrieve chardev info in qemu with 'info chardev'” error message mean? (see below for log entries-if I knew what this meant, I might be able to figure out the fix)
3) I also try passing a USB device through to the VM. The first time that the device is passed through, it works. After a reboot of the VM, the USB device is not passed through. :-/ After a reboot of the host, I can pass the USB device into the VM again. Reboot of VM causes the USB device to not pass through again. I believe that these two issue are related. Any suggestions?
4) What motherboard do you recommend that best supports VT-d in Fedora/KVM?
Details:
Motherboard: ASUS P7H55-M Pro with the latest bios. (VT-x on, VT-d on, SpeedStep off) http://www.asus.com/product.aspx?P_ID=vOvmywqPUY78qUzh&templete=2
CPU: Intel I7 860 (supports VT-d) http://ark.intel.com/Product.aspx?id=41316
OS: Fedora 14 with latest kernel and packages. (tried both 32 & 64-bit)
Relevant kernel options: intel_iommu=on nousb
Libvirt Version: 0.8.3
Instructions followed:
1) http://www.linux-kvm.org/page/How_to_assign_devices_with_VT-d_in_KVM
2) http://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/...
3) Various and sundry forum articles
What I've tried:
1) I read that there was some possible issue with the assignment of IRQ's to the device so I freed up some with the nousb kernel option. This had no impact.
2) I blacklist the devices that I'm passing through so that the host doesn't load drivers.
3) Various bios configurations.
4) Burning incense and doing the sacred kernel dance.
Relevant entries in /var/log/messages (network card passthrough):
.
.
.
Dec 27 09:20:57 mediaserver02 kernel: [51565.935655] pci-stub 0000:07:01.0: claimed by stub
Dec 27 09:20:57 mediaserver02 kernel: [51565.993210] device vnet0 entered promiscuous mode
Dec 27 09:20:57 mediaserver02 kernel: [51565.993234] br0: new device vnet0 does not support netpoll (disabling)
Dec 27 09:20:57 mediaserver02 kernel: [51565.994545] br0: port 2(vnet0) entering learning state
Dec 27 09:20:57 mediaserver02 kernel: [51565.994548] br0: port 2(vnet0) entering learning state
Dec 27 09:20:57 mediaserver02 kernel: [51566.034225] pci-stub 0000:07:01.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
Dec 27 09:20:58 mediaserver02 kernel: [51567.088552] pci-stub 0000:07:01.0: PCI INT A disabled
Dec 27 09:20:58 mediaserver02 libvirtd: 09:20:58.965: error : qemuMonitorCommandWithHandler:255 : cannot send monitor command 'info chardev': Connection reset by peer
Dec 27 09:20:58 mediaserver02 libvirtd: 09:20:58.965: error : qemuMonitorTextGetPtyPaths:1922 : operation failed: failed to retrieve chardev info in qemu with 'info chardev'
Dec 27 09:20:58 mediaserver02 kernel: [51567.170494] pci-stub 0000:07:01.0: claimed by stub
Dec 27 09:20:59 mediaserver02 kernel: [51567.191437] pci-stub 0000:07:01.0: claimed by stub
Dec 27 09:20:59 mediaserver02 avahi-daemon[1483]: Registering new address record for fe80::fc54:ff:feb0:1f49 on vnet0.*.
Dec 27 09:21:00 mediaserver02 avahi-daemon[1483]: Withdrawing address record for fe80::fc54:ff:feb0:1f49 on vnet0.
Dec 27 09:21:00 mediaserver02 kernel: [51568.526884] br0: port 2(vnet0) entering learning state
Dec 27 09:21:00 mediaserver02 avahi-daemon[1483]: Withdrawing workstation service for vnet0.
Dec 27 09:21:00 mediaserver02 kernel: [51568.532435] device vnet0 left promiscuous mode
Dec 27 09:21:00 mediaserver02 kernel: [51568.532451] br0: port 2(vnet0) entering disabled state
.
.
.
I appreciate any response. Cheers.
I'm partially able to get my devices into the VM's. I followed this: http://fedoraproject.org/wiki/How_to_debug_Virtualization_problems#PCI_d... signment as well as setting relaxed_acs_check = 1 in /etc/libvirt/qemu.conf.
Now I just need to get the IRQ's sorted out. My Intel GB card passes through with not issue at all...even with shared interrupts. I guess it supports MSI.
Failed to assign device "hostdev0" : Device or resource busy
*** The driver 'pci-stub' is occupying your device 0000:01:06.0.
***
*** You can try the following commands to free it:
***
*** $ echo "10b7 9055" > /sys/bus/pci/drivers/pci-stub/new_id
*** $ echo "0000:01:06.0" > /sys/bus/pci/drivers/pci-stub/unbind
*** $ echo "0000:01:06.0" > /sys/bus/pci/drivers/pci-stub/bind
*** $ echo "10b7 9055" > /sys/bus/pci/drivers/pci-stub/remove_id
***
Failed to unmap assigned device region: Invalid argument
qemu-kvm: -device pci-assign,host=01:06.0,id=hostdev0,configfd=54,bus=pci.0,addr=0x6: Device 'pci-assign' could not be initialized
I've tried everything listed above, and I'm still no closer. Any suggestions?
Upgraded my Fedora 14 to the most updated code in the Rawhide virt repo, still no luck:
Feb 20 15:21:27 kvm kernel: [ 6739.024357] br2: port 1(eth2) entering disabled state
Feb 20 15:21:27 kvm avahi-daemon[1734]: Withdrawing workstation service for eth2.
Feb 20 15:21:27 kvm kernel: [ 6739.032371] device eth2 left promiscuous mode
Feb 20 15:21:27 kvm kernel: [ 6739.032400] br2: port 1(eth2) entering disabled state
Feb 20 15:21:27 kvm kernel: [ 6739.037964] pci-stub 0000:01:06.0: claimed by stub
Feb 20 15:21:27 kvm kernel: [ 6739.109228] device vnet0 entered promiscuous mode
Feb 20 15:21:27 kvm kernel: [ 6739.109311] br1: new device vnet0 does not support netpoll (disabling)
Feb 20 15:21:27 kvm kernel: [ 6739.113925] br1: port 2(vnet0) entering learning state
Feb 20 15:21:27 kvm kernel: [ 6739.113933] br1: port 2(vnet0) entering learning state
Feb 20 15:21:28 kvm libvirtd: 15:21:28.164: 12963: error : qemuMonitorJSONCommandWithFd:238 : cannot send monitor command '{"execute":"qmp_capabilities"}': Connection reset by peer
Feb 20 15:21:28 kvm kernel: [ 6739.785462] assign device 0:1:6.0 failed
Feb 20 15:21:28 kvm kernel: [ 6739.877442] 0000:01:06.0: 3Com PCI 3c905B Cyclone 100baseTx at ffffc900117d0c00.
Feb 20 15:21:28 kvm kernel: [ 6739.990614] br1: port 2(vnet0) entering learning state
Feb 20 15:21:28 kvm avahi-daemon[1734]: Withdrawing workstation service for vnet0.
Feb 20 15:21:28 kvm kernel: [ 6739.993331] device vnet0 left promiscuous mode
Feb 20 15:21:28 kvm kernel: [ 6739.993344] br1: port 2(vnet0) entering disabled state
Feb 20 15:21:28 kvm kernel: [ 6740.048885] eth2: setting half-duplex.
Feb 20 15:21:28 kvm kernel: [ 6740.053450] ADDRCONF(NETDEV_UP): eth2: link is not ready
Feb 20 15:21:28 kvm kernel: [ 6740.064341] device eth2 entered promiscuous mode
Feb 20 15:21:28 kvm libvirtd: 15:21:28.483: 12967: error : qemudDomainGetVcpus:5313 : Requested operation is not valid: cannot list vcpu pinning for an inactive domain
Feb 20 15:21:28 kvm libvirtd: 15:21:28.504: 12967: error : qemudDomainGetVcpus:5313 : Requested operation is not valid: cannot list vcpu pinning for an inactive domain
Feb 20 15:21:28 kvm libvirtd: 15:21:28.706: 12967: error : qemudDomainGetVcpus:5313 : Requested operation is not valid: cannot list vcpu pinning for an inactive domain
Post new comment