<div><div><font face="lucida Grande, Verdana, Microsoft YaHei">thanks your mail,now below:</font></div><div><font face="lucida Grande, Verdana, Microsoft YaHei"><br></font></div><div><font face="lucida Grande, Verdana, Microsoft YaHei">If the KVM supports nested VMX and QEMU starts with the arguments -enable-kvm and</font></div><div><font face="lucida Grande, Verdana, Microsoft YaHei">    -cpu ..., + vmx, then the LOCK bit of the guest MSR_IA32_FEATURE_CONTROL and</font></div><div><font face="lucida Grande, Verdana, Microsoft YaHei">    Enable VMX out of SMX operation bit will be set.</font></div><div><font face="lucida Grande, Verdana, Microsoft YaHei"><br></font></div><div><font face="lucida Grande, Verdana, Microsoft YaHei">Well, I should add -enable-kvm parameters of the document which xml position, Exactly speaking, how to amend xml configuration file?</font></div><span style="  ; ; ;; "></span></div><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ 原始邮件 ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>发件人:</b> "Daniel P. Berrange";<berrange@redhat.com>;</div><div><b>发送时间:</b> 2017年1月5日(星期四) 晚上8:53</div><div><b>收件人:</b> "放牛班的春天"<446844717@qq.com>; <wbr></div><div><b>抄送:</b> "libvirt-users"<libvirt-users@redhat.com>; <wbr></div><div><b>主题:</b> Re: [libvirt] xml config nested</div></div><div><br></div>NB, in future please don't CC all possible mailing lists at once.<br>Just pick the most appropriate mailing list for your question. I've<br>dropped libvirt-list & libvirt-announce from the CC, since this is<br>a question most suited for libvirt-users.<br><br>On Thu, Jan 05, 2017 at 11:44:29AM +0800, 放牛班的春天 wrote:<br>> How to configure libvirt, so qemu-kvm support nested virtualization, virtual machine installed operating system is windows_7_ultimate_sp1_x64_dvd_618537.iso, configure libvirt xml file is as follows:<br>> <br>>  <cpu mode='custom' match='exact'><br>>     <model fallback='allow'>core2duo</model><br>>     <feature policy='require' name='vmx'/><br>>   </cpu><br>> <br>> <br>> or<br>> <br>>   <cpu mode='host-model'><br>>     <model fallback='allow'/><br>>   </cpu><br>> <br>> or<br>>  <cpu mode='host-passthrough'><br>>     <topology sockets='2' cores='2' threads='2'/><br>>   </cpu><br><br>Yes, that's the key guest configuration step - exposing the 'vmx' feature<br>to the guest.<br><br>In addition to that though, you need to make sure the kvm-intel kernel<br>module in your host has the "nested=1" parameter set.<br><br>eg in /etc/modprobe.d/kvm.conf you want<br><br> options kvm_intel nested=1<br><br>If loaded correctly you should see<br><br># cat /sys/module/kvm_intel/parameters/nested <br>Y<br><br>if it says "N", then nested VMX will be disabled.<br><br>Regards,<br>Daniel<br>-- <br>|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|<br>|: http://libvirt.org              -o-             http://virt-manager.org :|<br>|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|</div>