johnodon Posted November 5, 2014 Share Posted November 5, 2014 SOLVED: For whatever reason, my syslinux.cfg requires the following: default /syslinux/menu.c32 menu title Lime Technology prompt 0 timeout 50 label unRAID OS kernel /bzimage append initrd=/bzroot 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 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 --------------------- Can some decypher the error message below that I see when trying to start the VM: message: Error while starting domain: internal error: early end of file from monitor: possible problem: 2014-11-05T19:50:04.256525Z qemu-system-x86_64: -device vfio-pci,host=83:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: failed to set iommu for container: Operation not permitted 2014-11-05T19:50:04.256571Z qemu-system-x86_64: -device vfio-pci,host=83:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: failed to setup container for group 25 2014-11-05T19:50:04.256585Z qemu-system-x86_64: -device vfio-pci,host=83:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: failed to get group 25 2014-11-05T19:50:04.256605Z qemu-system-x86_64: -device vfio-pci,host=83:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device initialization failed. 2014-11-05T19:50:04.256624Z qemu-system-x86_64: -device vfio-pci,host=83:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device 'vfio-pci' could not be initialized My HD6450 that I am trying to passthrough: 83:00.0 VGA compatible controller [0300]: AMD/ATI [Advanced Micro Devices, Inc.] Caicos [Radeon HD 6450] [1002:6779] Subsystem: Device [1b0a:909d] Kernel driver in use: vfio-pci 83:00.1 Audio device [0403]: AMD/ATI [Advanced Micro Devices, Inc.] Caicos HDMI Audio [Radeon HD 6400 Series] [1002:aa98] Subsystem: Device [1b0a:aa98] Kernel driver in use: vfio-pci Here is my XML: <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>HTPCFAMRM</name> <uuid>c43b7542-b40b-495f-90ab-aaa4eec68e8a</uuid> <memory unit='KiB'>4194304</memory> <currentMemory unit='KiB'>4194304</currentMemory> <memoryBacking> <nosharepages/> <locked/> </memoryBacking> <vcpu placement='static'>4</vcpu> <cputune> <vcpupin vcpu='0' cpuset='0'/> <vcpupin vcpu='1' cpuset='1'/> <vcpupin vcpu='2' cpuset='2'/> <vcpupin vcpu='3' cpuset='3'/> </cputune> <os> <type arch='x86_64' machine='pc-q35-2.1'>hvm</type> <boot dev='cdrom'/> <bootmenu enable='no'/> </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>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/cache/VMs/HTPCFAMRM.qcow2'/> <target dev='vdc' 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/Images/xbmcbuntu-13.0~gotham_amd64.iso'/> <target dev='hdb' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <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'> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x2'/> </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> <controller type='ide' index='0'/> <interface type='bridge'> <mac address='52:94:00:d0:c0:dc'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> </interface> <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x20a0'/> <product id='0x0001'/> </source> </hostdev> <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=83:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=83:00.1,bus=pcie.0'/> </qemu:commandline> </domain> Quote Link to comment
JustinChase Posted November 5, 2014 Share Posted November 5, 2014 Please post your go file. Here is mine, for comparison... #!/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:08:00.0 0000:08:00.0 is my TV tuner card. Quote Link to comment
johnodon Posted November 5, 2014 Author Share Posted November 5, 2014 I have not yet gotten around to modifying the GO file. I was just running the vfio-bind manually in SSH: vfio-bind 0000:83:00.0 0000:83:00.1 John Quote Link to comment
JustinChase Posted November 5, 2014 Share Posted November 5, 2014 Since you'll need the go file updated anyway, for this to be persistent, and since it only takes a few seconds to do; I'd suggest you just update the go file, then reboot. This will eliminate any question about that step. Also, it took me a while to discover that my VM will only do GPU passthru correctly after a fresh reboot of the server. Finally, I have 2 VM's setup in the vmMan plugin. They point to the same .qcow2 file (my Windows 7 install/image), but one is for GPU passthru, and has no video or graphics section in it. the other has the video and graphics sections, but has nothing passed thru. This lets me start the VM with nothing passed thru, and use VNC to do windows updates (or do repairs to the VM) as necessary. Then I reboot the server and launch the VM with passthru, and use the mouse and keyboard I've passed thru on the monitor. Hopefully that helps some. Quote Link to comment
johnodon Posted November 5, 2014 Author Share Posted November 5, 2014 Actually, I have made some headway. I had to edit my syslinux.cfg as talked about here: http://lime-technology.com/forum/index.php?topic=35070.msg326850#msg326850 See the red below... default /syslinux/menu.c32 menu title Lime Technology prompt 0 timeout 50 label unRAID OS kernel /bzimage append initrd=/bzroot 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 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 I now get the output to my TV but how do you guys handle keyboard strokes? In the ESXi world, I can still use the console window to control the keyboard/mouse while the display it output to the TV. Is there such functionality with VNC? John Quote Link to comment
jonp Posted November 5, 2014 Share Posted November 5, 2014 Actually, I have made some headway. I had to edit my syslinux.cfg as talked about here: http://lime-technology.com/forum/index.php?topic=35070.msg326850#msg326850 See the red below... default /syslinux/menu.c32 menu title Lime Technology prompt 0 timeout 50 label unRAID OS kernel /bzimage append initrd=/bzroot 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 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 I now get the output to my TV but how do you guys handle keyboard strokes? In the ESXi world, I can still use the console window to control the keyboard/mouse while the display it output to the TV. Is there such functionality with VNC? John In short, maybe, but I have a better suggestion if you have $5. http://synergy-project.org/ Turn off pass through, login via vnc, setup Synergy as a client and your other device as a server. Now your other device (laptop or desktop) can use the VM as a secondary monitor and your mouse and keyboard strokes will traverse through just fine. Once done, setup GPU pass through again and eliminate VNC. DONE! Quote Link to comment
johnodon Posted November 5, 2014 Author Share Posted November 5, 2014 That would be a great plan jon...except...I am trying to install the OS (XBMCBuntu in this case). Any other suggestions? John Quote Link to comment
johnodon Posted November 5, 2014 Author Share Posted November 5, 2014 Hmmm...I wonder if I would have better luck with virt-manager as far as retaining virtual KB/Mouse functionality during GPU passthrough. Does virt-manager use a VNC connection or is it its own technology? John Quote Link to comment
JustinChase Posted November 5, 2014 Share Posted November 5, 2014 That would be a great plan jon...except...I am trying to install the OS (XBMCBuntu in this case). Any other suggestions? John As I mentioned earlier, you might setup a second VM which basically copies the one you have working, but strip out the passthru stuff, so that it all ends up going to the VNC. Then you can use the VNC to do the OS installation, and upgrades, and everything else you need to do. Then when you're finished with that, go back to the first VM, and you'll have the passthru, but with the OS installed and updated. You can use this VM to do the USB passthru for your keyboard and mouse. Or you can do what jonp suggested. Either way, this lets you have 2 Virtual Machines which point to the same installation, and you can use either to make changes to the same installation. I found it very useful so far. 1 Quote Link to comment
johnodon Posted November 5, 2014 Author Share Posted November 5, 2014 Hmmm...that may work. Actually, I think what I will try is just creating the VM without passthrough and leave the VNC section intact. Install the OS. Shutdown. Remove the VNC section and add the GPU passthrough stuff. Worth a shot. Quote Link to comment
JustinChase Posted November 5, 2014 Share Posted November 5, 2014 Actually, I think what I will try is just creating the VM without passthrough and leave the VNC section intact. Install the OS. Shutdown. Remove the VNC section and add the GPU passthrough stuff. Or, just copy the XML from the working VM, hit the +XML button and paste it into that box, make your changes, and put in a different name, and have 2 VM's. it doesn't 'cost' anything, and lets you switch between the 2 VERY easily. it's been super useful to me when I had the server crash, which corrupted the OS, and I couldn't easily 'fix' it with the passthru VM. I just picked the VNC version, fixed everything, and then when done, went back to the passthru version. Just sayin' 1 Quote Link to comment
johnodon Posted November 6, 2014 Author Share Posted November 6, 2014 Actually, I think what I will try is just creating the VM without passthrough and leave the VNC section intact. Install the OS. Shutdown. Remove the VNC section and add the GPU passthrough stuff. Or, just copy the XML from the working VM, hit the +XML button and paste it into that box, make your changes, and put in a different name, and have 2 VM's. it doesn't 'cost' anything, and lets you switch between the 2 VERY easily. it's been super useful to me when I had the server crash, which corrupted the OS, and I couldn't easily 'fix' it with the passthru VM. I just picked the VNC version, fixed everything, and then when done, went back to the passthru version. Just sayin' I have what may be a completely silly question... You don't/can't have both vms powered on at the same time, right? John Quote Link to comment
JustinChase Posted November 6, 2014 Share Posted November 6, 2014 Actually, I think what I will try is just creating the VM without passthrough and leave the VNC section intact. Install the OS. Shutdown. Remove the VNC section and add the GPU passthrough stuff. Or, just copy the XML from the working VM, hit the +XML button and paste it into that box, make your changes, and put in a different name, and have 2 VM's. it doesn't 'cost' anything, and lets you switch between the 2 VERY easily. it's been super useful to me when I had the server crash, which corrupted the OS, and I couldn't easily 'fix' it with the passthru VM. I just picked the VNC version, fixed everything, and then when done, went back to the passthru version. Just sayin' I have what may be a completely silly question... You don't/can't have both vms powered on at the same time, right? John I've never tried, but I don't think you could, since they'd be both accessing the same windows installation at the same time, which I would expect to be a bad thing. Quote Link to comment
dmacias Posted November 6, 2014 Share Posted November 6, 2014 Actually, I think what I will try is just creating the VM without passthrough and leave the VNC section intact. Install the OS. Shutdown. Remove the VNC section and add the GPU passthrough stuff. Or, just copy the XML from the working VM, hit the +XML button and paste it into that box, make your changes, and put in a different name, and have 2 VM's. it doesn't 'cost' anything, and lets you switch between the 2 VERY easily. it's been super useful to me when I had the server crash, which corrupted the OS, and I couldn't easily 'fix' it with the passthru VM. I just picked the VNC version, fixed everything, and then when done, went back to the passthru version. Just sayin' I have what may be a completely silly question... You don't/can't have both vms powered on at the same time, right? John I've never tried, but I don't think you could, since they'd be both accessing the same windows installation at the same time, which I would expect to be a bad thing. I do this all the time when testing. To have them both running though you need to change the uuid also. I just increment it by one. Hmmm...I wonder if I would have better luck with virt-manager as far as retaining virtual KB/Mouse functionality during GPU passthrough. Does virt-manager use a VNC connection or is it its own technology? John virt-manager uses a VNC connection. Quote Link to comment
johnodon Posted November 6, 2014 Author Share Posted November 6, 2014 More continued failures... Apparently the XBMCBuntu installer does not like the VNC session. I see the original menu and select Install XBMCBuntu...the typical stuff scrolls by...but then I lose output in the console. 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.