peter_sm Posted June 27, 2014 Share Posted June 27, 2014 Some info to get start with KVM for Windows 8.1 Passtrough GPU & USB with vfio-pci /usr/local/sbin/vfio-bind 0000:04:00.0 0000:04:00.1 0000:00:1d.0 Please give feedback what can be improved. EDIT New config file, this defiantly pass-trough my GPU/USB, see attached image. //Peter syslinux.cfg label KVM unRAID OS menu default kernel /bzimage append intel_iommu=on pcie_acs_override=downstream initrd=/bzroot acpi_sleep=s3_bios W8.1 domain file <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>windows8</name> <uuid>cc411d70-4463-4db7-bf36-d364c0cdaa9d</uuid> <memory unit='GB'>2</memory> <currentMemory unit='GB'>2</currentMemory> <vcpu placement='static'>2</vcpu> <cpu mode='host-passthrough'> </cpu> <os> <type arch='x86_64' machine='q35'>hvm</type> <loader>/usr/share/qemu/bios-256k.bin</loader> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> <hyperv> <relaxed state='on'/> <vapic state='on'/> <spinlocks state='on' retries='8191'/> </hyperv> </features> <clock offset='localtime'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='yes'/> <timer name='hypervclock' present='yes'/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <pm> <suspend-to-mem enabled='no'/> <suspend-to-disk enabled='no'/> </pm> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/vm_disk/KVM/Windows8/vm811.qcow2'/> <target dev='vda' bus='virtio'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/vm_disk/ISO/sv_windows_8_1_enterprise_x64_dvd_2972097.iso'/> <target dev='sdc' bus='sata'/> <readonly/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/vm_disk/ISO/virtio-win-0.1-81.iso'/> <target dev='sdd' bus='sata'/> <readonly/> </disk> <interface type='bridge'> <mac address='00:42:53:21:52:45'/> <source bridge='br0'/> <model type='virtio'/> </interface> <controller type='pci' index='0' model='pcie-root'/> <controller type='pci' index='1' model='dmi-to-pci-bridge'> </controller> <controller type='pci' index='2' model='pci-bridge'> </controller> <controller type='sata' index='0'> </controller> <controller type='virtio-serial' index='0'> </controller> <controller type='usb' index='0' model='ich9-ehci1'> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <master startport='2'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> </controller> <input type='mouse' bus='ps2'/> <memballoon model='virtio'> </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=04:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=04:00.1,bus=pcie.0'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:1d.0,bus=pcie.0'/> </qemu:commandline> </domain> Quote Link to comment
monkeytsar Posted June 27, 2014 Share Posted June 27, 2014 This is great, its the first real example of pass through I've seen but i have lots of questions could you please explain the additional line you've put into syslinux.cfg, especially this bit pci-stub.ids=1002:68f9,1002:aa68,8086:1e26,8086:1e20 I'm guessing this is telling the host to ignore or pass back these devices but how do these values (if they do at all) relate to this section of your domain file? <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='kvm-pci-assign,host=04:00.0,bus=root.1,addr=00.0,multifunction=on'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci-assign,host=04:00.1,bus=root.1,addr=00.1'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci-assign,host=00:1d.0,bus=pcie.0'/> </qemu:commandline> I can see that your passing through 3 devices, GPU, Audio and USB but is 1002:68f9 in the syslinux.cfg the same as 04:00.0 in the domain file and if so how do you find and map these values? Quote Link to comment
peter_sm Posted June 27, 2014 Author Share Posted June 27, 2014 To find out what to add in syslinyx and whats go in the xml, use lspci command I hope you get it more clearly now ;-) if not let me know. root@tower:~# lspci -knn 00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller [8086:0150] (rev 09) Subsystem: ASRock Incorporation Device [1849:0150] 00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port [8086:0151] (rev 09) Kernel driver in use: pcieport 00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller [8086:0162] (rev 09) Subsystem: ASRock Incorporation Device [1849:0162] 00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e31] Kernel driver in use: xhci_hcd 00:16.0 Communication controller [0780]: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 [8086:1e3a] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e3a] 00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e2d] Kernel driver in use: ehci-pci 00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller [8086:1e20] (rev 04) Subsystem: ASRock Incorporation Device [1849:8892] Kernel driver in use: pci-stub 00:1c.0 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 [8086:1e10] (rev c4) Kernel driver in use: pcieport 00:1c.5 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 6 [8086:1e1a] (rev c4) Kernel driver in use: pcieport 00:1c.6 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 7 [8086:1e1c] (rev c4) Kernel driver in use: pcieport 00:1c.7 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 8 [8086:1e1e] (rev c4) Kernel driver in use: pcieport 00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e26] Kernel driver in use: pci-stub 00:1f.0 ISA bridge [0601]: Intel Corporation Z77 Express Chipset LPC Controller [8086:1e44] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e44] 00:1f.2 SATA controller [0106]: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] [8086:1e02] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e02] Kernel driver in use: ahci Kernel modules: ahci 00:1f.3 SMBus [0c05]: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller [8086:1e22] (rev 04) Subsystem: ASRock Incorporation Device [1849:1e22] Kernel modules: i2c_i801 01:00.0 SCSI storage controller [0100]: LSI Logic / Symbios Logic SAS1068E PCI-Express Fusion-MPT SAS [1000:0058] (rev 08) Subsystem: IBM Device [1014:0394] Kernel driver in use: mptsas Kernel modules: mptsas 03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller [10ec:8168] (rev 06) Subsystem: ASRock Incorporation Motherboard (one of many) [1849:8168] Kernel driver in use: r8169 Kernel modules: r8169 04:00.0 VGA compatible controller [0300]: AMD/ATI [Advanced Micro Devices, Inc.] Cedar [Radeon HD 5000/6000/7350 Series] [1002:68f9] Subsystem: XFX Pine Group Inc. Device [1682:304e] Kernel driver in use: pci-stub 04:00.1 Audio device [0403]: AMD/ATI [Advanced Micro Devices, Inc.] Cedar HDMI Audio [Radeon HD 5400/6300 Series] [1002:aa68] Subsystem: XFX Pine Group Inc. Device [1682:aa68] Kernel driver in use: pci-stub 05:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01) Subsystem: ASRock Incorporation Device [1849:0612] Kernel driver in use: ahci Kernel modules: ahci Example my GPU including sound, red goes to syslinyx, and green to xml file 04:00.0 VGA compatible controller [0300]: AMD/ATI [Advanced Micro Devices, Inc.] Cedar [Radeon HD 5000/6000/7350 Series] [1002:68f9] Subsystem: XFX Pine Group Inc. Device [1682:304e] Kernel driver in use: pci-stub 04:00.1 Audio device [0403]: AMD/ATI [Advanced Micro Devices, Inc.] Cedar HDMI Audio [Radeon HD 5400/6300 Series] [1002:aa68] Subsystem: XFX Pine Group Inc. Device 1682:aa68] Kernel driver in use: pci-stub Quote Link to comment
monkeytsar Posted June 27, 2014 Share Posted June 27, 2014 Perfect, thats exactly the info I was after! Thank you. Quote Link to comment
JustinChase Posted June 27, 2014 Share Posted June 27, 2014 I'm trying to do my first KVM install, and this information has been helpful, thank you. When I first booted using KVM (was using XEN before), I got a repeating message in the console Waiting for /dev/disk/by-label/UNRAID (will check for 30 sec)... I'm assuming that's because the USB I picked is the one with the UNRAID thumbdrive plugged into it. Here is my syslinux.cfg line... label unRAID OS (KVM Support) menu default kernel /bzimage append intel_iommu=on quiet vfio_iommu_type1.allow_unsafe_interrupts=1 pci-stub.ids=1002:68da,1002:aa60,8086:8c26,8086:8c20 initrd=/bzroot acpi_sleep=s3_bios I can't remember exactly which one is USB controller, but the other 3 should be my HD5550 GPU, my HDMI Audio, and my 3D Audio devices. My xml is... <domain type='kvm'> <name>Windows7</name> <uuid>cc411d70-4463-4db7-bf36-d364c0cdbc9d</uuid> <memory unit='KiB'>6291456</memory> <currentMemory unit='KiB'>6291456</currentMemory> <vcpu placement='static'>4</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='q35'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </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'/> <source file='/mnt/cache/VM/Windows7/windows7.qcow2'/> <target dev='vda' bus='virtio'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/backup/Programs/Windows_ISOs/Windows7rc21.iso'/> <target dev='hdc' bus='ide'/> <readonly/> </disk> <disk type="file" device="cdrom"> <source file="/mnt/cache/VM/Windows7/virtio-win-0.1-81.iso" /> <target dev="hdd" bus="usb" /> <readonly /> </disk> <controller type='sata' index='0'> </controller> <controller type='pci' index='0' model='pcie-root'> </controller> <controller type='pci' index='1' model='dmi-to-pci-bridge'> </controller> <controller type='pci' index='2' model='pci-bridge'> </controller> <controller type='ide' index='0'> </controller> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0' bus='0' slot='4' function='7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0' bus='0' slot='4' function='0' multifunction='on'/> </controller> <hub type='usb'> <address type='usb' bus='0' port='1'/> </hub> <interface type='bridge'> <source bridge='br0'/> <model type='virtio'/> </interface> <input type='mouse' bus='ps2'/> <video> <model type='vmvga' vram='9216' heads='1'/> </video> <memballoon model='virtio'> </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='kvm-pci-assign,host=01:00.0,bus=root.1,addr=00.0,multifunction=on'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci-assign,host=01:00.1,bus=root.1,addr=00.1'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci-assign,host=00:1d.0,bus=pcie.0'/> </qemu:commandline> </domain> I'll remove the pci-stub.ids and reboot, then write down which one is which, then try again. My goal is to passthru one USB port, which I can use to plug a USB hub to, then connect my keyboard, mouse, etc to this HUB, but I'm not sure if this will work. Also, I'm not sure if I need to passthru all devices individually, like with XEN, or if whole controller passthru will/should work with KVM. (really, I just want to have a working windows VM until beta7 comes out, but I'm not winning right now ) Quote Link to comment
JustinChase Posted June 28, 2014 Share Posted June 28, 2014 Okay, I got unRAID to boot with an amended syslinux.cfg... label unRAID OS (KVM Support) kernel /bzimage append intel_iommu=on quiet vfio_iommu_type1.allow_unsafe_interrupts=1 pci-stub.ids=1002:68da,1002:aa60,8086:8c31,8086:8c20,1131:7160 initrd=/bzroot acpi_sleep=s3_bios I changed my USB controller to the xHCI USB controller, which I think is the USB3 controller. I tried typing on a keyboard connected to the HUB connected to the USB3 controller, and it didn't register, so I suspect I've gotten this correct now. Then I had to add a few VNC lines to my xml so I could connect/see the installation in VNC, which also worked. I was able to point to the device drivers iso and got windows to install. It eventually went to a light blue screen, and I thought it hung, but it eventually came back and continued with the installation. I'm currently installing 94 updates, and hopefully when finished, GPU passthru will be working, but as it stands now, I only have the ability to connect via VNC, which is not very helpful to me. Here is the xml file <domain type='kvm'> <name>Windows7</name> <uuid>cc411d70-4463-4db7-bf36-d364c0cdbc9d</uuid> <memory unit='KiB'>6291456</memory> <currentMemory unit='KiB'>6291456</currentMemory> <vcpu placement='static'>4</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='q35'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </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'/> <source file='/mnt/cache/VM/Windows7/windows7.qcow2'/> <target dev='vda' bus='virtio'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/backup/Programs/Windows_ISOs/Windows7rc21.iso'/> <target dev='hdc' bus='ide'/> <readonly/> </disk> <disk type="file" device="cdrom"> <source file="/mnt/cache/VM/Windows7/virtio-win-0.1-81.iso" /> <target dev="hdd" bus="usb" /> <readonly /> </disk> <graphics type='vnc' port='5900'> <listen type='address' address='0.0.0.0'/> </graphics> <controller type='sata' index='0'> </controller> <controller type='pci' index='0' model='pcie-root'> </controller> <controller type='pci' index='1' model='dmi-to-pci-bridge'> </controller> <controller type='pci' index='2' model='pci-bridge'> </controller> <controller type='ide' index='0'> </controller> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0' bus='0' slot='4' function='7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0' bus='0' slot='4' function='0' multifunction='on'/> </controller> <hub type='usb'> <address type='usb' bus='0' port='1'/> </hub> <interface type='bridge'> <source bridge='br0'/> <model type='virtio'/> </interface> <input type='mouse' bus='ps2'/> <video> <model type='vmvga' vram='9216' heads='1'/> </video> <memballoon model='virtio'> </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='kvm-pci-assign,host=01:00.0,bus=root.1,addr=00.0,multifunction=on'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci-assign,host=01:00.1,bus=root.1,addr=00.1'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci-assign,host=09:00.0,bus=root.1,addr=00.0'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci-assign,host=14:00.0,bus=root.1,addr=00.0'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci-assign,host=00:1b.0,bus=pcie.0'/> </qemu:commandline> </domain> I had to guess/extrapolate to get the devices all assigned in the qemu:arg value section at the bottom. It's very possible that I've messed this up. it's also possible that GPU passthru just won't work in Windows 7, which would be a shame. If anyone has any thoughts on the xml, or GPU passthru, I'm all ears. Quote Link to comment
JustinChase Posted June 28, 2014 Share Posted June 28, 2014 lspci -knn [code]00:00.0 Host bridge [0600]: Intel Corporation Haswell DRAM Controller [8086:0c00] (rev 06) Subsystem: ASRock Incorporation Device [1849:0c00] 00:01.0 PCI bridge [0604]: Intel Corporation Haswell PCI Express x16 Controller [8086:0c01] (rev 06) Kernel driver in use: pcieport 00:01.1 PCI bridge [0604]: Intel Corporation Haswell PCI Express x8 Controller [8086:0c05] (rev 06) Kernel driver in use: pcieport 00:01.2 PCI bridge [0604]: Intel Corporation Haswell PCI Express x4 Controller [8086:0c09] (rev 06) Kernel driver in use: pcieport 00:02.0 Display controller [0380]: Intel Corporation Haswell Integrated Graphics Controller [8086:0412] (rev 06) Subsystem: ASRock Incorporation Device [1849:0412] 00:03.0 Audio device [0403]: Intel Corporation Haswell HD Audio Controller [8086:0c0c] (rev 06) Subsystem: ASRock Incorporation Device [1849:0c0c] 00:14.0 USB controller [0c03]: Intel Corporation Lynx Point USB xHCI Host Controller [8086:8c31] (rev 04) Subsystem: ASRock Incorporation Device [1849:8c31] Kernel driver in use: pciback 00:16.0 Communication controller [0780]: Intel Corporation Lynx Point MEI Controller #1 [8086:8c3a] (rev 04) Subsystem: ASRock Incorporation Device [1849:8c3a] 00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection I217-V [8086:153b] (rev 04) Subsystem: ASRock Incorporation Device [1849:153b] Kernel driver in use: e1000e Kernel modules: e1000e 00:1a.0 USB controller [0c03]: Intel Corporation Lynx Point USB Enhanced Host Controller #2 [8086:8c2d] (rev 04) Subsystem: ASRock Incorporation Device [1849:8c2d] Kernel driver in use: ehci-pci 00:1b.0 Audio device [0403]: Intel Corporation Lynx Point High Definition Audio Controller [8086:8c20] (rev 04) Subsystem: ASRock Incorporation Device [1849:1020] Kernel driver in use: pciback 00:1c.0 PCI bridge [0604]: Intel Corporation Lynx Point PCI Express Root Port #1 [8086:8c10] (rev d4) Kernel driver in use: pcieport 00:1c.1 PCI bridge [0604]: Intel Corporation Lynx Point PCI Express Root Port #2 [8086:8c12] (rev d4) Kernel driver in use: pcieport 00:1c.2 PCI bridge [0604]: Intel Corporation Lynx Point PCI Express Root Port #3 [8086:8c14] (rev d4) Kernel driver in use: pcieport 00:1c.3 PCI bridge [0604]: Intel Corporation Lynx Point PCI Express Root Port #4 [8086:8c16] (rev d4) Kernel driver in use: pcieport 00:1c.4 PCI bridge [0604]: Intel Corporation Lynx Point PCI Express Root Port #5 [8086:8c18] (rev d4) Kernel driver in use: pcieport 00:1c.5 PCI bridge [0604]: Intel Corporation Lynx Point PCI Express Root Port #6 [8086:8c1a] (rev d4) Kernel driver in use: pcieport 00:1d.0 USB controller [0c03]: Intel Corporation Lynx Point USB Enhanced Host Controller #1 [8086:8c26] (rev 04) Subsystem: ASRock Incorporation Device [1849:8c26] Kernel driver in use: ehci-pci 00:1f.0 ISA bridge [0601]: Intel Corporation Lynx Point LPC Controller [8086:8c44] (rev 04) Subsystem: ASRock Incorporation Device [1849:8c44] 00:1f.2 SATA controller [0106]: Intel Corporation Lynx Point 6-port SATA Controller 1 [AHCI mode] [8086:8c02] (rev 04) Subsystem: ASRock Incorporation Device [1849:8c02] Kernel driver in use: ahci Kernel modules: ahci 00:1f.3 SMBus [0c05]: Intel Corporation Lynx Point SMBus Controller [8086:8c22] (rev 04) Subsystem: ASRock Incorporation Device [1849:8c22] Kernel modules: i2c_i801 01:00.0 VGA compatible controller [0300]: AMD/ATI [Advanced Micro Devices, Inc.] Redwood LE [Radeon HD 5550] [1002:68da] Subsystem: XFX Pine Group Inc. Device [1682:3080] Kernel driver in use: pciback 01:00.1 Audio device [0403]: AMD/ATI [Advanced Micro Devices, Inc.] Redwood HDMI Audio [Radeon HD 5000 Series] [1002:aa60] Subsystem: XFX Pine Group Inc. Device [1682:aa60] Kernel driver in use: pciback 03:00.0 SCSI storage controller [0100]: Marvell Technology Group Ltd. 88SX7042 PCI-e 4-port SATA-II [11ab:7042] (rev 02) Subsystem: Marvell Technology Group Ltd. Device [11ab:11ab] Kernel driver in use: sata_mv Kernel modules: sata_mv 06:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01) Subsystem: ASRock Incorporation Device [1849:0612] Kernel driver in use: ahci Kernel modules: ahci 07:00.0 Ethernet controller [0200]: Intel Corporation I211 Gigabit Network Connection [8086:1539] (rev 03) Subsystem: ASRock Incorporation Device [1849:1539] Kernel driver in use: igb Kernel modules: igb 08:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01) Subsystem: ASRock Incorporation Device [1849:0612] Kernel driver in use: ahci Kernel modules: ahci 09:00.0 Multimedia controller [0480]: Philips Semiconductors SAA7160 [1131:7160] (rev 02) Subsystem: Avermedia Technologies Inc Device [1461:3055] Kernel driver in use: pciback [/code] Quote Link to comment
peter_sm Posted June 28, 2014 Author Share Posted June 28, 2014 I started from scratch, and I see some issue to pass trough GPU now :-( need to nail this down.......... it was defiantly working before, might bee that I added some USB controller //Peter Quote Link to comment
JustinChase Posted June 28, 2014 Share Posted June 28, 2014 I'm still installing updates, but have been reading up on this in the meantime. I made some changes to the xml file, including changing the image to sata, instead of ide. I hope this speeds things up, because downloading and installing updates is taking forever. <domain type='kvm'> <name>Windows7</name> <uuid>cc411d70-4463-4db7-bf36-d364c0cdbc9d</uuid> <memory unit='KiB'>6291456</memory> <currentMemory unit='KiB'>6291456</currentMemory> <vcpu placement='static'>4</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='q35'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </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='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/backup/Programs/Windows_ISOs/Windows7rc21.iso'/> <target dev='hdc' bus='sata'/> <readonly/> </disk> <disk type="file" device="cdrom"> <source file="/mnt/cache/VM/Windows7/virtio-win-0.1-81.iso" /> <target dev="hdd" bus="sata" /> <readonly /> </disk> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/cache/VM/Windows7/windows7.qcow2'/> <target dev='vda' bus='virtio'/> </disk> <controller type='sata' index='0'> <alias name='sata0'/> </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='pcie.1'/> </controller> <controller type='pci' index='2' model='pci-bridge'> <alias name='pcie.2'/> </controller> <controller type='usb' index='0' model='ich9-ehci1'> <alias name='usb0'/> <address type='pci' domain='0' bus='0' slot='4' function='7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <alias name='usb0'/> <master startport='0'/> <address type='pci' domain='0' bus='0' slot='4' function='0' multifunction='on'/> </controller> <controller type='ide' index='0'> <alias name='ide0'/> </controller> <hub type='usb'/> <interface type='bridge'> <source bridge='br0'/> <mac address='00:16:3e:c7:c7:c7'/> <model type='virtio'/> </interface> <input type='mouse' bus='usb'/> <input type='keyboard' bus='usb'/> <graphics type='vnc' port='5900'> <listen type='address' address='0.0.0.0'/> </graphics> # <video> # <model type='vga'/> # </video> <memballoon model='virtio'/> </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:arg value='-device'/> <qemu:arg value='vfio-pci,host=09:00.0,bus=pcie.0'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=14:00.0,bus=pcie.0'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:1b.0,bus=pcie.0'/> </qemu:commandline> </domain> I haven't restarted windows with this xml yet, but I hope it allows GPU passthru now. if not, I'll look again later this weekend, if no one has any suggestions. Quote Link to comment
peter_sm Posted June 28, 2014 Author Share Posted June 28, 2014 My issue might be that the GPU needs to be reset, I cant boot unraid right now, doing a parity check at the moment. //Peter Quote Link to comment
peter_sm Posted June 28, 2014 Author Share Posted June 28, 2014 New updated config file //P Quote Link to comment
JustinChase Posted June 28, 2014 Share Posted June 28, 2014 New updated config file //P Care to share? I'm still not having any luck here. Quote Link to comment
peter_sm Posted June 28, 2014 Author Share Posted June 28, 2014 First post are updated :-) Sent from my iPhone using Tapatalk 2 Quote Link to comment
JustinChase Posted June 28, 2014 Share Posted June 28, 2014 Ah, thanks. I just noticed that a minute ago I made some more changes to my xml file, and will test right now. fingers crossed!!! **No luck** With this line... <input type='mouse' bus='usb'/> i get this... root@media:/mnt/cache/VM/Windows7# virsh create windows7.xml error: Failed to create domain from windows7.xml error: unsupported configuration: Can't add USB input device. USB bus is disabled With this line... <input type='mouse' bus='usb'/> i get this... root@media:/mnt/cache/VM/Windows7# virsh create windows7.xml error: Failed to create domain from windows7.xml error: internal error: unknown input bus type 'tablet' and with this line... <input type='mouse' bus='usb'/> i get this... root@media:/mnt/cache/VM/Windows7# virsh create windows7.xml error: Failed to create domain from windows7.xml error: internal error: unknown input bus type 'tablet' Quote Link to comment
peter_sm Posted June 28, 2014 Author Share Posted June 28, 2014 what happens if you do this command ? I do .... virsh define windows8.xml and then virsh start windows8 EDIT with virsh create windows8.xml Works with no issue as well, maybe you did add something bad to the xml file ? Quote Link to comment
JustinChase Posted June 28, 2014 Share Posted June 28, 2014 I get root@media:/mnt/cache/VM/Windows7# virsh define windows7.xml Domain Windows7 defined from windows7.xml Quote Link to comment
peter_sm Posted June 28, 2014 Author Share Posted June 28, 2014 And then try this command a virsh start Windows7 Quote Link to comment
JustinChase Posted June 28, 2014 Share Posted June 28, 2014 root@media:/mnt/cache/VM/Windows7# virsh start Windows7 error: Failed to start domain Windows7 error: internal error: early end of file from monitor: possible problem: qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: error opening /dev/vfio/1: No such file or directory qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: failed to get group 1 qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device initialization failed. qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device 'vfio-pci' could not be initialized Quote Link to comment
JustinChase Posted June 28, 2014 Share Posted June 28, 2014 and if I change <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/> to <qemu:arg value='kvm-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/> I get this... root@media:/mnt/cache/VM/Windows7# virsh start Windows7 error: Failed to start domain Windows7 error: internal error: early end of file from monitor: possible problem: qemu-system-x86_64: -device kvm-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: 'kvm-pci' is not a valid device model name Quote Link to comment
peter_sm Posted June 28, 2014 Author Share Posted June 28, 2014 Post your config file Sent from my iPhone using Tapatalk 2 Quote Link to comment
peter_sm Posted June 28, 2014 Author Share Posted June 28, 2014 vfio wont work, need more fixes. Below messages is some missing command in your config file. error: internal error: early end of file from monitor: possible problem: You need this kvm-pci-assign //Peter Quote Link to comment
JustinChase Posted June 28, 2014 Share Posted June 28, 2014 <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>Windows7</name> <uuid>cc411d70-4463-4db7-bf36-d364c0cdbc9d</uuid> <memory unit='GB'>3</memory> <currentMemory unit='GB'>3</currentMemory> <vcpu placement='static'>2</vcpu> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='q35'>hvm</type> <boot dev='hd'/> </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'/> <source file='/mnt/cache/VM/Windows7/windows7.qcow2'/> <target dev='vda' bus='virtio'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/backup/Programs/Windows_ISOs/Windows7rc21.iso'/> <target dev='sdc' bus='sata'/> <readonly/> </disk> <disk type="file" device="cdrom"> <source file="/mnt/cache/VM/Windows7/virtio-win-0.1-81.iso" /> <target dev="sdd" bus="sata" /> <readonly /> </disk> <controller type='sata' index='0'> <alias name='sata0'/> </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='pcie.1'/> </controller> <controller type='pci' index='2' model='pci-bridge'> <alias name='pcie.2'/> </controller> <controller type='usb' index='0' model='ich9-ehci1'> <alias name='usb0'/> <address type='pci' domain='0' bus='0' slot='4' function='7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <alias name='usb0'/> <master startport='0'/> <address type='pci' domain='0' bus='0' slot='4' function='0' multifunction='on'/> </controller> <controller type='ide' index='0'> <alias name='ide0'/> </controller> <hub type='usb'/> <interface type='bridge'> <source bridge='br0'/> <mac address='00:16:3e:c7:c7:c7'/> <model type='virtio'/> </interface> <input type='mouse' bus='ps2'/> <video> <model type='vmvga' vram='9216' heads='1'/> </video> <memballoon model='virtio'/> # <graphics type='vnc' port='5900'> # <listen type='address' address='0.0.0.0'/> # </graphics> </devices> <seclabel type='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='kvm-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci,host=01:00.1,bus=root.1,addr=00.1'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci,host=09:00.0,bus=pcie.0'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci,host=14:00.0,bus=pcie.0'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:1b.0,bus=pcie.0'/> </qemu:commandline> </domain> Quote Link to comment
JustinChase Posted June 28, 2014 Share Posted June 28, 2014 Meh, I'm giving up. Until KVM is better supported, and there are some other sample xml files, I'm not going to keep banging my head against this wall. The syntax is poorly documented, and seems to be very system dependent, so your file just doesn't really work for my system. Thanks for your input, I'm glad it's working for you. *In fact, I think I'm just going to buy some memory and get my old HTPC working again and give up on virtualization. It's never worked right for me, and I just don't have the time or energy to fight this fight; life is too short. Quote Link to comment
grumpybutfun Posted June 28, 2014 Share Posted June 28, 2014 *In fact, I think I'm just going to buy some memory and get my old HTPC working again and give up on virtualization. It's never worked right for me, and I just don't have the time or energy to fight this fight; life is too short. LOL! I feel for you and have been there myself. Once Jonp and company get the Kernel, Xen and KVM patches applied and kernel boot options in the next release I think you will have better success with Xen or KVM with Video PCI Passthrough. As far as user experience goes... Sucks doing it command line. KVM (is more customizable) which makes it more complicated to set up / learn than Xen. Problem with Xen and KVM, anytime someone develops a WebGUI... Then up making it a commercial product instead of making it opensource. The 2 or 3 open source ones available are buggy and not ready for primetime. Hopefully that is what Jonp and Company work on once they iron out all the Linux Kernel, Linux OS, Xen / KVM stuff. Quote Link to comment
JustinChase Posted June 29, 2014 Share Posted June 29, 2014 So, I've tried to start fresh. I took everything out of the xml, and ended up having to install windows from scratch again, as the windows7.qcow2 file I had finished all the updates on was now not recognized as a qcow2 file type. Anyway, I got windows installing fine, then installed the first batch of updated. After all the updates were installed, i shut down windows. Then I started adding lines to the xml, and restarting windows. Eventually I got everything added back in that I thought I'd need to have passthru working, but nothing is available in windows, and I'm still able to access with VNC. I thought I'd remove the VNC section to see if that would allow GPU passthru, but since no other devices are passed thru, I suspect there is something else wrong. Here is my xml file, in case anyone can see where I'm going wrong. <domain type='kvm'> <name>windows7</name> <uuid>3baf925d-74d8-4806-a6fe-330d911f28ce</uuid> <memory unit='GB'>4</memory> <currentMemory unit='GB'>4</currentMemory> <vcpu>2</vcpu> <os> <type arch='x86_64' machine='q35'>hvm</type> <loader>/usr/share/qemu/bios-256k.bin</loader> <boot dev='hd'/> </os> <features> <acpi/> <apic/> </features> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <!-- VIRTUAL DISK (IMG)--> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/mnt/cache/VM/Windows7/windows7.qcow2'/> <target dev='vda' bus='virtio'/> </disk> <!-- VIRTUAL CD-ROM (ISO) --> <disk type='file' device='cdrom'> <source file='/mnt/user/backup/Programs/Windows_ISOs/Windows7rc21.iso'/> <target dev='sdc' bus='sata'/> <readonly/> </disk> <!-- VIRTUAL CD-ROM (ISO) --> <disk type="file" device="cdrom"> <source file="/mnt/cache/VM/Windows7/virtio-win-0.1-81.iso" /> <target dev="sdd" bus="sata" /> <readonly /> </disk> <controller type='sata' index='0'> </controller> <controller type='pci' index='0' model='pcie-root'> </controller> <controller type='pci' index='1' model='dmi-to-pci-bridge'> </controller> <controller type='pci' index='2' model='pci-bridge'> </controller> <controller type='usb' index='0' model='none'> </controller> <graphics type='vnc' port='5900'> <listen type='address' address='0.0.0.0'/> </graphics> # <video> # <model type='vmvga' vram='9216' heads='1'/> # </video> <interface type='bridge'> <source bridge='br0'/> <mac address='00:16:3e:c7:c7:c7'/> </interface> <emulator>/usr/bin/qemu-system-x86_64</emulator> <input type='mouse' bus='ps2'/> </devices> <seclabel type='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='kvm-pci-assign,host=01:00.0,bus=root.1,addr=00.0'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci-assign,host=01:00.1,bus=root.1,addr=00.1'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci-assign,host=09:00.0,bus=pcie.0'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci-assign,host=14:00.0,bus=pcie.0'/> <qemu:arg value='-device'/> <qemu:arg value='kvm-pci-assign,host=00:1b.0,bus=pcie.0'/> </qemu:commandline> </domain> Here is my syslinux.cfg also... label unRAID OS (KVM Support) kernel /bzimage append intel_iommu=on quiet vfio_iommu_type1.allow_unsafe_interrupts=1 pci-stub.ids=1002:68da,1002:aa60,8086:8c31,8086:8c20,1131:7160 initrd=/bzroot acpi_sleep=s3_bios 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.