Citrix XenCenter - how to clone a VM?

By jrocksuki ·

Does anyone know how to clone a VM in Citrix XenCenter without having to convert the VM into a template and cloning the VM? Basically cloning directly from a live VM.

I read somewhere you can do it from the CLI via "xe -s server vm-clone vm=VM-NAME new-name-label=NEW-VM-NAME -u user -pw password". But when I do this I just get an error:

Error: Connection reset by peer (calling read )

Searching what this error means doesn't give any info regarding VM cloning.

Thanks in advance

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Is the VM shutdown?

by Andrew Marr In reply to Citrix XenCenter - how to ...

You can't clone a VM that is running.

I often use this script which might help show the process -

Collapse -

Variables to change

by jrocksuki In reply to Citrix XenCenter - how to ...

Thanks Andrew. That looks like the script that would work, although I'm not sure which variables I have to change (apart from SERVER, USERNAME and PASSWORD).

Do I have to change the <vm_uuid_to_duplicate> to the actual vm uuid value? I.e. Running "xe host-list" on the xenserver to get the value.

Also I'm pretty sure I need to change the "new-name-label=cloned_vm" to the name of the new cloned vm - but would you be able to confirm that?

Thanks very much

Collapse -

Not much to change

by Andrew Marr In reply to Citrix XenCenter - how to ...

Yes, naturally change the server, username and password etc).

You are welcome to change the cloned_vm variable if you wish.

Then launch the script with the VM name you want to clone.

Give it whirl, let me know if you error out.

Related Discussions

Related Forums