The goal of the following blog is to have a cheap backup system for my XenServer @ Home. Remember snapshots are not backup and it’s not recommended to backup you VMs the way I will describe it in a production environment.

You can find a Citrix KB to add local storage here :


The idea is to install a new hard drive in my XenServer @ Home, configure it and host an OpenFiler VM to share a NFS volume. As the NFS volume will be shared, I want to use it as a backup share to archive all my VMs snapshots with the VM Protection Policies option in Citrix XenServer 5.6 FP1. This option (VM Protection Policies) is available only with the platinum XenServer license.

So I plugged the new hard drive and plug it in my XenServer @ Home and switch on the box, then to enable and activate the drive, I needed first to check XenServer was able to see the new hard drive, i used the fdisk -l command :

[root@suomixen ~]# fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         523     4194304   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2             523        1045     4194304   83  Linux
/dev/sda3            1045      121601   968371393   8e  Linux LVM
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table

My new hard drive is here, I can notice the /dev/sdb which is empty. Then I needed to create a physical volume by using the pvcreate /dev/sdb command line :

[root@suomixen ~]# pvcreate /dev/sdb
  Physical volume "/dev/sdb" successfully created

Now the physical volume created I can create a logical volume by using the xe sr-create command line. Before I need to identify the ID of the new volume created with the xe pbd-list command : (more…)

7 128

  • Pingback: Adding local storage to XenServer 5.x |

  • Pingback: 07-03-2011 weekly tweets |

  • You should try Nexenta appliance in order to have ZFS storage & Deduplucation.
    (Fred aka Andreas Kisser)

  • Hi Fred,

    you can select zfs instead of ext3 as I did with OpenFiler. But thanks for the tip, I will definitely check Nexenta.

    Cheers !

  • Hi Stephane,

    very nice article. I did something similiar for backing up my VMs.

    I had a spare external USB hard drive which I wanted to use for this. As I didn’t want to void the guarantee I wasn’t able to take the drive put it in the server itself.

    So I installed a Windows VM, attached the USB drive to the XenServer and mapped the USB drive to the VM. Then I formatted it with NTFS and shared it as CIFS share.

    As my XenServer can access this CIFS share I used it as destination for my VM Protection Policies.

    The back up process may be a bit slower then your solution but I can access and recover my back ups from every Windows machine as it’s an external NTFS formatted drive.


  • Marcus

    Hi Stephane,

    good idea. I also did it with a local attached USB drive at the xen server and a free backup script. Taking Snapshot, copying snapshot with smb to usb disk and deleting snapshot. works great.

    What if your xenserver and the open filer vms dies. Can you attach the open filer volumen to a new openfiler vm again and access the backuped vms ?


  • Pingback: PHD Virtual Backup for XenServer |