Sensei73 Posted November 16, 2014 Share Posted November 16, 2014 Hi there!! Help will be much appreciated!!!! My goal: A win 7 Vm with Sound card pass thr> What I've done so far ---> Windows in running...! 1st struggle --->I cannot change my machine definition to "pc-q35-2.1" I have this error: Error changing domain definition: internal error: PCI bus is not compatible with the device at 0000:00:1f.0. Device requires a PCI Express slot, which is not provided by bus 0000:00 0000:00:1f.0 correspond to 00:1f.0 ISA bridge: Intel Corporation Z68 Express Chipset Family LPC Controller (rev 05) My Xml <domain type='kvm'> <name>BidiWin</name> <uuid>8d030f78-e77c-504c-c70f-e4f2f702c8f9</uuid> <memory unit='KiB'>2097152</memory> <currentMemory unit='KiB'>524288</currentMemory> <vcpu placement='static'>2</vcpu> <os> <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type> <boot dev='hd'/> <bootmenu enable='no'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='host-passthrough'> <topology sockets='1' cores='2' threads='1'/> </cpu> <clock offset='localtime'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='yes'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/cache/.images/BidiWin.qcow2'/> <target dev='hda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'/> <controller type='pci' index='1' model='pci-bridge'> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </controller> <controller type='pci' index='2' model='pci-bridge'> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </controller> <interface type='bridge'> <mac address='52:54:00:48:af:0a'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0'> <listen type='address' address='0.0.0.0'/> </graphics> <video> <model type='cirrus' vram='9216' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> </domain> My sound card info: <device> <name>pci_0000_00_1b_0</name> <path>/sys/devices/pci0000:00/0000:00:1b.0</path> <parent>computer</parent> <capability type='pci'> <domain>0</domain> <bus>0</bus> <slot>27</slot> <function>0</function> <product id='0x1c20'>6 Series/C200 Series Chipset Family High Definition Audio Controller</product> <vendor id='0x8086'>Intel Corporation</vendor> <pci-express/> </capability> </device> If you need anythings else, I will respond as quickly as possible. Thanks in advance. Quote Link to comment
JustinChase Posted November 16, 2014 Share Posted November 16, 2014 What is the output from the vmMan plugin, devices, pci tab? i don't think you can passthru the whole controller Also, you need to add some qemu stuff at the end of the XML Also, you need more at the top of your XML. Here is my XML... <domain type='kvm' id='2' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>Windows8_Passthru</name> <uuid>2e151e44-f801-4773-a6df-bfb01b0812fb</uuid> <description>Windows8 with Passthru</description> <memory unit='KiB'>4194304</memory> <currentMemory unit='KiB'>4194304</currentMemory> <memoryBacking> <nosharepages/> <locked/> </memoryBacking> <vcpu placement='static'>2</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-q35-2.1'>hvm</type> <boot dev='hd'/> <bootmenu enable='no'/> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough'> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none' io='native'/> <source file='/mnt/disk/snapdisk/Windows8.qcow2'/> <backingStore/> <target dev='vdc' bus='virtio'/> <alias name='virtio-disk2'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/backup/Programs/WindowsISOs/en_windows_8_1_x64_dvd_2707217.iso'/> <backingStore/> <target dev='hda' bus='sata'/> <readonly/> <alias name='sata0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/backup/Programs/WindowsISOs/virtio-win-0.1-81.iso'/> <backingStore/> <target dev='sdd' bus='sata'/> <readonly/> <alias name='sata0-0-3'/> <address type='drive' controller='0' bus='0' target='0' unit='3'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <alias name='usb0'/> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <alias name='usb0'/> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <alias name='usb0'/> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x2'/> </controller> <controller type='sata' index='0'> <alias name='sata0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <controller type='pci' index='0' model='pcie-root'> <alias name='pcie.0'/> </controller> <controller type='pci' index='1' model='dmi-to-pci-bridge'> <alias name='pci.1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> </controller> <controller type='pci' index='2' model='pci-bridge'> <alias name='pci.2'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/> </controller> <interface type='bridge'> <mac address='00:16:3e:c8:c8:c8'/> <source bridge='br0'/> <target dev='vnet0'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> </interface> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x050d'/> <product id='0x0201'/> <address bus='3' device='3'/> </source> <alias name='hostdev0'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x045e'/> <product id='0x00db'/> <address bus='3' device='5'/> </source> <alias name='hostdev1'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x045e'/> <product id='0x0745'/> <address bus='3' device='6'/> </source> <alias name='hostdev2'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x0a12'/> <product id='0x0001'/> <address bus='3' device='7'/> </source> <alias name='hostdev3'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x147a'/> <product id='0xe03e'/> <address bus='3' device='4'/> </source> <alias name='hostdev4'/> </hostdev> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> </memballoon> </devices> <seclabel type='none' model='none'/> <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=01:00.1,bus=pcie.0'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=07:00.0,bus=pcie.0'/> </qemu:commandline> </domain> syslinux.cfg... default /syslinux/menu.c32 menu title Lime Technology prompt 0 timeout 50 label KVM/unRAID OS menu default kernel /bzimage append intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot label KVM/unRAID OS Safe Mode (no plugins) kernel /bzimage append initrd=/bzroot unraidsafemode label Memtest86+ kernel /memtest label Xen/unRAID OS kernel /syslinux/mboot.c32 append /xen --- /bzimage --- /bzroot label Xen/unRAID OS Safe Mode (no plugins) kernel /syslinux/mboot.c32 append /xen --- /bzimage --- /bzroot unraidsafemode the iommu part needs added, and you need to be sure to use intel or amd, depending on your CPU Here is my go file... #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & echo 192.168.20.150 media >>/etc/hosts /usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1 0000:07:00.0 /boot/config/plugins/snap/snap.sh -m snapdisk Finally, the output from vmMan > Devices > PCI tab... Device Identification Driver Vendor Product XML pci_0000_00_00_0 0x8086:0x0c00 hsw_uncore Intel Corporation Haswell DRAM Controller pci_0000_00_01_0 0x8086:0x0c01 pcieport Intel Corporation Haswell PCI Express x16 Controller pci_0000_01_00_0 0x10de:0x1244 vfio-pci NVIDIA Corporation GF116 [GeForce GTX 550 Ti] pci_0000_01_00_1 0x10de:0x0bee vfio-pci NVIDIA Corporation GF116 High Definition Audio Controller pci_0000_00_01_1 0x8086:0x0c05 pcieport Intel Corporation Haswell PCI Express x8 Controller pci_0000_02_00_0 0x11ab:0x7042 sata_mv Marvell Technology Group Ltd. 88SX7042 PCI-e 4-port SATA-II pci_0000_00_02_0 0x8086:0x0412 None Intel Corporation Haswell Integrated Graphics Controller pci_0000_00_03_0 0x8086:0x0c0c None Intel Corporation Haswell HD Audio Controller pci_0000_00_14_0 0x8086:0x8c31 xhci_hcd Intel Corporation Lynx Point USB xHCI Host Controller pci_0000_00_16_0 0x8086:0x8c3a None Intel Corporation Lynx Point MEI Controller #1 pci_0000_00_19_0 0x8086:0x153b e1000e Intel Corporation Ethernet Connection I217-V pci_0000_00_1a_0 0x8086:0x8c2d ehci-pci Intel Corporation Lynx Point USB Enhanced Host Controller #2 pci_0000_00_1b_0 0x8086:0x8c20 None Intel Corporation Lynx Point High Definition Audio Controller pci_0000_00_1c_0 0x8086:0x8c10 pcieport Intel Corporation Lynx Point PCI Express Root Port #1 pci_0000_00_1c_1 0x8086:0x8c12 pcieport Intel Corporation Lynx Point PCI Express Root Port #2 pci_0000_00_1c_2 0x8086:0x8c14 pcieport Intel Corporation Lynx Point PCI Express Root Port #3 pci_0000_05_00_0 0x1b21:0x0612 ahci ASMedia Technology Inc. ASM1062 Serial ATA Controller pci_0000_00_1c_4 0x8086:0x8c18 pcieport Intel Corporation Lynx Point PCI Express Root Port #5 pci_0000_06_00_0 0x1b21:0x0612 ahci ASMedia Technology Inc. ASM1062 Serial ATA Controller pci_0000_00_1c_5 0x8086:0x8c1a pcieport Intel Corporation Lynx Point PCI Express Root Port #6 pci_0000_07_00_0 0x1131:0x7160 vfio-pci Philips Semiconductors SAA7160 pci_0000_00_1d_0 0x8086:0x8c26 ehci-pci Intel Corporation Lynx Point USB Enhanced Host Controller #1 pci_0000_00_1f_0 0x8086:0x8c44 None Intel Corporation Lynx Point LPC Controller pci_0000_00_1f_2 0x8086:0x8c02 ahci Intel Corporation Lynx Point 6-port SATA Controller 1 [AHCI mode] pci_0000_00_1f_3 0x8086:0x8c22 None Intel Corporation Lynx Point SMBus Controller That should be everything you need to parse out what I've done, which you can modify for your needs. Quote Link to comment
Sensei73 Posted November 17, 2014 Author Share Posted November 17, 2014 Thanks for helping, I manage to get rid of my first struggle by changing my xml, now I need to move to my next one, get my sound card working. my syslinux: default /syslinux/menu.c32 menu title Lime Technology prompt 0 timeout 10 label unRAID OS menu default kernel /bzimage append intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot label unRAID OS Safe Mode (no plugins) kernel /bzimage append initrd=/bzroot unraidsafemode label Memtest86+ kernel /memtest label Xen/unRAID OS kernel /syslinux/mboot.c32 append /xen --- /bzimage --- /bzroot label Xen/unRAID OS Safe Mode (no plugins) kernel /syslinux/mboot.c32 append /xen --- /bzimage --- /bzroot unraidsafemode My go script: #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & #kvm /usr/local/sbin/vfio-bind 0000:00:1b.0 #Wait for the md devices to come online. while [[ ${LOOP:=30} -gt 1 && ! -b /dev/md1 ]] do (( LOOP=LOOP-1 )) echo "Waiting for /dev/md1 to come online ($LOOP)" sleep 1 done sleep 5 /boot/cache_dirs -w -U 0 my xml: <domain type='kvm'> <name>Biditest</name> <uuid>dda812ca-3de2-adac-a6c2-0914760ca54a</uuid> <memory unit='KiB'>2097152</memory> <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static'>2</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-q35-2.1'>hvm</type> <loader>/usr/share/qemu/bios.bin</loader> <boot dev='cdrom'/> <boot dev='hd'/> <bootmenu enable='no'/> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough'> <topology sockets='1' cores='2' threads='1'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/cache/.images/BidiWin.qcow2'/> <target dev='vdb' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/> </disk> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> </controller> <controller type='pci' index='0' model='pcie-root'/> <controller type='pci' index='1' model='dmi-to-pci-bridge'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> </controller> <controller type='pci' index='2' model='pci-bridge'> <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <interface type='bridge'> <mac address='52:54:00:55:1d:18'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0'> <listen type='address' address='0.0.0.0'/> </graphics> <video> <model type='cirrus' vram='9216' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> </memballoon> </devices> <seclabel type='none' model='none'/> </domain> and finally my pic output: Device Identification Driver Vendor Product XML pci_0000_00_00_0 0x8086:0x0100 snb_uncore Intel Corporation 2nd Generation Core Processor Family DRAM Controller pci_0000_00_01_0 0x8086:0x0101 pcieport Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port pci_0000_01_00_0 0x1000:0x0072 mpt2sas LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] pci_0000_00_01_1 0x8086:0x0105 pcieport Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port pci_0000_02_00_0 0x1000:0x0072 mpt2sas LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] pci_0000_00_02_0 0x8086:0x0102 None Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller pci_0000_00_1a_0 0x8086:0x1c2d ehci-pci Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 pci_0000_00_1b_0 0x8086:0x1c20 None Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller pci_0000_00_1c_0 0x8086:0x1c10 pcieport Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 pci_0000_00_1c_6 0x8086:0x1c1c pcieport Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 pci_0000_04_00_0 0x10ec:0x8168 r8169 Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller pci_0000_00_1c_7 0x8086:0x1c1e pcieport Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 as you can see, I don't have "vfio-pci" next to my sound card as you have. Quote Link to comment
JustinChase Posted November 17, 2014 Share Posted November 17, 2014 I'm not sure you can pass the onboard audio without also passing the onboard graphics, as I think they are probably in the same group. However, I've not tried, so maybe this will work. Change your xml to this... <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>Biditest</name> <uuid>dda812ca-3de2-adac-a6c2-0914760ca54a</uuid> <memory unit='KiB'>2097152</memory> <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static'>2</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-q35-2.1'>hvm</type> <loader>/usr/share/qemu/bios.bin</loader> <boot dev='cdrom'/> <boot dev='hd'/> <bootmenu enable='no'/> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough'> <topology sockets='1' cores='2' threads='1'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/cache/.images/BidiWin.qcow2'/> <target dev='vdb' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/> </disk> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> </controller> <controller type='pci' index='0' model='pcie-root'/> <controller type='pci' index='1' model='dmi-to-pci-bridge'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> </controller> <controller type='pci' index='2' model='pci-bridge'> <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <interface type='bridge'> <mac address='52:54:00:55:1d:18'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0'> <listen type='address' address='0.0.0.0'/> </graphics> <video> <model type='cirrus' vram='9216' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> </memballoon> </devices> <seclabel type='none' model='none'/> <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:1b.0,bus=pcie.0'/> </qemu:commandline> </domain> I just added a bit to the top line, and the last few qemu lines, everything else is unchanged. I would guess that should work. Quote Link to comment
Sensei73 Posted November 17, 2014 Author Share Posted November 17, 2014 thanks but I guess i found the problem... I need vt-d support right? and ... http://ark.intel.com/fr/products/53446/Intel-Core-i5-2320-Processor-6M-Cache-up-to-3_30-GHz :'( Quote Link to comment
JustinChase Posted November 17, 2014 Share Posted November 17, 2014 ha, yeah, you need VT-d to do hardware passthru. Quote Link to comment
Sensei73 Posted November 17, 2014 Author Share Posted November 17, 2014 Thanks anyway for helping!!!! I have 2 solutions.... changing my cpu or getting a usb speakers (that include a usb sound card). What I want, is to have a Windows Vm with sound output!!! Quote Link to comment
JustinChase Posted November 17, 2014 Share Posted November 17, 2014 I'd probably opt for a new CPU, as that probably gives you more options in the future. with VT-d, you could passthru any/all your stuff to any VM, which might come in handy in the future. Plus, probably more performance from a new CPU. Finally, probably not much more expensive for a new CPU than USB speakers, especially if you sell your current CPU. Quote Link to comment
reluctantflux Posted November 17, 2014 Share Posted November 17, 2014 Just make sure your motherboard also supports VT-d. I bought a new processor, and I needed to install a new bios to get VT-d on the board to work, but it broke other things like my Sata controller cards, so make sure that your board supports it out of the box without specialized bios roms. Quote Link to comment
JustinChase Posted November 17, 2014 Share Posted November 17, 2014 good point. I've had good luck with my ASRock board, as have others I've seen, and reports I've seen online elsewhere regarding VT-d passthru working. Quote Link to comment
Sensei73 Posted November 17, 2014 Author Share Posted November 17, 2014 thanks for the warning!!! As I need to switch to LGA1150 processor, now i'm looking for the cheapest Motherboard with 3 pci 16x (1 slot free for a video card and 2xIBM M1015 SAS card). It will be nice to have IPMI support also :-) Quote Link to comment
htpcnewbie Posted December 7, 2014 Share Posted December 7, 2014 OP - Sorry to hijack this thread but I presume your issue is solved. I am following the discussion here to get my Win7 KVM up. So far, I see that the usb keyboard passthru is working but anytime I try to pass the videocard, the VM doesn't start and get an error. The videocard address from the pci hw output seems to match what I have in the xml. Justin or anyone - can you please help? Checked/changes I have made so far: 1. Ensured vt-d is enabled in bios 2. updated /boot/config/syslinux/syslinux.cfg to enable "append intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot" 3. Created a vm template and checked that Win7 VM is running. Generated the xml and added sections toward the beginning and end as discussed in the above post 4. added the following vfio-bind in /boot/config/go "/usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1" to reflect the pcie address of the video and hdmi audio addresses (ran it interactively in the terminal and also rebooted the system) my xml: <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>win7x64vtdxml</name> <uuid>d756b6b7-8513-4e20-91b5-8cab1d4498bb</uuid> <description>win7x64vtd_xml</description> <memory unit='KiB'>13107200</memory> <currentMemory unit='KiB'>12091392</currentMemory> <vcpu placement='static'>4</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type> <boot dev='cdrom'/> <boot dev='hd'/> </os> <features> <acpi/> <apic/> </features> <clock offset='localtime'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='yes'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/disk/SSD1/vm/image/Win7x64.qcow2'/> <backingStore/> <target dev='hda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/disk/SSD1/vm/media/X17-24281.iso'/> <backingStore/> <target dev='hdc' bus='ide'/> <readonly/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/disk/SSD1/vm/media/virtio-win-0.1-81.iso'/> <backingStore/> <target dev='hdd' bus='ide'/> <readonly/> <alias name='ide0-1-1'/> <address type='drive' controller='0' bus='1' target='0' unit='1'/> </disk> <controller type='usb' index='0'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'> <alias name='pci.0'/> </controller> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <interface type='bridge'> <mac address='52:54:00:0e:6d:2d'/> <source bridge='br0'/> <target dev='vnet0'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/1'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/1'> <source path='/dev/pts/1'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0'> <listen type='address' address='0.0.0.0'/> </graphics> <video> <model type='cirrus' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x046d'/> <product id='0xc223'/> <address bus='3' device='4'/> </source> <alias name='hostdev0'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x046d'/> <product id='0xc226'/> <address bus='3' device='5'/> </source> <alias name='hostdev1'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x0458'/> <product id='0x0007'/> <address bus='3' device='6'/> </source> <alias name='hostdev2'/> </hostdev> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=01:00.1,bus=pcie.0'/> </qemu:commandline> </domain> In this xml, I cannot recognize what "value='ioh3420" is for, used the template what Justin had and also what I saw in another thread. Output from KVM > Devices > PCI Device Identification Driver Vendor Product XML pci_0000_00_00_0 0x8086:0x0c00 hsw_uncore Intel Corporation Haswell DRAM Controller pci_0000_00_01_0 0x8086:0x0c01 pcieport Intel Corporation Haswell PCI Express x16 Controller pci_0000_01_00_0 0x1002:0x68f9 vfio-pci AMD/ATI [Advanced Micro Devices, Inc.] Cedar [Radeon HD 5000/6000/7350 Series] pci_0000_01_00_1 0x1002:0xaa68 vfio-pci AMD/ATI [Advanced Micro Devices, Inc.] Cedar HDMI Audio [Radeon HD 5400/6300 Series] pci_0000_00_01_1 0x8086:0x0c05 pcieport Intel Corporation Haswell PCI Express x8 Controller pci_0000_02_00_0 0x1b4b:0x9485 mvsas Marvell Technology Group Ltd. Unknown pci_0000_00_02_0 0x8086:0x0412 None Intel Corporation Haswell Integrated Graphics Controller pci_0000_00_03_0 0x8086:0x0c0c None Intel Corporation Haswell HD Audio Controller pci_0000_00_14_0 0x8086:0x8cb1 xhci_hcd Intel Corporation Unknown pci_0000_00_16_0 0x8086:0x8cba None Intel Corporation Unknown pci_0000_00_19_0 0x8086:0x15a1 e1000e Intel Corporation Unknown pci_0000_00_1a_0 0x8086:0x8cad ehci-pci Intel Corporation Unknown pci_0000_00_1b_0 0x8086:0x8ca0 None Intel Corporation Unknown pci_0000_00_1c_0 0x8086:0x8c90 pcieport Intel Corporation Unknown pci_0000_00_1c_2 0x8086:0x8c94 pcieport Intel Corporation Unknown pci_0000_04_00_0 0x10ec:0x8168 r8169 Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller pci_0000_00_1c_3 0x8086:0x8c96 pcieport Intel Corporation Unknown pci_0000_05_00_0 0x1b21:0x1184 pcieport ASMedia Technology Inc. Unknown pci_0000_06_01_0 0x1b21:0x1184 pcieport ASMedia Technology Inc. Unknown pci_0000_06_03_0 0x1b21:0x1184 pcieport ASMedia Technology Inc. Unknown pci_0000_08_00_0 0x1b21:0x0612 ahci ASMedia Technology Inc. ASM1062 Serial ATA Controller pci_0000_06_05_0 0x1b21:0x1184 pcieport ASMedia Technology Inc. Unknown pci_0000_06_07_0 0x1b21:0x1184 pcieport ASMedia Technology Inc. Unknown pci_0000_0a_00_0 0x1b21:0x0612 ahci ASMedia Technology Inc. ASM1062 Serial ATA Controller pci_0000_00_1c_6 0x8086:0x8c9c pcieport Intel Corporation Unknown pci_0000_0b_00_0 0x1b21:0x1142 xhci_hcd ASMedia Technology Inc. Unknown pci_0000_00_1d_0 0x8086:0x8ca6 ehci-pci Intel Corporation Unknown pci_0000_00_1f_0 0x8086:0x8cc4 None Intel Corporation Unknown pci_0000_00_1f_2 0x8086:0x8c82 ahci Intel Corporation Unknown pci_0000_00_1f_3 0x8086:0x8ca2 None Intel Corporation Unknown What is the output from the vmMan plugin, devices, pci tab? i don't think you can passthru the whole controller Also, you need to add some qemu stuff at the end of the XML Also, you need more at the top of your XML. Here is my XML... <domain type='kvm' id='2' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>Windows8_Passthru</name> <uuid>2e151e44-f801-4773-a6df-bfb01b0812fb</uuid> <description>Windows8 with Passthru</description> <memory unit='KiB'>4194304</memory> <currentMemory unit='KiB'>4194304</currentMemory> <memoryBacking> <nosharepages/> <locked/> </memoryBacking> <vcpu placement='static'>2</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-q35-2.1'>hvm</type> <boot dev='hd'/> <bootmenu enable='no'/> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough'> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none' io='native'/> <source file='/mnt/disk/snapdisk/Windows8.qcow2'/> <backingStore/> <target dev='vdc' bus='virtio'/> <alias name='virtio-disk2'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/backup/Programs/WindowsISOs/en_windows_8_1_x64_dvd_2707217.iso'/> <backingStore/> <target dev='hda' bus='sata'/> <readonly/> <alias name='sata0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/backup/Programs/WindowsISOs/virtio-win-0.1-81.iso'/> <backingStore/> <target dev='sdd' bus='sata'/> <readonly/> <alias name='sata0-0-3'/> <address type='drive' controller='0' bus='0' target='0' unit='3'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <alias name='usb0'/> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <alias name='usb0'/> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <alias name='usb0'/> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x2'/> </controller> <controller type='sata' index='0'> <alias name='sata0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <controller type='pci' index='0' model='pcie-root'> <alias name='pcie.0'/> </controller> <controller type='pci' index='1' model='dmi-to-pci-bridge'> <alias name='pci.1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> </controller> <controller type='pci' index='2' model='pci-bridge'> <alias name='pci.2'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/> </controller> <interface type='bridge'> <mac address='00:16:3e:c8:c8:c8'/> <source bridge='br0'/> <target dev='vnet0'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> </interface> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x050d'/> <product id='0x0201'/> <address bus='3' device='3'/> </source> <alias name='hostdev0'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x045e'/> <product id='0x00db'/> <address bus='3' device='5'/> </source> <alias name='hostdev1'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x045e'/> <product id='0x0745'/> <address bus='3' device='6'/> </source> <alias name='hostdev2'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x0a12'/> <product id='0x0001'/> <address bus='3' device='7'/> </source> <alias name='hostdev3'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x147a'/> <product id='0xe03e'/> <address bus='3' device='4'/> </source> <alias name='hostdev4'/> </hostdev> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> </memballoon> </devices> <seclabel type='none' model='none'/> <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=01:00.1,bus=pcie.0'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=07:00.0,bus=pcie.0'/> </qemu:commandline> </domain> syslinux.cfg... default /syslinux/menu.c32 menu title Lime Technology prompt 0 timeout 50 label KVM/unRAID OS menu default kernel /bzimage append intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot label KVM/unRAID OS Safe Mode (no plugins) kernel /bzimage append initrd=/bzroot unraidsafemode label Memtest86+ kernel /memtest label Xen/unRAID OS kernel /syslinux/mboot.c32 append /xen --- /bzimage --- /bzroot label Xen/unRAID OS Safe Mode (no plugins) kernel /syslinux/mboot.c32 append /xen --- /bzimage --- /bzroot unraidsafemode the iommu part needs added, and you need to be sure to use intel or amd, depending on your CPU Here is my go file... #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & echo 192.168.20.150 media >>/etc/hosts /usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1 0000:07:00.0 /boot/config/plugins/snap/snap.sh -m snapdisk Finally, the output from vmMan > Devices > PCI tab... Device Identification Driver Vendor Product XML pci_0000_00_00_0 0x8086:0x0c00 hsw_uncore Intel Corporation Haswell DRAM Controller pci_0000_00_01_0 0x8086:0x0c01 pcieport Intel Corporation Haswell PCI Express x16 Controller pci_0000_01_00_0 0x10de:0x1244 vfio-pci NVIDIA Corporation GF116 [GeForce GTX 550 Ti] pci_0000_01_00_1 0x10de:0x0bee vfio-pci NVIDIA Corporation GF116 High Definition Audio Controller pci_0000_00_01_1 0x8086:0x0c05 pcieport Intel Corporation Haswell PCI Express x8 Controller pci_0000_02_00_0 0x11ab:0x7042 sata_mv Marvell Technology Group Ltd. 88SX7042 PCI-e 4-port SATA-II pci_0000_00_02_0 0x8086:0x0412 None Intel Corporation Haswell Integrated Graphics Controller pci_0000_00_03_0 0x8086:0x0c0c None Intel Corporation Haswell HD Audio Controller pci_0000_00_14_0 0x8086:0x8c31 xhci_hcd Intel Corporation Lynx Point USB xHCI Host Controller pci_0000_00_16_0 0x8086:0x8c3a None Intel Corporation Lynx Point MEI Controller #1 pci_0000_00_19_0 0x8086:0x153b e1000e Intel Corporation Ethernet Connection I217-V pci_0000_00_1a_0 0x8086:0x8c2d ehci-pci Intel Corporation Lynx Point USB Enhanced Host Controller #2 pci_0000_00_1b_0 0x8086:0x8c20 None Intel Corporation Lynx Point High Definition Audio Controller pci_0000_00_1c_0 0x8086:0x8c10 pcieport Intel Corporation Lynx Point PCI Express Root Port #1 pci_0000_00_1c_1 0x8086:0x8c12 pcieport Intel Corporation Lynx Point PCI Express Root Port #2 pci_0000_00_1c_2 0x8086:0x8c14 pcieport Intel Corporation Lynx Point PCI Express Root Port #3 pci_0000_05_00_0 0x1b21:0x0612 ahci ASMedia Technology Inc. ASM1062 Serial ATA Controller pci_0000_00_1c_4 0x8086:0x8c18 pcieport Intel Corporation Lynx Point PCI Express Root Port #5 pci_0000_06_00_0 0x1b21:0x0612 ahci ASMedia Technology Inc. ASM1062 Serial ATA Controller pci_0000_00_1c_5 0x8086:0x8c1a pcieport Intel Corporation Lynx Point PCI Express Root Port #6 pci_0000_07_00_0 0x1131:0x7160 vfio-pci Philips Semiconductors SAA7160 pci_0000_00_1d_0 0x8086:0x8c26 ehci-pci Intel Corporation Lynx Point USB Enhanced Host Controller #1 pci_0000_00_1f_0 0x8086:0x8c44 None Intel Corporation Lynx Point LPC Controller pci_0000_00_1f_2 0x8086:0x8c02 ahci Intel Corporation Lynx Point 6-port SATA Controller 1 [AHCI mode] pci_0000_00_1f_3 0x8086:0x8c22 None Intel Corporation Lynx Point SMBus Controller That should be everything you need to parse out what I've done, which you can modify for your needs. Quote Link to comment
JustinChase Posted December 7, 2014 Share Posted December 7, 2014 A couple of things. 1. You added the following vfio-bind in /boot/config/go "/usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1". This is unnecessary, and is probably causing problems. this is only necessary when running under XEN; but you're using KVM, so the line you added to syslinux.cfg is sufficient. 2. Your processor Q6600 (from your signature), doesn't list VT-d Capable in ark.intel.com. It shows as VT-x capable, but doesn't even list VT-d at all, so I'm not sure if it is or is not capable. I did a bit of searching, but couldn't find anything definitive. If it's not VT-d capable, you can't do PCI passthru. The fact that you got a USB keyboard working is a good sign. i'd remove the line from the go file, reboot,, and try again. 3. You can't have video passthru at the same time as a VNC connection, so once you think you have windows fully installed and updated, remove any VNC (graphic and video) sections of the xml and add the GPU passthru section, then start the VM. Finally, windows 7 has been very flaky for me. it ONLY works after a fresh boot of unRAID. It will not restart properly, and would not start after doing a VNC connection. So, whenever I needed/wanted to start my windows7 VM; I had to reboot the whole server. I thought many other things failed until I realized this fact. Quote Link to comment
htpcnewbie Posted December 7, 2014 Share Posted December 7, 2014 Thanks Justin and I spent this afternoon trying to troubleshoot this. Rebooted the server many times everytime I made a change and do not have a solution yet. I started a new topic so that I do not hijack this thread completely. The thread is here http://lime-technology.com/forum/index.php?topic=36715.new#new I have updated the signature to reflect the new build, sorry for the confusion. This is a i7-4790+Asrock Z97 extreme 6 mobo. Both are VT-d capable. I still cannot define the domain with the qemu arguments defined, I have to remove all of them for the VM to start. In the new thread, I have a also copied the updated xml with the vnc related video removed. Any suggestions I can try? Thanks! A couple of things. 1. You added the following vfio-bind in /boot/config/go "/usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1". This is unnecessary, and is probably causing problems. this is only necessary when running under XEN; but you're using KVM, so the line you added to syslinux.cfg is sufficient. 2. Your processor Q6600 (from your signature), doesn't list VT-d Capable in ark.intel.com. It shows as VT-x capable, but doesn't even list VT-d at all, so I'm not sure if it is or is not capable. I did a bit of searching, but couldn't find anything definitive. If it's not VT-d capable, you can't do PCI passthru. The fact that you got a USB keyboard working is a good sign. i'd remove the line from the go file, reboot,, and try again. 3. You can't have video passthru at the same time as a VNC connection, so once you think you have windows fully installed and updated, remove any VNC (graphic and video) sections of the xml and add the GPU passthru section, then start the VM. Finally, windows 7 has been very flaky for me. it ONLY works after a fresh boot of unRAID. It will not restart properly, and would not start after doing a VNC connection. So, whenever I needed/wanted to start my windows7 VM; I had to reboot the whole server. I thought many other things failed until I realized this fact. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.