
29 Aug
2019
29 Aug
'19
12:45 p.m.
Hi i am trying to create virtual machines from a template but i cannot seem to find how to ad the inital run sysprep option how should i give that option ? my code <code> NEW_VM_NAME = 'W10MYMACINE' TEMPLATE_NAME = 'W10TEMP' CLUSTER_NAME= 'MYCLUSTER' try: api.vms.add(params.VM(name=NEW_VM_NAME, cluster=api.clusters.get(CLUSTER_NAME), template=api.templates.get(TEMPLATE_NAME))) print 'VM was created from Template successfully' print 'Waiting for VM to reach Down status' while api.vms.get(NEW_VM_NAME).status.state != 'down': sleep(1) except Exception as e: print 'Failed to create VM from Template:\n%s' % str(e) </code>