Wednesday, February 20, 2013

Unexpected problems of exporting VM's in XenServer 6.1 as .OVA

Yesterday I experienced problems with exporting VM from XenServer. The problem appeared only when I chose Open Format exporting instead of XVA. When the task started, it tried to connect to some virtual disk and then failed. Close investigation of the log file revealed that the following error message was added:
transfer: ERROR    expose: XenAPI.Failure: ['XENAPI_PLUGIN_FAILURE', 'prepare_transfervm_template', 'Failure', "['NO_TEMPLATE', 'There has been an error installing the Transfer VM template']"]

After searching the web I found an advice to check whether XenServer Transfer VM is present in the list of VM. For it to be shown we have to enable displaying of hidden objects (View -> Hidden Objects). This VM was missing. Then I found a guide on how to reinstall it. On XenServer host:
cd /opt/xensource/packages/files/transfer-vm
./install-transfer-vm.sh
When I started the script it displayed an error stating that I do not have Local Storage as well as Default Storage. In fact I had Local Storage, but it wasn't set as default! When I checked it as my default storage, the script ran without a problem and exporting began to work as expected!

Hint: Looks like if you didn't create your Local SR on the initial installation and then did it manually, it wouldn't be set as Default, so the exporting wouldn't work!