vmware_guest: option to enable nested virtualization (#28149)

Signed-off-by: Julien Le Foll <jlefoll@percallgroup.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
jglf 2017-12-12 06:32:56 +01:00 committed by Abhijeet Kasurde
parent 80fb836ce5
commit 74a7cc7130
2 changed files with 7 additions and 0 deletions

View file

@ -86,6 +86,7 @@ options:
- ' - C(hotadd_cpu) (boolean): Allow cpus to be added while the VM is running.'
- ' - C(hotadd_memory) (boolean): Allow memory to be added while the VM is running.'
- ' - C(memory_mb) (integer): Amount of memory in MB.'
- ' - C(nested_virt) (bool): Enable nested virtualization. version_added: 2.5'
- ' - C(num_cpus) (integer): Number of CPUs.'
- ' - C(num_cpu_cores_per_socket) (integer): Number of Cores Per Socket. Value should be multiple of C(num_cpus).'
- ' - C(scsi) (string): Valid values are C(buslogic), C(lsilogic), C(lsilogicsas) and C(paravirtual) (default).'
@ -748,6 +749,11 @@ class PyVmomiHelper(PyVmomi):
if vm_obj is None or self.configspec.maxMksConnections != vm_obj.config.hardware.maxMksConnections:
self.change_detected = True
if 'nested_virt' in self.params['hardware']:
self.configspec.nestedHVEnabled = bool(self.params['hardware']['nested_virt'])
if vm_obj is None or self.configspec.nestedHVEnabled != bool(vm_obj.config.nestedHVEnabled):
self.change_detected = True
def get_vm_cdrom_device(self, vm=None):
if vm is None:
return None

View file

@ -50,6 +50,7 @@
# till the time.
# memory_reservation: 512
# memory_reservation_lock: False
# nested_virt: True
max_connections: 10
disk:
- size: 0gb