How to Create a Raw Logical Volume Manager Virtual Disk Infrastructure with XenServer

This article describes how to create a raw logical volume. Prior to XenServer 5.5, XenServer Storage Repositories (SR) used a raw logical volume in a traditional Linux manner. Starting with XenServer 5.5, Citrix XenServer has a newer container in the Microsoft VHD format. Although Microsoft VHD is a file specification, it is used with the Logical Volume Manager (LVM) as documented in CTX124024 – XenServer 5.5 Update 2 Administrator’s Guide.

Follow this Procedure:

On a Local Storage, iSCSI, or Fibre Channel SR please complete the following:

  1. Retrieve the Universal Unique Identifier (UUID) of the SR USING the xe sr-list command, which can be modified. xe sr-list | more displays a page at a time as opposed to the previous command which scrolls off in a long listing. Another option is to filter by type. The following screen shot uses type=lvm. Other filters are type=lvmoiscsi for iSCSI and type=lvmohba for Fibre Channel.

  1. Once you have the UUID of the SR that you want to create a raw LVM virtual disk image (VDI) for, use the following command where you use the parameter “sm-config:type=raw”:

    xe vdi-create sm-config:type=raw sr-uuid=687a023b-0b20-5e5f-d1ef-3db777ce7ae4 name-label=”My Raw LVM VDI” virtual-size=8GiB type=user

    The command completes when you see a new UUID for the new VDI:
    556cf57b-8a1d-4211-8daf-6157956cac46

  1. Once complete, you can see that the new VDI has a different label than other VDIs. Thereis “LV-<uuid of the VDI> as in the following lvdisplay | more command:

  1. Attach this VDI to a new VM or an existing one, if needed. Note: When creating and using RAW logical volumes instead of VHD based logical volumes that all ability to take snapshots/clones of virtual disk images.
  2. On the Storage Tab of the SR, you should see a new unformatted VDI:

Click here to view the full article