April 20, 201511 yr unRAID OS Version: unRAID 6 Beta 15 Description: Editing a KVM Windows 10 VM originally created in beta 14b does not retain all of the pass-through settings when using the GUI. How to reproduce: Edit a VM that was created under a previous beta using the new GUI. This VM had GPU w/ audio pass-through and USB pass-through of host 01:00.0 01:00.1 and 00:14.0. All of the original pass-through options load properly into the form. Saving the VM and comparing the new XML file to the old XML shows that pass-through of the GPU audio device and USB are not listed in the <qemu:commandline> section. Expected results: I expected to see the GPU audio device host 01:00.1 line in the <qemu:commandline> section. I'm guessing that the USB bus was not listed in the USB section probably due to being binded already in the go file. Actual results: No entries were listed in the <qemu:commandline> section for host 01:00.1 and 00:14.0 devices. Other information: I'm not sure if this is an actual defect or not. Editing a VM that was created by XML file method on a previous beta might not be fully supported. If that's the case, then this thread could be deleted or marked as solved. The VM actually boots and seems to work just fine. There is no audio device or USB bus though. XML used for this VM in beta 14: <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>Win10Test</name> <uuid>b2444916-caa2-a6b8-10ab-162215a8f10f</uuid> <description>Win 10 Latest</description> <memory unit='KiB'>4194304</memory> <currentMemory unit='KiB'>4194304</currentMemory> <vcpu placement='static'>4</vcpu> <cputune> <vcpupin vcpu='0' cpuset='4'/> <vcpupin vcpu='1' cpuset='5'/> <vcpupin vcpu='2' cpuset='6'/> <vcpupin vcpu='3' cpuset='7'/> </cputune> <os> <type arch='x86_64' machine='pc-q35-2.1'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough'> <topology sockets='2' cores='2' threads='1'/> </cpu> <clock offset='localtime'/> <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/VMs/KVM/Win10Test/Win10Test.qcow2'/> <target dev='hda' bus='virtio'/> <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/Programs/DreamSpark/Windows 10 Technical Preview - 9926/Windows10_TechnicalPreview_x64_EN-US_9926.iso'/> <target dev='hdc' bus='sata'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </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> <interface type='bridge'> <mac address='52:54:00:d3:ed:9e'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> </interface> <memballoon model='virtio'> <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=00:14.0,bus=root.1,addr=00.1'/> </qemu:commandline> </domain> XML created for this VM in beta 15 using the new GUI for editing VM's: <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>Win10Test</name> <uuid>b2444916-caa2-a6b8-10ab-162215a8f10f</uuid> <description>Win 10 Latest</description> <memory unit='KiB'>4194304</memory> <currentMemory unit='KiB'>4194304</currentMemory> <memoryBacking> <nosharepages/> <locked/> </memoryBacking> <vcpu placement='static'>4</vcpu> <cputune> <vcpupin vcpu='0' cpuset='4'/> <vcpupin vcpu='1' cpuset='5'/> <vcpupin vcpu='2' cpuset='6'/> <vcpupin vcpu='3' cpuset='7'/> </cputune> <os> <type arch='x86_64' machine='pc-q35-2.2'>hvm</type> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough'> <topology sockets='1' cores='4' threads='1'/> </cpu> <clock offset='localtime'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </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' cache='none' io='native'/> <source file='/mnt/cache/VMs/KVM/Win10Test/Win10Test.qcow2'/> <target dev='hda' bus='virtio'/> <boot order='1'/> <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/cache/VMs/KVM/Win10Test/Win10Test.qcow2'/> <target dev='hda' bus='sata'/> <readonly/> <boot order='2'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </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> <interface type='bridge'> <mac address='52:54:00:d3:ed:9e'/> <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> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/> </source> <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x02' 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=2,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=01:00.0,bus=pcie.0,multifunction=on,x-vga=on'/> </qemu:commandline> </domain> In my go file, I have used the following entry since beta 14: /usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1 0000:00:14.0 In my syslinux.cfg file, I have used the following entry since beta 14: append pcie_acs_override=downstream initrd=/bzroot Gary
April 20, 201511 yr I'm noticing the same thing. If any details of my setup are needed, please let me know. Also, if I add the audio device through the gui, then modify the xml to passthrough 02:00.1, the gui adds it to the 2nd audio passthrough device.
April 21, 201511 yr unRAID OS Version: unRAID 6 Beta 15 Description: Editing a KVM Windows 10 VM originally created in beta 14b does not retain all of the pass-through settings when using the GUI. How to reproduce: Edit a VM that was created under a previous beta using the new GUI. This VM had GPU w/ audio pass-through and USB pass-through of host 01:00.0 01:00.1 and 00:14.0. All of the original pass-through options load properly into the form. Saving the VM and comparing the new XML file to the old XML shows that pass-through of the GPU audio device and USB are not listed in the <qemu:commandline> section. Expected results: I expected to see the GPU audio device host 01:00.1 line in the <qemu:commandline> section. I'm guessing that the USB bus was not listed in the USB section probably due to being binded already in the go file. Actual results: No entries were listed in the <qemu:commandline> section for host 01:00.1 and 00:14.0 devices. Other information: I'm not sure if this is an actual defect or not. Editing a VM that was created by XML file method on a previous beta might not be fully supported. If that's the case, then this thread could be deleted or marked as solved. The VM actually boots and seems to work just fine. There is no audio device or USB bus though. XML used for this VM in beta 14: <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>Win10Test</name> <uuid>b2444916-caa2-a6b8-10ab-162215a8f10f</uuid> <description>Win 10 Latest</description> <memory unit='KiB'>4194304</memory> <currentMemory unit='KiB'>4194304</currentMemory> <vcpu placement='static'>4</vcpu> <cputune> <vcpupin vcpu='0' cpuset='4'/> <vcpupin vcpu='1' cpuset='5'/> <vcpupin vcpu='2' cpuset='6'/> <vcpupin vcpu='3' cpuset='7'/> </cputune> <os> <type arch='x86_64' machine='pc-q35-2.1'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough'> <topology sockets='2' cores='2' threads='1'/> </cpu> <clock offset='localtime'/> <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/VMs/KVM/Win10Test/Win10Test.qcow2'/> <target dev='hda' bus='virtio'/> <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/Programs/DreamSpark/Windows 10 Technical Preview - 9926/Windows10_TechnicalPreview_x64_EN-US_9926.iso'/> <target dev='hdc' bus='sata'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </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> <interface type='bridge'> <mac address='52:54:00:d3:ed:9e'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> </interface> <memballoon model='virtio'> <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=00:14.0,bus=root.1,addr=00.1'/> </qemu:commandline> </domain> XML created for this VM in beta 15 using the new GUI for editing VM's: <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>Win10Test</name> <uuid>b2444916-caa2-a6b8-10ab-162215a8f10f</uuid> <description>Win 10 Latest</description> <memory unit='KiB'>4194304</memory> <currentMemory unit='KiB'>4194304</currentMemory> <memoryBacking> <nosharepages/> <locked/> </memoryBacking> <vcpu placement='static'>4</vcpu> <cputune> <vcpupin vcpu='0' cpuset='4'/> <vcpupin vcpu='1' cpuset='5'/> <vcpupin vcpu='2' cpuset='6'/> <vcpupin vcpu='3' cpuset='7'/> </cputune> <os> <type arch='x86_64' machine='pc-q35-2.2'>hvm</type> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-passthrough'> <topology sockets='1' cores='4' threads='1'/> </cpu> <clock offset='localtime'> <timer name='rtc' tickpolicy='catchup'/> <timer name='pit' tickpolicy='delay'/> <timer name='hpet' present='no'/> </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' cache='none' io='native'/> <source file='/mnt/cache/VMs/KVM/Win10Test/Win10Test.qcow2'/> <target dev='hda' bus='virtio'/> <boot order='1'/> <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/cache/VMs/KVM/Win10Test/Win10Test.qcow2'/> <target dev='hda' bus='sata'/> <readonly/> <boot order='2'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0' multifunction='on'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </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> <interface type='bridge'> <mac address='52:54:00:d3:ed:9e'/> <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> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/> </source> <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x02' 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=2,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=01:00.0,bus=pcie.0,multifunction=on,x-vga=on'/> </qemu:commandline> </domain> In my go file, I have used the following entry since beta 14: /usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1 0000:00:14.0 In my syslinux.cfg file, I have used the following entry since beta 14: append pcie_acs_override=downstream initrd=/bzroot Gary Gary, A few things: We just handle pass through for non-GPU devices a different way now (a more accepted way). Your audio device for the GPU is not in the qemu:args section of the XML, they are now in the body as <hostdev> tags. Here they are highlighted for you: <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/> </source> <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> </hostdev> With respect to your 00:14.0 device, since that is a USB controller, we do not support that at this time, and editing using the GUI editor will strip that out. That's because we don't have a safe way yet to ensure that the USB controller you are assigning isn't in fact the controller that the boot device is on. You can still override that though by manually inserting XML to pass through the USB device. To do that the fancy new way, add this to your XML: <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x14' function='0x0'/> </source> </hostdev> Both in the OP for Beta 15 as well as in the post I made about the VM Manager in the announcement board, there's big red text about editing VMs that have custom XML using the standard editor mode. TLDR: This is not a bug. Things are working as expected.
April 21, 201511 yr Author Thanks for pointing this out. I'll mark this as solved. I can certainly understand why USB bus pass-through is not supported! I passed through my unRAID USB key once by mistake! So, since the audio pass through is now done in the hostdev tags, I assume I should not have the audio device binded in the go file, which is the bolded part below? /usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1 0000:00:14.0 Thanks, Gary
April 21, 201511 yr Thanks for pointing this out. I'll mark this as solved. I can certainly understand why USB bus pass-through is not supported! I passed through my unRAID USB key once by mistake! So, since the audio pass through is now done in the hostdev tags, I assume I should not have the audio device binded in the go file, which is the bolded part below? /usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1 0000:00:14.0 Thanks, Gary I need to make a post in the KVM forum about this. No one should be doing vfio-bind anymore in their go scripts or otherwise (regardless of the device type). We do all of this for you now through libvirt hook scripts. No more modifications to the go file are required. I should also note on USB passthrough, it's only the USB PCI controller that we don't officially support for pass through. Individual devices isn't a concern because we filter out the unRAID boot device automatically so you can't pass it through. And eventually, we should be able to detect which USB controller the boot device is on and allow you pass through other USB controllers instead. This also applies to storage controllers. If you passed through a storage controller that your array / cache devices used, it would detach them from the array (not good ;-). I also don't know if I see the real value in passing through a storage controller just yet. It means giving up 100% of the ports on that controller to a single VM.
Archived
This topic is now archived and is closed to further replies.