Login to XenServer
Mount an available NFS volume. In this example, we server02:/nfs/vm_templates
mount server02:/nfs/vm_templates /mnt
Get the uuid of the template we want to copy to nfs:
[root@xen2010 ~]# xe template-list| grep base-as name-label ( RW): Copy of CentOS5.5-base name-label ( RW): CentOS5.5-base
Go to the nfs /mnt volume and start the export:
[root@xen2010 mnt]# xe template-export filename=CentOS55.xva template-uuid=1c26d2dc-8d28-4445-bf80-f1c7d2dfd884 Export succeeded [root@xen2010 mnt]# [root@xen2010 mnt]# umount /mnt
Done. You can verify the CentOS55.xva file on the nfs volume.
Login to the XenServer
Mount an available NFS volume. In this example, we server02:/nfs/vm_templates
mount server02:/nfs/vm_templates /mnt
List the files in the /mnt directory:
[root@xen2009 mnt]# ls -la total 6864760 drwxr-xr-x 2 woot users 27 Mar 24 12:54 . drwxr-xr-x 21 root root 4096 Mar 3 10:41 .. -rw------- 1 root root 7028463616 Mar 24 13:11 CentOS55.xva
Get the sr-uuid of the local volume where we want to store the template:
[root@xen2009 mnt]# xe sr-list uuid ( RO) : 6b0c60bc-035a-2963-67e1-928a426efed8 name-label ( RW): Local storage name-description ( RW): host ( RO): xen2009.sl-netbase.com type ( RO): lvm content-type ( RO): user
Import the template:
[root@xen2009 mnt]# xe vm-import filename=CentOS55.xva sr-uuid=6b0c60bc-035a-2963-67e1-928a426efed8 Output: 7c176fa6-e16d-394f-33f9-812c4f8c17b4
Done. You can now go to the XenCenter and deploy a VM OS using this template.