EDV Dave Posted July 26, 2019 Share Posted July 26, 2019 Hello guys, is it possible to activate VMX for Qemu in Unraid 6.7.2.? Iam using Passtrough-Mode with the "kvm_intel nested=1" in Autostart to run MS Hyper-V 2016 on my Unraid Setup. Inside the HyperV 2016 Server i can use nested VMs without hassle when HyperV option enabled and pc-i440fx . But the performance is absolutely horrible and everthing is lagging behind. When i switch do QMEU64 / KVM CPU mode the Performance of my MS Hyper Server increases drastically. But the Intel VD-X Features are not exposed to it anymore, hence i cannot run nested VMs. How can i expose VMX to my HyperV Host running on QEMU CPU Mode. I Found the following: https://ahelpme.com/howto/qemu-full-virtualization-cpu-emulations-enable-disable-cpu-flags-instruction-sets/ https://stackoverflow.com/questions/39154850/how-do-i-emulate-the-vmx-feature-with-qemu https://stackoverflow.com/questions/43942033/nested-virtualization-with-kvm-enable-kvm-in-qemu-in-nested-virtualization?rq=1 Somehow it should be possible to make the CPUS Features visible to the VM. The XML commands above, mentioned by Siwat, do not work anymore. Error: XML error: Non-empty feature list specified without CPU model Cpu Mode "custom" does not exist anymore. But there is a mode called "Host-Model". How can i use QEMU emulated CPU Cores for my MS HyperV Server and passtrough the VMX Features to its VMS for nested Virtualization. best regards lukas Quote Link to comment
Jagadguru Posted July 30, 2019 Share Posted July 30, 2019 Just adding +vmx to the cpu features supported worked for me with a nested guest on a MacOS VM. Like this: <qemu:commandline> <qemu:arg value='-cpu'/> <qemu:arg value='Penryn,vendor=GenuineIntel,kvm=on,+invtsc,vmware-cpuid-freq=on,+vmx'/> </qemu:commandline> Quote Link to comment
C-Fu Posted August 8, 2019 Share Posted August 8, 2019 On 7/30/2019 at 2:25 PM, Jagadguru said: Just adding +vmx to the cpu features supported worked for me with a nested guest on a MacOS VM. Like this: <qemu:commandline> <qemu:arg value='-cpu'/> <qemu:arg value='Penryn,vendor=GenuineIntel,kvm=on,+invtsc,vmware-cpuid-freq=on,+vmx'/> </qemu:commandline> in here? <cpu mode='host-passthrough' check='none'> <topology sockets='1' cores='10' threads='2'/> </cpu> My CPU is Sandy Bridge EP though, should it still be Penryn? E5 2650 Quote Link to comment
Jagadguru Posted August 9, 2019 Share Posted August 9, 2019 At the very end of the XML. It's for when you use a QEMU emulated CPU like the OP. Yours should be Penryn if you're running MacOS in a VM. What OS are you trying to run in your VM? And what guest within that guest are you trying to run? And with what Virtualization software (within the VM)? Quote Link to comment
EDV Dave Posted August 14, 2019 Author Share Posted August 14, 2019 (edited) where can i find the right xml file guys? my vm xml only got this short cpu section: Quote <vcpu placement='static'>24</vcpu> <cputune> <vcpupin vcpu='0' cpuset='0'/> <vcpupin vcpu='1' cpuset='12'/> <vcpupin vcpu='2' cpuset='1'/> <vcpupin vcpu='3' cpuset='13'/> <vcpupin vcpu='4' cpuset='2'/> <vcpupin vcpu='5' cpuset='14'/> <vcpupin vcpu='6' cpuset='3'/> <vcpupin vcpu='7' cpuset='15'/> <vcpupin vcpu='8' cpuset='4'/> <vcpupin vcpu='9' cpuset='16'/> <vcpupin vcpu='10' cpuset='5'/> <vcpupin vcpu='11' cpuset='17'/> <vcpupin vcpu='12' cpuset='6'/> <vcpupin vcpu='13' cpuset='18'/> <vcpupin vcpu='14' cpuset='7'/> <vcpupin vcpu='15' cpuset='19'/> <vcpupin vcpu='16' cpuset='8'/> <vcpupin vcpu='17' cpuset='20'/> <vcpupin vcpu='18' cpuset='9'/> <vcpupin vcpu='19' cpuset='21'/> <vcpupin vcpu='20' cpuset='10'/> <vcpupin vcpu='21' cpuset='22'/> <vcpupin vcpu='22' cpuset='11'/> <vcpupin vcpu='23' cpuset='23'/> </cputune> <resource> <partition>/machine</partition> </resource> <os> <type arch='x86_64' machine='pc-i440fx-3.1'>hvm</type> </os> <features> <acpi/> <apic/> <hyperv> <relaxed state='on'/> <vapic state='on'/> <spinlocks state='on' retries='8191'/> <vendor_id state='on' value='none'/> </hyperv> </features> <cpu mode='host-passthrough' check='none'> <topology sockets='1' cores='12' threads='2'/> </cpu> you probably edit some qemu config xml right? not the vm itself Edited August 14, 2019 by EDV Dave missing Quote Link to comment
EDV Dave Posted September 5, 2019 Author Share Posted September 5, 2019 OK it worked. Just added your Lines within the "domain" tag: </hostdev> <memballoon model='none'/> </devices> <seclabel type='dynamic' model='dac' relabel='yes'> <label>+0:+100</label> <imagelabel>+0:+100</imagelabel> </seclabel> <qemu:commandline> <qemu:arg value='-cpu'/> <qemu:arg value='Penryn,vendor=GenuineIntel,kvm=on,+invtsc,vmware-cpuid-freq=on,+vmx'/> </qemu:commandline> </domain> Performance is way better now and nested VMS do start with QEMU Penryn now, but still not performing as well as when i just tick QMEMU CPU without speccifying Penryn type. Are there other choices? best regards Quote Link to comment
xrstokes Posted October 7, 2019 Share Posted October 7, 2019 Thanks this helped me a lot. Made a big difference to get it like that. Now just to set up static huge pages on my second numa node. 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.