How to Back Up Virtual Machine Metadata to a USB Device

How to Back Up Virtual Machine Metadata to a USB Device

book

Article ID: CTX121282

calendar_today

Updated On:

Description

When migrating a set of Virtual Machines (VMs) from one XenServer host or pool to another, it is necessary to back up and then restore the Virtual Machine Metadata.

It is recommended that the Virtual Machine Metadata be stored on the same Storage Repository as the Virtual Machines. But, it is also possible to store this metadata on a USB mass storage device such as a thumb drive or portable hard disk.

This article describes how to create a Virtual Machine Metadata backup to a USB storage device by creating a Storage Repository on the USB storage device and using xsconsole to perform the backup.

Note: Applying hotfix XS82ECU1066 to your Citrix Hypervisor 8.2 Cumulative Update 1 hosts changes the behavior of this feature. For more information, see Backup and restore capabilities in XenServer xsconsole


Instructions

Following are the requirements:

  • XenServer 8.2 CU1

  • USB mass storage device such as a USB flash drive or portable hard disk. Please note that all data will be destroyed on this device and will need to be reformatted if used later.

Complete the following procedure:

  1. Determine the device file needed for the USB storage device. To do this, list all block devices and their partitions by executing the following command, as shown in the following screen shot:
    fdisk –l 

    User-added image

  2. Create the storage repository on the USB storage device.

​By examining the output of fdisk – (as shown in step 1):

  1. Identify the partition on the USB storage device.
  2. Create an ext3-based storage repository on the USB storage device by executing:
    xe sr-create host-uuid=<valid_uuid> content-type=user \
    name-label="Metadata Backup SR " shared=false \
    device-config:device=<Device from Step 1> type=lvm

A successful completion of the command returns the UUID of the new SR.

Example:

xe sr-create name-label="My thumb drive" content-type=user type=lvm device-config:device=/dev/sdb1

  1. In the XenServer console (accessible with xsconsole using the command line interface in the XenCenter), select Backup, Restore and Update:

User-added image

  1. Select Backup Virtual Machine Metadata:
    User-added image

  2. Select the new storage repository created earlier using the xe sr-create command:
    User-added image

  3. Proceed with VM backup using your thumb drive or other USB drive. 
    User-added image

Issue/Introduction

This article describes how to create a Virtual Machine Metadata backup to a USB storage device by creating a Storage Repository on the USB storage device and using xsconsole to perform the backup.

Additional Information

https://docs.xenserver.com/en-us/citrix-hypervisor/dr/backup.html