Feature vmx in cpu?

Hello,

I would like to create a virtual machine which supports virtualization. The host is of course booted with kvm nested virtualization enabled, libvird domain xml requires a snippet like:

  <cpu mode='custom' match='exact'>
    <model fallback='allow'>kvm64</model>
    <feature policy='force' name='vmx'/>
  </cpu>

How can I embed custom xml tags in virtual machines?

You can use a RAW attribute, see
http://docs.opennebula.org/5.0/deployment/open_cloud_host_setup/kvm_driver.html?highlight=raw#additional-attributes

Hello Ruben and Matej,

I have a test setup with Centos 7, kernel 4.15, Opennebula 5.4.6 and running a WinServer2016 Evaluation inside a VM. I want to perform a nested virtualization configuration which works fine (I managed to install Hyper-V) until the point where VMX CPU feature is not exposed from the host.

I have tried exactly these lines on my RAW attribute on VM (copy/paste from RAW field). In WinServer 2016 I cannot start Hyper-V hypervisor and it tells me that VMX is not enabled in BIOS.

<cpu mode='host-passthrough' check='none'> <model fallback='forbid'>SandyBridge</model> <feature policy='require' name='vmx'/> <feature policy='require' name='acpi'/> <feature policy='disable' name='hypervisor'/> </cpu>", <kvm> <hidden state='on'/> </kvm>"

Do you have any clues what I’m doing wrong here? I’ve searched many pages on forums and nothing relevant for now.

Thanks in advance.