parameters explained:
xe host-call-plugin - is the xe command to execute plugins
host-uuid=
plugin=copy - is the /etc/xapi.d/plugins/
fn=get_vm - the function of the plugin to call (each plugin can serve multiple purposes - the copy plugin for example has about 5 or so different purposes) … in this case: get_vm
args:remote_vm_uuid=
args:local_sr_uuid=
args:remote_host=
args:remote_username=root - you can figure that one out yourself ?
args:remote_password=
e.g.
XenServer-1 IP = 1.2.3.1
XenServer-1 Username / Password = root / password
XenServer-2 UUID = 8ad2e8cb-7447-463e-bf92-8301e0ba4562
Debian VM @ XenServer-1 - UUID = 33f82e4f-cc26-f0b9-7943-5239945aef61
Local SR @ XenServer-2 - UUID = 0d417f8a-c527-4b00-08ce-21a63a7238b6
The following command was executed from XenServer-2:
xe host-call-plugin host-uuid=8ad2e8cb-7447-463e-bf92-8301e0ba4562 plugin=copy fn=get_vm args:remote_vm_uuid=33f82e4f-cc26-f0b9-7943-5239945aef61 args:local_sr_uuid=0d417f8a-c527-4b00-08ce-21a63a7238b6 args:remote_host=1.2.3.1 args:remote_username=root args:remote_password=password
Once it's completed, you will see a Debian VM appear on XenServer-2.
The above should allow you to easily migrate/backup/copy VMs between completely separated resource pools (completely separated is not entirely true since both environments will obviously have to have network connectivity ?) without the need for manual export/import operations or complex LUN re-assignment steps.
Thanks to Stefan from Citrix for this nice tip :)