dmacias Posted December 20, 2014 Author Share Posted December 20, 2014 When creating a new VM, can you add q35 machine option? //Peter I never added a machine type before. I just let libvirt use default which was pc-i440fx-2.1. If you use q35 which equals pc-q35-2.1 or pc-q35-2.0 you can't create/start vm's because of usb tablet. It has to do with no usb bus being defined. pc-i440fx-2.1 handles that fine but q35 doesn't. Quote Link to comment
dmacias Posted December 20, 2014 Author Share Posted December 20, 2014 Tell me how or what you checked for vfio-pci. Maybe that could be a feature request for unRAID System Devices page. Do you know what the command line equivalent is? That page is just a direct ouput of ls commands. So for example, when I wanted to pass through my GPU to Windows, it was nice to be able to check to make sure the GPU was bound to vfio-pci (see attached) before I started the VM. I do like your idea of just asking for it to be added to the Systems Devices page. I am not sure what the command is to view them via ssh. in /usr/local/emhttp/plugins/dynamix/SysDevs.page you can change <?echo "<pre>".shell_exec("lspci")."</pre>";?> to adding the -k option <?echo "<pre>".shell_exec("lspci -k")."</pre>";?> Quote Link to comment
peter_sm Posted December 21, 2014 Share Posted December 21, 2014 When creating a new VM, can you add q35 machine option? //Peter I never added a machine type before. I just let libvirt use default which was pc-i440fx-2.1. If you use q35 which equals pc-q35-2.1 or pc-q35-2.0 you can't create/start vm's because of usb tablet. It has to do with no usb bus being defined. pc-i440fx-2.1 handles that fine but q35 doesn't. You cant only change machine type, more things in the xml need to be changed, see below a q35 machine create in Virtual Machine Manager root@Tower:/etc/libvirt/qemu# more fedora20.xml <!-- WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE OVERWRITTEN AND LOST. Changes to this xml configuration should be made using: virsh edit fedora20 or other application using the libvirt API. --> <domain type='kvm'> <name>fedora20</name> <uuid>b08515f7-901e-41e4-b3d7-3322a6217118</uuid> <memory unit='KiB'>1048576</memory> <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type arch='x86_64' machine='pc-q35-2.1'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>SandyBridge</model> <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='dtes64'/> <feature policy='require' name='vmx'/> <feature policy='require' name='erms'/> <feature policy='require' name='xtpr'/> <feature policy='require' name='smep'/> <feature policy='require' name='pcid'/> <feature policy='require' name='est'/> <feature policy='require' name='monitor'/> <feature policy='require' name='smx'/> <feature policy='require' name='tm'/> <feature policy='require' name='acpi'/> <feature policy='require' name='osxsave'/> <feature policy='require' name='ht'/> <feature policy='require' name='pdcm'/> <feature policy='require' name='fsgsbase'/> <feature policy='require' name='f16c'/> <feature policy='require' name='ds'/> <feature policy='require' name='invtsc'/> <feature policy='require' name='tm2'/> <feature policy='require' name='ss'/> <feature policy='require' name='pbe'/> <feature policy='require' name='ds_cpl'/> <feature policy='require' name='rdrand'/> </cpu> <clock offset='utc'> <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> <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='/var/lib/libvirt/images/fedora20.qcow2'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/> </disk> <disk type='block' device='cdrom'> <driver name='qemu' type='raw'/> <target dev='hda' bus='ide'/> <readonly/> <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='0x03' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' 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'/> <controller type='virtio-serial' index='0'> <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> </controller> <filesystem type='mount' accessmode='passthrough'> <driver type='path'/> <source dir='/mnt/user'/> <target dir='user'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> </filesystem> <interface type='bridge'> <mac address='52:54:00:ee:43:36'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> </interface> <input type='tablet' bus='usb'/> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes'/> <video> <model type='cirrus' vram='9216' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </video> <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x02' slot='0x07' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/> </source> <address type='pci' domain='0x0000' bus='0x02' slot='0x08' function='0x0'/> </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/> </memballoon> </devices> </domain> And my modified Arch Vm based om above sample machine. The CPU part is a test from my side! Also virsh console ArchVM works from unraid command prompt. <!-- WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE OVERWRITTEN AND LOST. Changes to this xml configuration should be made using: virsh edit fedora20 or other application using the libvirt API. --> <domain type='kvm'> <name>ArchVM</name> <uuid>ba6891bc-72cf-2236-6525-6e12bb490e9e</uuid> <memory unit='KiB'>6291456</memory> <currentMemory unit='KiB'>6291456</currentMemory> <vcpu placement='static'>3</vcpu> <cputune> <vcpupin vcpu='0' cpuset='2'/> <vcpupin vcpu='1' cpuset='3'/> <vcpupin vcpu='2' cpuset='4'/> </cputune> <os> <type arch='x86_64' machine='q35'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <cpu mode='custom' match='exact'> <model fallback='allow'>SandyBridge</model> <vendor>Intel</vendor> <feature policy='require' name='vme'/> <feature policy='require' name='dtes64'/> <feature policy='require' name='vmx'/> <feature policy='require' name='erms'/> <feature policy='require' name='xtpr'/> <feature policy='require' name='smep'/> <feature policy='require' name='pcid'/> <feature policy='require' name='est'/> <feature policy='require' name='monitor'/> <feature policy='require' name='smx'/> <feature policy='require' name='tm'/> <feature policy='require' name='acpi'/> <feature policy='require' name='osxsave'/> <feature policy='require' name='ht'/> <feature policy='require' name='pdcm'/> <feature policy='require' name='fsgsbase'/> <feature policy='require' name='f16c'/> <feature policy='require' name='ds'/> <feature policy='require' name='invtsc'/> <feature policy='require' name='tm2'/> <feature policy='require' name='ss'/> <feature policy='require' name='pbe'/> <feature policy='require' name='ds_cpl'/> <feature policy='require' name='rdrand'/> </cpu> <clock offset='utc'> <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> <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_ssd/KVM/ArchVM/ArchVM.qcow2'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/> </disk> <disk type='block' device='cdrom'> <driver name='qemu' type='raw'/> <target dev='hda' bus='ide'/> <readonly/> <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='0x03' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' 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'/> <controller type='virtio-serial' index='0'> <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> </controller> <filesystem type='mount' accessmode='passthrough'> <driver type='path'/> <source dir='/mnt/user'/> <target dir='user'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> </filesystem> <filesystem type='mount' accessmode='passthrough'> <driver type='path'/> <source dir='/mnt/cache'/> <target dir='cache'/> <address type='pci' domain='0x0000' bus='0x03' slot='0x01' function='0x0'/> </filesystem> <interface type='bridge'> <mac address='52:54:00:5b:92:e1'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/2'/> <target port='0'/> </serial> <console type='pty' tty='/dev/pts/2'> <source path='/dev/pts/2'/> <target type='serial' port='0'/> </console> <input type='tablet' bus='usb'/> <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='0x01' function='0x0'/> </video> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/> </memballoon> </devices> </domain> Quote Link to comment
peter_sm Posted December 21, 2014 Share Posted December 21, 2014 When add the Arch XML in to the KVM plugin ,I see this messages Warning: libvirt_domain_get_block_info(): No relevant node found in /usr/local/emhttp/plugins/dynamix.kvm.manager/classes/libvirt.php on line 396 //P EDIT Did a update of the plugin, looks like this is gone now. //Peter Quote Link to comment
peter_sm Posted December 21, 2014 Share Posted December 21, 2014 And about snapshot, when import a above Arch XML file, it's not show any snapshots , but this command shows all my snap shots qemu-img snapshot -l ArchVM.qcow2 Snapshot list: ID TAG VM SIZE DATE VM CLOCK 1 1418563733 0 2014-12-14 14:28:53 00:00:00.000 2 1418563843 0 2014-12-14 14:30:43 00:00:00.000 3 1419082731 0 2014-12-20 14:38:51 00:00:00.000 4 1419082954 0 2014-12-20 14:42:34 00:00:00.000 Quote Link to comment
johnodon Posted December 21, 2014 Share Posted December 21, 2014 Request for the Create VM tab... Under USB Devices, can you include the bus and device IDs as they are shown in System Devices? Bus 002 Device 004: ID 05dc:a817 Lexar Media, Inc. Bus 002 Device 006: ID 20a0:0001 Clay Logic Bus 002 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub Bus 002 Device 005: ID 20a0:0001 Clay Logic Bus 002 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub This would help to differentiate multiple devices with same vendor/product IDs. John Quote Link to comment
dmacias Posted December 21, 2014 Author Share Posted December 21, 2014 Request for the Create VM tab... Under USB Devices, can you include the bus and device IDs as they are shown in System Devices? Bus 002 Device 004: ID 05dc:a817 Lexar Media, Inc. Bus 002 Device 006: ID 20a0:0001 Clay Logic Bus 002 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub Bus 002 Device 005: ID 20a0:0001 Clay Logic Bus 002 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub This would help to differentiate multiple devices with same vendor/product IDs. John Yes no problem since I cut those off. Quote Link to comment
dmacias Posted December 21, 2014 Author Share Posted December 21, 2014 And about snapshot, when import a above Arch XML file, it's not show any snapshots , but this command shows all my snap shots qemu-img snapshot -l ArchVM.qcow2 Snapshot list: ID TAG VM SIZE DATE VM CLOCK 1 1418563733 0 2014-12-14 14:28:53 00:00:00.000 2 1418563843 0 2014-12-14 14:30:43 00:00:00.000 3 1419082731 0 2014-12-20 14:38:51 00:00:00.000 4 1419082954 0 2014-12-20 14:42:34 00:00:00.000 My problem was I can create a q35 vm with the kvm manager but not with usb tablet enabled. It gives an error about usb input0 cause libvirt doesn't create that for q35 like it does for the 440 model. After install libvirt adds necessary usb I believe. What changes did you make in the second. Sorry I can't tell on my phone. For snapshots what does virsh snapshots tell you. I noticed some weird behavior where I had snapshots not showing depending on running state. Quote Link to comment
dmacias Posted December 21, 2014 Author Share Posted December 21, 2014 When add the Arch XML in to the KVM plugin ,I see this messages Warning: libvirt_domain_get_block_info(): No relevant node found in /usr/local/emhttp/plugins/dynamix.kvm.manager/classes/libvirt.php on line 396 //P EDIT Did a update of the plugin, looks like this is gone now. //Peter The error is still there the update just suppressed it. I have error reporting off and then collect errors when functions are run. Some errors I can't collect and won't show when creating a vm. It has something to do with the image defined or a xml node it didn't like. Quote Link to comment
peter_sm Posted December 21, 2014 Share Posted December 21, 2014 For snapshots what does virsh snapshots tell you. I noticed some weird behavior where I had snapshots not showing depending on running state. virsh snapshot-list ArchVM show nothing qemu-img snapshot -l ArchVM.qcow2 show Snapshot list: ID TAG VM SIZE DATE VM CLOCK 1 1418563733 0 2014-12-14 14:28:53 00:00:00.000 2 1418563843 0 2014-12-14 14:30:43 00:00:00.000 3 1419082731 0 2014-12-20 14:38:51 00:00:00.000 4 1419082954 0 2014-12-20 14:42:34 00:00:00.000 When you are at home, please look at my working q35 machine, I have update all my VM with this now. Tablet are OK //Peter Quote Link to comment
Sensei73 Posted December 22, 2014 Share Posted December 22, 2014 I was going to post about the same problem as above. I can't create a q35 VM. nothing appears and no errors. Let me know how I can help you to debug. Quote Link to comment
dmacias Posted December 22, 2014 Author Share Posted December 22, 2014 I was going to post about the same problem as above. I can't create a q35 VM. nothing appears and no errors. Let me know how I can help you to debug. You can create a q35 vm. Change Usb Devices to yes and uncheck VNC Mouse which is usb tablet under usb settings. But your mouse won't track right. You may be able to add it after. Edit: I updated it so it toggles vnc mouse off and on when changing machine type Quote Link to comment
gfjardim Posted December 22, 2014 Share Posted December 22, 2014 dmacias, this is a wonderful work you're doing here, congratulations! There's an OSX bug I would like to report here: the VNC viewer doesn't connect to the VM because OSX doesn't make use of NETBIOS names (e.g. Tower). Can you change the host to the IP address? Quote Link to comment
johnodon Posted December 22, 2014 Share Posted December 22, 2014 I'm not sure what I am doing wrong or if there is a bug... I wanted to test a new VM (created using Create VM) using my passed through GPU from an existing VM (created using Add XML). For whatever reason, the new XML will not allow me to add the QEMU args. The status message at the bottom tells me that changes were made, but if I open the XML again, the changes are not there. I thought that it may be because I still had the args in the existing XML so I deleted them from that one. However, I cannot add them back to that XML either. Once again, the status message says changes were made but if I reopen the XML, they are not there. The odd thing is that I can make other changes to the XML and they are saved (like adding a passed through USB device). <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> Was there a change made in a recent version of virtman plugin that expects the QEMU args to be in a different format? EDIT: I just tried to Add XML with the code shown below. The VM is created but the QEMU args are being stripped out. This is the code that I am adding... <domain type='kvm'> <name>HTPCFAMRM2</name> <memory unit='KiB'>2097152</memory> <currentMemory unit='KiB'>2097152</currentMemory> <memoryBacking> <nosharepages/> <locked/> </memoryBacking> <vcpu placement='static'>2</vcpu> <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'> <topology sockets='1' cores='2' threads='1'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>rename-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='0x07' 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='sata'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </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'/> <filesystem type='mount' accessmode='passthrough'> <source dir='/mnt/user/Movies'/> <target dir='movies'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> </filesystem> <filesystem type='mount' accessmode='passthrough'> <source dir='/mnt/user/Music'/> <target dir='music'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> </filesystem> <filesystem type='mount' accessmode='passthrough'> <source dir='/mnt/user/TV'/> <target dir='tvshows'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/> </filesystem> <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='0x06' function='0x0'/> </interface> <hostdev mode='subsystem' type='usb' managed='no'> <source> <address bus='2' device='6'/> </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> And this is what I end up with... <domain type='kvm'> <name>HTPCFAMRM2</name> <uuid>ae5d3169-5889-4ba9-a478-ca3f5dfd0e60</uuid> <memory unit='KiB'>2097152</memory> <currentMemory unit='KiB'>2097152</currentMemory> <memoryBacking> <nosharepages/> <locked/> </memoryBacking> <vcpu placement='static'>2</vcpu> <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'> <topology sockets='1' cores='2' threads='1'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>rename-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='0x07' 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='sata'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </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'/> <filesystem type='mount' accessmode='passthrough'> <source dir='/mnt/user/Movies'/> <target dir='movies'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> </filesystem> <filesystem type='mount' accessmode='passthrough'> <source dir='/mnt/user/Music'/> <target dir='music'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> </filesystem> <filesystem type='mount' accessmode='passthrough'> <source dir='/mnt/user/TV'/> <target dir='tvshows'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/> </filesystem> <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='0x06' function='0x0'/> </interface> <hostdev mode='subsystem' type='usb' managed='no'> <source> <address bus='2' device='6'/> </source> </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> </memballoon> </devices> <seclabel type='none' model='none'/> </domain> John Quote Link to comment
dmacias Posted December 22, 2014 Author Share Posted December 22, 2014 I'm not sure what I am doing wrong or if there is a bug... I wanted to test a new VM (created using Create VM) using my passed through GPU from an existing VM (created using Add XML). For whatever reason, the new XML will not allow me to add the QEMU args. The status message at the bottom tells me that changes were made, but if I open the XML again, the changes are not there. I thought that it may be because I still had the args in the existing XML so I deleted them from that one. However, I cannot add them back to that XML either. Once again, the status message says changes were made but if I reopen the XML, they are not there. The odd thing is that I can make other changes to the XML and they are saved (like adding a passed through USB device). <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> Was there a change made in a recent version of virtman plugin that expects the QEMU args to be in a different format? EDIT: I just tried to Add XML with the code shown below. The VM is created but the QEMU args are being stripped out. This is the code that I am adding... <domain type='kvm'> <name>HTPCFAMRM2</name> <memory unit='KiB'>2097152</memory> <currentMemory unit='KiB'>2097152</currentMemory> <memoryBacking> <nosharepages/> <locked/> </memoryBacking> <vcpu placement='static'>2</vcpu> <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'> <topology sockets='1' cores='2' threads='1'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>rename-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='0x07' 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='sata'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </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'/> <filesystem type='mount' accessmode='passthrough'> <source dir='/mnt/user/Movies'/> <target dir='movies'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> </filesystem> <filesystem type='mount' accessmode='passthrough'> <source dir='/mnt/user/Music'/> <target dir='music'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> </filesystem> <filesystem type='mount' accessmode='passthrough'> <source dir='/mnt/user/TV'/> <target dir='tvshows'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/> </filesystem> <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='0x06' function='0x0'/> </interface> <hostdev mode='subsystem' type='usb' managed='no'> <source> <address bus='2' device='6'/> </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> And this is what I end up with... <domain type='kvm'> <name>HTPCFAMRM2</name> <uuid>ae5d3169-5889-4ba9-a478-ca3f5dfd0e60</uuid> <memory unit='KiB'>2097152</memory> <currentMemory unit='KiB'>2097152</currentMemory> <memoryBacking> <nosharepages/> <locked/> </memoryBacking> <vcpu placement='static'>2</vcpu> <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'> <topology sockets='1' cores='2' threads='1'/> </cpu> <clock offset='localtime'/> <on_poweroff>destroy</on_poweroff> <on_reboot>rename-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='0x07' 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='sata'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </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'/> <filesystem type='mount' accessmode='passthrough'> <source dir='/mnt/user/Movies'/> <target dir='movies'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> </filesystem> <filesystem type='mount' accessmode='passthrough'> <source dir='/mnt/user/Music'/> <target dir='music'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> </filesystem> <filesystem type='mount' accessmode='passthrough'> <source dir='/mnt/user/TV'/> <target dir='tvshows'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/> </filesystem> <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='0x06' function='0x0'/> </interface> <hostdev mode='subsystem' type='usb' managed='no'> <source> <address bus='2' device='6'/> </source> </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> </memballoon> </devices> <seclabel type='none' model='none'/> </domain> John This is a function of qemu/libvirt. You need the xml namespace on the first line as well as the qemu commandline argument. If your missing either one libvirt will remove it. Quote Link to comment
dmacias Posted December 22, 2014 Author Share Posted December 22, 2014 dmacias, this is a wonderful work you're doing here, congratulations! There's an OSX bug I would like to report here: the VNC viewer doesn't connect to the VM because OSX doesn't make use of NETBIOS names (e.g. Tower). Can you change the host to the IP address? Thanks. Given your docker work that means a lot. It's not an OSX bug, it's a feature. I've read dozens of threads about OSX and .local. It would make Pducharme happy too. I had hesitated before because others as well as me prefer netbios. I usually access everything local by hostname. That said, I will change to ip. Do you know if this php will resolve correctly for you? $host = gethostname(); $ip = gethostbyname($host); Or do I need to use the unRAID network.cfg since $_SERVER doesn't have the ip addr. Quote Link to comment
johnodon Posted December 22, 2014 Share Posted December 22, 2014 Whew...thanks D. Question...why does the Create VM not add the XML namespace if it is required? John Quote Link to comment
dmacias Posted December 22, 2014 Author Share Posted December 22, 2014 Whew...thanks D. Question...why does the Create VM not add the XML namespace if it is required? John It can add all it wants but without the corresponding qemu commandline nodes it will be removed by libvirt. There's nothing I can do about that. I may add a feature when saving xml to check for qemu commandline then check/add namespace. For now you'll just have to remember. I had planned on a passthrough section in the future of Create Vm but still if you edit it later and remove/change it may get automatically remove by libvirt. Quote Link to comment
gfjardim Posted December 23, 2014 Share Posted December 23, 2014 dmacias, this is a wonderful work you're doing here, congratulations! There's an OSX bug I would like to report here: the VNC viewer doesn't connect to the VM because OSX doesn't make use of NETBIOS names (e.g. Tower). Can you change the host to the IP address? Thanks. Given your docker work that means a lot. It's not an OSX bug, it's a feature. I've read dozens of threads about OSX and .local. It would make Pducharme happy too. I had hesitated before because others as well as me prefer netbios. I usually access everything local by hostname. That said, I will change to ip. Do you know if this php will resolve correctly for you? $host = gethostname(); $ip = gethostbyname($host); Or do I need to use the unRAID network.cfg since $_SERVER doesn't have the ip addr. In unRAID webui, it's simple: $ip = $var["IPADDR"]; Thank you very much for this! Quote Link to comment
dmacias Posted December 23, 2014 Author Share Posted December 23, 2014 dmacias, this is a wonderful work you're doing here, congratulations! There's an OSX bug I would like to report here: the VNC viewer doesn't connect to the VM because OSX doesn't make use of NETBIOS names (e.g. Tower). Can you change the host to the IP address? Thanks. Given your docker work that means a lot. It's not an OSX bug, it's a feature. I've read dozens of threads about OSX and .local. It would make Pducharme happy too. I had hesitated before because others as well as me prefer netbios. I usually access everything local by hostname. That said, I will change to ip. Do you know if this php will resolve correctly for you? $host = gethostname(); $ip = gethostbyname($host); Or do I need to use the unRAID network.cfg since $_SERVER doesn't have the ip addr. In unRAID webui, it's simple: $ip = $var["IPADDR"]; Thank you very much for this! Thanks that gives me BRIDGING and BRNAME too. Quote Link to comment
archedraft Posted December 23, 2014 Share Posted December 23, 2014 Also new vm images will be created in a subfolder and image name based on the name of the vm to bring the plugin closer in compliance with how Xen unRAID works Where will VM Manager create the subfolder for the VM? Can we still specify the location? For example I keep all my VM's on a mounted SSD: /mnt/vm_images EDIT: NVM, I just bit the bullet and upgraded and now it all makes sense. To be honest, I like the new way you can browse for .iso within unRAID. It does make it much easier Quote Link to comment
GHunter Posted December 23, 2014 Share Posted December 23, 2014 I finally have had the time to play with this plugin and KVM! I setup my spare USB flash drive with a fresh copy of unRAID 6b12 and your plugins (Virtman and KVM Manager v2014.12.21a). The create VM tab doesn't seem to setup VM's properly. It creates the sub-folder and qcow2 image but doesn't actually create the VM as there are no VM's listed under the Virtual Machines tab after clicking the Create VM button. Am I doing something wrong? I have been using Add XML tab to create my VM's instead. This has worked out really well and I have created several VM's this way. I even passed through my GPU, keyboard, and mouse on my 1st attempt! This is an awesome plugin and I appreciate all the work you have put into it. This will go a long way into easing people into creating VM's under KVM hypervisor. Gary Quote Link to comment
dmacias Posted December 23, 2014 Author Share Posted December 23, 2014 Also new vm images will be created in a subfolder and image name based on the name of the vm to bring the plugin closer in compliance with how Xen unRAID works Where will VM Manager create the subfolder for the VM? Can we still specify the location? For example I keep all my VM's on a mounted SSD: /mnt/vm_images EDIT: NVM, I just bit the bullet and upgraded and now it all makes sense. To be honest, I like the new way you can browse for .iso within unRAID. It does make it much easier Right now I just have the file tree start from /mnt. What I understood would happen is libvirt would operate similar to the xen plugin. Where you have l path(s) to your vm's stored in /boot/config/domain.cfg. Then at the path location would have a separate folder named for each vm. In each folder would be the image, cfg file for autostart and the xml. I'm not sure what would be easiest moving from the virtMan.img loop back to this format. I was thinking a Settings tab. Similar to Settings/virtMan but with cdrom and vm location inputs/defaults. And start/stop/restart. Quote Link to comment
dmacias Posted December 23, 2014 Author Share Posted December 23, 2014 I finally have had the time to play with this plugin and KVM! I setup my spare USB flash drive with a fresh copy of unRAID 6b12 and your plugins (Virtman and KVM Manager v2014.12.21a). The create VM tab doesn't seem to setup VM's properly. It creates the sub-folder and qcow2 image but doesn't actually create the VM as there are no VM's listed under the Virtual Machines tab after clicking the Create VM button. Am I doing something wrong? I have been using Add XML tab to create my VM's instead. This has worked out really well and I have created several VM's this way. I even passed through my GPU, keyboard, and mouse on my 1st attempt! This is an awesome plugin and I appreciate all the work you have put into it. This will go a long way into easing people into creating VM's under KVM hypervisor. Gary Do you have a network bridge setup in unRAID webgui? Did the plugin say it created it successfully at the bottom of the page? It sounds like there was an error during libvirt create. You should be able to just enter a name and nothing else then click create vm. Quote Link to comment
GHunter Posted December 23, 2014 Share Posted December 23, 2014 I finally have had the time to play with this plugin and KVM! I setup my spare USB flash drive with a fresh copy of unRAID 6b12 and your plugins (Virtman and KVM Manager v2014.12.21a). The create VM tab doesn't seem to setup VM's properly. It creates the sub-folder and qcow2 image but doesn't actually create the VM as there are no VM's listed under the Virtual Machines tab after clicking the Create VM button. Am I doing something wrong? I have been using Add XML tab to create my VM's instead. This has worked out really well and I have created several VM's this way. I even passed through my GPU, keyboard, and mouse on my 1st attempt! This is an awesome plugin and I appreciate all the work you have put into it. This will go a long way into easing people into creating VM's under KVM hypervisor. Gary Do you have a network bridge setup in unRAID webgui? Did the plugin say it created it successfully at the bottom of the page? It sounds like there was an error during libvirt create. You should be able to just enter a name and nothing else then click create vm. Yes, I have a network bridge setup as br0. It does not say it was successfully created at the bottom. Since you mentioned it, I put in a name for a VM and changed nothing else, and a VM was created successfully and I got a confirmation at the bottom of the page. So there must be something else on the Create VM tab that is causing a problem. I'll play with it a bit and report back. Thanks. 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.