|
|
|
@ -910,7 +910,7 @@ class PyVmomiHelper(PyVmomi):
|
|
|
|
" a VLAN name under VM network list.")
|
|
|
|
" a VLAN name under VM network list.")
|
|
|
|
|
|
|
|
|
|
|
|
if 'name' in network and find_obj(self.content, [vim.Network], network['name']) is None:
|
|
|
|
if 'name' in network and find_obj(self.content, [vim.Network], network['name']) is None:
|
|
|
|
self.module.fail_json(msg="Network '%(name)s' does not exists" % network)
|
|
|
|
self.module.fail_json(msg="Network '%(name)s' does not exist." % network)
|
|
|
|
elif 'vlan' in network:
|
|
|
|
elif 'vlan' in network:
|
|
|
|
dvps = self.cache.get_all_objs(self.content, [vim.dvs.DistributedVirtualPortgroup])
|
|
|
|
dvps = self.cache.get_all_objs(self.content, [vim.dvs.DistributedVirtualPortgroup])
|
|
|
|
for dvp in dvps:
|
|
|
|
for dvp in dvps:
|
|
|
|
@ -1177,7 +1177,7 @@ class PyVmomiHelper(PyVmomi):
|
|
|
|
ident.guiRunOnce.commandList = self.params['customization']['runonce']
|
|
|
|
ident.guiRunOnce.commandList = self.params['customization']['runonce']
|
|
|
|
|
|
|
|
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
# FIXME: We have no clue whether this non-Windows OS is actually Linux, hence it might fail !
|
|
|
|
# FIXME: We have no clue whether this non-Windows OS is actually Linux, hence it might fail!
|
|
|
|
|
|
|
|
|
|
|
|
# For Linux guest OS, use LinuxPrep
|
|
|
|
# For Linux guest OS, use LinuxPrep
|
|
|
|
# https://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.vm.customization.LinuxPrep.html
|
|
|
|
# https://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.vm.customization.LinuxPrep.html
|
|
|
|
@ -1196,7 +1196,7 @@ class PyVmomiHelper(PyVmomi):
|
|
|
|
self.customspec.identity = ident
|
|
|
|
self.customspec.identity = ident
|
|
|
|
|
|
|
|
|
|
|
|
def get_vm_scsi_controller(self, vm_obj):
|
|
|
|
def get_vm_scsi_controller(self, vm_obj):
|
|
|
|
# If vm_obj doesn't exists no SCSI controller to find
|
|
|
|
# If vm_obj doesn't exist there is no SCSI controller to find
|
|
|
|
if vm_obj is None:
|
|
|
|
if vm_obj is None:
|
|
|
|
return None
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
|
|
|