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>
_______________________________________________
Users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/[email protected]/message/CIWFZXRJTELNSMH34A5XBQQFFZETZXIA/

Reply via email to