How to Backup XenServer VM with VirtualIQ 1. Using Live Backup of VM option: Live Backup: This option can be used, if user does not want to power off the VM during the backup operation. This approach takes a snapshot of VM and exports to desired location which can be local folder or folder on different machine. This option can be accessed in VirtualIQ as follows: (a) From VM Overview page (b) From Scheduled Task: If the Live Backup is not enabled, the VM is powered off and the VM is exported.
2. Using Local Backup of VM option Local Backup: This option will take a backup of VM and store it on local folder of XenServer. Since / file system has limited space in Xen, we need to mount network share on remote machine to effectively use the Local Backup option: 2.1 Mounting network share on Windows machine from XenServer: To explain the steps involved in configuring this option, the following example is used: (a) Windows Machine with IP 172.19.13.81 in on network. It is on the same network as XenServer i.e one can ping this IP from Xen Server. (b) This machine has folder D:\ShareforEveryOne which needs to be shared and mounted on Xen Server Step 1: Select the folder D:\ShareForEveryone in Windows Explorer and right click it. Following screen opens
Step 2: Select Properties as shown in the screenshot and click it, following screen opens up, Click the Sharing tab Step 3: Share the folder, with name Share name as ShareForEveryOne
Step 4 : Click Permissions button and following screen opens up, then grant read /write, Full Control permissions for Everyone as shown below Step 5: Connect to XenServer, using any SSH client like putty or one can directly go to local shell on XenServer. tvuser : This is user on 172.19.13.81 /VIQ : This is folder on XenServer on which windows folder will be mounted. NOTE: You must first create a directory /VIQ on the XenServer host using the command: mkdir /VIQ Next step would be to execute the following command on XenServer: mount -t cifs o rw,username=tvuser //172.19.13.81/ShareForEveryone /VIQ
This command will prompt for password. Enter the password. To check whether this command has successfully mounted the folder, use the following command: df -kh Output should be similar to: Filesystem 1K-blocks Used Available Use% Mounted on /dev/hdb1 3945128 2818856 925864 76% / //172.19.13.81/ShareForEveryone 37190440 31284656 5905784 85% /VIQ If you don t see /VIQ in the output, some error has occurred in the mount operation 2.2 Mounting network share on Linux Machine from XenServer If the folder is on linux and the folder is NFS shared. Use the following command: mount -t nfs o rw,username=tvuser //172.19.13.81/ShareForEveryone /VIQ After successfully mounting the /VIQ directory, you need to configure VirtualIQ and specify the Local Path For Backup using the following steps. (a) Following screen pops up when backup option is selected from VM Overview from VirtualIQ and there are no Backup servers configured.
/VIQ needs to be specified in the box as shown above. (b) Following screen pops when backup option is selected from VM overview from VirtualIQ and there are Backup Servers configured. /VIQ needs to be specified in the box as shown above To use local backup feature one needs to select Local Backup option. It is only then Local Path For backup is shown. (c) Using backup from scheduled task, without Backup Server
/VIQ needs to be specified in the box as shown above (d) Using Backup from scheduled task with Backup Server /VIQ needs to be specified in the box as shown above After specifying the Local Path for Backup, Backup action can be invoked. After the Backup is complete, VM folder will be created inside /VIQ
3. Using Remote Backup Server option (no Local mount path): Step 1: Configure File Transfer Root on XenServer for the Host There is limited space in root file system on XenServer. One needs to provide extra space by mounting network shared folder as explained in section 2.1 and 2.2. Or User can provide extra disk and mount it as a folder. Let us assume, this is mounted in /FileTransferRoot. This needs to be specified under SSH Root Directory as on Host Overview Page under Configuration tab as shown below: Host is 172.19.13.74: Step 2: Specifying Backup Server Add Backup Server on Configuration Page in VirtualIQ as shown below In this example, the backup server is 172.19.13.75, file transfer client is SSH, SSH server is running on this machine. FTP can also
be selected and used as file transfer client, but FTP server needs to be running on the machine. Step 3: Invoking Backup action 1. From VM Overview page: Select 172.19.13.75 as backup server as shown. One can choose live backup option if one does not want to shutdown the VM. To invoke the action by clicking Start Backup button 2. From Scheduled Task page:
Select 172.19.13.75 as backup server as shown. One can choose live backup option if one does not want to shutdown the VM. Schedule the backup task. After the backup is complete: The VMs will be backed up under the backup folder, in present example it will be inside /root/backup/. If the target backup server is a windows machine the backup VMs will be stored inside the file transfer root and the backup folder name specified while configuring backup server on VirtualIQ.