Online Promoters™ :: Web Development made simple

XenServer: Import Failed when importing hard drive image vhd vmdk with XenCenter

If you want to import a virtual hard drive image or package (vmdk, vhd, ofv, ova etc) to XenServer using XenCenter you might encounter an error which says nothing but: IMPORT FAILED !
After a lot of research and reading I found that you NEED to HAVE INSTALLED a Virtual Machine which actually handles the transfer and which is not installed by default. There is a bash script that comes with XenServer called TransferVM which you should run in order to install this Transfer Virtual Machine.

How to solve:

- Log in to your host (XenServer) using the console or ssh;
[root@xenserver]# cd /opt/xensource/packages/files/transfer-vm
[root@xenserver]# ls -l
total 3684
-rw-r--r-- 1 root root 134 May 20 2010 65-install-transfer-vm
-rwxr-xr-x 1 root root 478 May 20 2010 do-copy
-rwxr-xr-x 1 root root 613 May 20 2010 do-transfer
-rwxr-xr-x 1 root root 1784 May 20 2010
-rw-r--r-- 1 root root 3747840 May 20 2010 transfer-vm.xva
-rwxr-xr-x 1 root root 491 May 20 2010
[root@xenserver]# ./ script
Importing XenServer Transfer VM... done.

Now you can go back to XenCenter and start your virtual hard drive image Import.
Further explanations and troubleshooting can be found here .