As i understood, vm is already created/cloned. So basically you want to change the vm configuration.You need to create a configuration spec(vm name in your case).
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
context.verify_mode = ssl.CERT_NONE
print opArg
sI = connect.SmartConnect(host='',
user='',
pwd='',
port=443,
sslContext=context)
content = sI.content
objView = content.viewManager.CreateContainerView(content.rootFolder,[vim.VirtualMachine],True)
vmList = objView.view
for vm in vmList:
vm_obj = vm
And then you pass your spec as-
vm_obj.ReconfigVM_Task(spec=your_spec)
I worked on VMWare a long time ago. I hope this is still helpful.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.