Cloning a Virtual MachineA new virtual machine can be created by cloning an existing virtual machine. The machine will be created as an exact copy of the source virtual machine and will be automatically registered with the Parallels Service. The cloning operation is performed using the
The source virtual machine must be registered with the Parallels Service before it can be cloned. Sample """ Clone a virtual machine. @param vm: An instance of the prlsdkapi.Vm class identifying the source virtual machine. """ def clone_vm(vm):
try: new_name = "Clone_2 of " + vm.get_config().get_name() print "Clonning is in progress..." # Second parameter - create a new machine in the # default directory. # Third parameter - create a virtual machine (not a template). vm.clone(new_name, "", False).wait() except prlsdkapi.PrlSDKError, e: print "Error: %s" % e return
print "Cloning was successful. New virtual machine name: " + new_name |
||||
|