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!

Installing and fine-tuning XenServer 6.1 on server with Adaptec 6805 RAID controller


  • For XenServer 6.1 to recognize logical array, first of all we have to download precompiled driver package (aacraid_linux_min_drivers.tgz) from adaptec site (link), then burn it to CD and press F9 when installation prompts to. 
  • After installation completion, it's time to install Adaptec Storage Manager agent on XenServer and configure it to connect to central location with Windows-based GUI. Download it from here. Choose the latest version for 32-bit Linux (yes, 32-bit). It's a mystery for me why 64-bit Xen doesn't want to install 64-bit ASM, but it's true.
At my Linux shell: scp ~/Downloads/StorMan.rpm root@10.10.X.X:/tmp
At my XenServer shell: rpm --install ./StorMan.rpm

  • At this point ASM agent should be installed on XenServer. Now we should open appropriate TCP and UDP ports in XenServer firewall to allow connections from ASM installed on central Windows management station. ASM requires the following ports to be opened for successful connection to be established (from the User Guide):
8003 (TCP)
34570 to 34580 (TCP)
34570 (UDP)
34577 to 34580 (UDP) 

  •  After opening ports, we should be able to connect to Xen's ASM agent from management station by using login "root" and appropriate password.
  • We can now configure any parameters of our RAID array remotely, but something still doesn't work. And it's alerting system. Agent can't send e-mail notification, SNMP traps, etc. To make this work, we should modify /etc/hosts file and add the following lines:
127.0.0.1 localhost.localhost     localhost
10.10.X.X   xenserver.YOURDOMAIN.COM xenserver
10.10.X.X     asm.YOURDOMAIN.COM          asm

  • where "xenserver" is...yes, it's XenServer :D and asm.YOURDOMAIN.COM is IP address and FQDN of you management station. Actually, I guess that the last line is not necessary, but it's present in my configuration, so I don't want to alter working system.