You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unable to set boot order for virtual machine created by vcsim,
frompyVim.connectimportSmartConnect, DisconnectimportsslimportatexitfrompyVmomiimportvimdefconnect():
context=ssl.SSLContext(ssl.PROTOCOL_SSLv23)
context.verify_mode=ssl.CERT_NONEsi=SmartConnect(host='0.0.0.0', user='user', pwd='pass', port=443, sslContext=context)
atexit.register(Disconnect, si)
content=si.RetrieveContent()
returncontentdefget_obj(content, vimtype, name):
""" Return an object by name, if name is None the first found object is returned """obj=Nonecontainer=content.viewManager.CreateContainerView(
content.rootFolder, vimtype, True)
forcincontainer.view:
ifname:
ifc.name==name:
obj=cbreakelse:
obj=cbreakcontainer.Destroy()
returnobjcontent=connect()
configSpec=vim.vm.ConfigSpec()
configSpec.bootOptions=vim.vm.BootOptions(bootOrder=[vim.vm.BootOptions.BootableDiskDevice(deviceKey=0)])
vm=get_obj(content, [vim.VirtualMachine], 'DC0_H0_VM0')
print("Boot Order before : %s"%vm.config.bootOptions)
vm.Reconfigure(configSpec)
print("Boot Order after : %s "%vm.config.bootOptions)
Expected Result:
vcsim should honour the bootOrder provided by bootOptions Config parameter.
The text was updated successfully, but these errors were encountered:
I am unable to set boot order for virtual machine created by vcsim,
Expected Result:
vcsim should honour the bootOrder provided by bootOptions Config parameter.
The text was updated successfully, but these errors were encountered: