XenServer

SMB SR

Shares on SMB servers (that support SMB 3) can be used immediately as an SR for virtual disks. VDIs are stored in the Microsoft VHD format only. Also, as these SRs can be shared, VDIs stored on shared SRs allow:

  • VMs to be started on any XenServer® hosts in a resource pool

  • VMs migrate between XenServer hosts in a resource pool using live migration (without noticeable downtime)

Important:

  • Support for SMB3 is limited to the ability to connect to a share using the 3 protocol. Extra features like Transparent Failover depend on feature availability in the upstream Linux kernel are not supported in XenServer 8.4.
  • You can locate your SMB3 filer on a Windows Server system. Do not use a Windows Server system that is located on a VM.
  • Clustered SMB is not supported with XenServer.
  • SMB storage is available for XenServer Premium Edition customers.
  • It is highly recommended that you use a dedicated storage network, using at least two bonded links, ideally to independent network switches with redundant power supplies.
  • When using SMB storage, do not remove the share from the storage before detaching the SMB SR.

VDIs stored on file-based SRs are thinly provisioned. The image file is allocated as the VM writes data into the disk. This approach has the considerable benefit that the VM image files take up only as much space on the storage as is required. For example, if a 100 GB VDI is allocated for a VM and an OS is installed, the VDI file only reflects the size of the OS data written to the disk rather than the entire 100 GB.

VHD files may also be chained, allowing two VDIs to share common data. In cases where a file-based VM is cloned, the resulting VMs share the common on-disk data at the time of cloning. Each VM proceeds to make its own changes in an isolated copy-on-write version of the VDI. This feature allows file-based VMs to be quickly cloned from templates, facilitating fast provisioning and deployment of new VMs. The maximum supported length of VHD chains is 30.

File-based SRs and VHD implementations in XenServer assume that they have full control over the SR directory on the file server. Administrators must not modify the contents of the SR directory, as this action can risk corrupting the contents of VDIs.

XenServer has been tuned for enterprise-class storage that uses non-volatile RAM to provide fast acknowledgments of write requests while maintaining a high degree of data protection from failure.

Warning:

As VDIs on file-based SRs are created as thin-provisioned VDIs, administrators must ensure that the file-based SRs have enough disk space for all required VDIs. XenServer hosts do not enforce that the space required for VDIs on file-based SRs is present.

Ensure that you monitor the free space on your SR. If the SR usage grows to 100%, further writes from VMs fail. These failed writes can cause the VM to freeze or crash.

Device-config parameters for SMB SRs:

Parameter Name Description Required?
server Full path to share on server Yes
username User account with RW access to share Optional
password_secret (Recommended) Secret ID for the password for the user account, which can be used instead of the password. Optional
password Password for the user account. We recommend that you use the password_secret parameter instead. Optional

Create a shared SMB SR (SMB)

To create an SMB SR, provide the host name or IP address of the SMB server, the full path of the exported share, and appropriate credentials.

xe CLI

Note:

When running the sr-create command, we recommend that you use the device-config:password_secret argument instead of specifying the password on the command line. For more information, see Secrets.

For example, to create a shared SMB SR on 192.168.1.10:/share1, use the following command:

    xe sr-create content-type=user \
    name-label="Example shared SMB SR" shared=true \
    device-config:server=//192.168.1.10/share1 \
    device-config:username=valid_username device-config:password_secret=valid_password_secret type=smb
<!--NeedCopy-->

To create a non-shared SMB SR, run the following command:

    xe sr-create host-uuid=host_uuid content-type=user \
    name-label="Non-shared SMB SR" \
    device-config:server=//192.168.1.10/share1 \
    device-config:username=valid_username device-config:password_secret=valid_password_secret type=smb
<!--NeedCopy-->

In XenCenter®

  1. Open the New Storage Repository wizard: click New Storage on the toolbar.
  2. Select SMB as the physical storage type, then click Next.
  3. On the Name page, enter the name of the new SR. By default, the wizard generates a description of the SR. This description includes a summary of the configuration options you select as you progress through the wizard. To enter your own description, clear the Auto-generate description based on SR settings check box and type in the Description box. Click Next to continue.
  4. On the Location page, specify the details of the storage target:
    • Share Name The IP address or DNS name of the server and the path. For example, \\server\path where server is the DNS name or IP address of the server computer, and path is a folder or file name. Configure the SMB server to export the specified path to all servers in the pool.
    • User name and Password (Optional) To connect to an SMB server using a different user name, enter your login user name and password.
  5. Click Scan to have the wizard scan for existing SMB SRs in the location you specified.
  6. The New Storage Repository wizard lists any existing SRs which are not already attached. You can select an SR from the list and attach it as the new storage repository. Click Reattach an existing SR and select the SR from the list, then click Finish.
  7. If no existing SRs are found, simply click Finish to complete the new SR configuration and close the wizard.
SMB SR