Setting a XenServer ISO Library Using NAS

Using XenCenter

  1. Open XenCenter
  2. Connect to your server
  3. Click New Storage
  4. Select Windows File Sharing (CIFS) and click Next
  5. Give the SR a name, I used NAS Storage
  6. The Share Name is actually the full path, so: \\\SLXXXXX-X
  7. Check the Use different user name checkbox and enter the user name and password for your NAS (SLXXXXX-X / MxXXXXX)AttachNAS
  8. Click Finish

Continue reading “Setting a XenServer ISO Library Using NAS”

Setting the XenServer Default Storage Repository

To set the default Storage Repository (SR) in XenServer:

  1. Bring up the console
  2. Find the UUID of the pool
    1. xe pool-list
  3. Set the default SR
    1. xe pool-param-set uuid=<pool-uuid> default-SR=<sr-uuid>

You can also right click on the Storage in XenCenter and select Set as Default.

In either case, this is helpful if your default SR is the smallest disk on the server, and you are doing P2V operations.

XenConvert Source Machine Prep

Before using XenConvert on a physical source machine, there are a couple preparations:

  1. Enable Windows Automount on Windows Server operating systems
  2. Disable Windows Autoplay
  3. Remove any virtualization software
  4. Verify adequate free space exists on the destination
  5. Remove any network interface team

Windows Automount

Use the MOUNTVOL /E command in a cmd window to enable Windows Automount

Disable Windows Autoplay

This article describes disabling Windows Autoplay (Autorun):

On Windows Server 2003 change this registry key value to FF:


On one server, the key didn’t exist. I ignored disabling autoplay on that server and the export worked out anyway.

Remove Any Virtualization Software and Verify Adequate Space

These are obvious, uninstall VMWare, VirtualPC, VirtualBox, etc. Find a spot to drop the OVF or VHD package.

Remove Any Network Interface Team

We weren’t doing anything fancy with our interfaces, so I ignored this. I figure if you are using a Network Interface Team, you would know it. Feel free to shoot me a comment on this if you have any insight.


Some XenConvert Experiences

I currently have the opportunity to use the XenConvert tool to move some physical servers to our customer’s XenServer environment. I have finished moving the first server, but I had to take a couple passes before finding a successful p2v plan.

OVA to XenServer

My first plan was to export an OVA file, transfer it to an existing VM on XenServer. Then use XenCenter to import the .ova file. Using the .ova approach is done by selecting Open Virtualization Format (OVF) Package and ticking the Create Open Virtual Appliance checkbox in the XenConvert workload screen.

XenConvert OVA Options
XenConvert OVA Options

Well the XenConvert to .ova finished successfully. But importing the .ova file using XenCenter failed. It kept failing on the EULA which wasn’t defined, nor necessary to define when exporting.

This initial error using XenCenter led me to try importing with XenConvert. It was a good idea, but reality didn’t play out, and I received an error again.

VHD to XenServer

My second plan was to just export the VHD. Again using XenConvert, I select the To: XenServer Virtual Hard Disk (VHD) in the initial workload screen. Again this conversion to a .vhd file completed successfully. After transferring to the existing VM on XenServer, I immediately went to XenConvert instead of XenCenter.

In XenConvert on the initial workload screen, I selected From: Microsoft Virtual Hard Disk (VHD) and To: XenServer. Selected the .vhd file from the file system. And filled in the Hostname, User name, Password and Workspace values in the XenServer connection parameters screen:

XenConvert Connection Parms Screen
XenConvert Connection Parms Screen

This worked.

OVF to XenServer

My third plan was to export an OVF package.

XenConvert Workload
XenConvert Workload

This was never executed because the VHD approach worked. I will try this approach for the second server I am moving, so watch for updates on this post.

I have successfully imported the 3rd server using an OVF and XenConvert. I found that if the OVF fails, then the VHD method will likely fail as well. It boils down to having enough disk space to do the convert. I didn’t see much advantage to using the OVF. The OVF did allocate more RAM up front, but only provided 1 VCPU. I still had to manually configure dynamic RAM and allocate more VCPU after installing Xen Tools.


  1. Disk space, disk space, disk space. XenServer needs lots of disk in order to restore. For example, restoring a 64gb VHD required 300gb of available disk.
  2. Changing the default Storage Repository is possible with some xe commands, see this.
  3. Using OVF only allocates the correct amount of maximum RAM after the convert. User still has to manually configure dynamic memory and specify the correct number of VCPUs.

Copying VM While Running

NOTE: I receive a checksum failure error during vm-import when following this method.

To copy a VM while it is still running:

  1. Create a snapshot
  2. Export as backup
  3. Import the backup

Here are the details:

Create a Snapshot

  1. ssh into XenServer
  2. run xe vm-snapshot vm=”VM Name” new-name-label=”Name the snapshot”
  3. when it completes write down the UUID returned

Export as Backup

  1. ssh into XenServer
  2. xe template-export template-uuid=”UUID from step 3 above” filename=”Name the .xva file”
  3. View progress in XenCenter

Import the Backup

  1. ssh into XenServer
  2. xe vm-import filename=”Name the .xva file to import” sr-uuid=”SR to restore it to”


Use df -ha to view existing disks and available space
Use xe sr-list to find the sr-uuid needed in Import the Backup step 2.