Skip to main content
Version: v22.0

Virtualize a SQL Server Instance using DxCLI Quick Start Guide


This quick start guide that describes how to configure and virtualize an instance of Microsoft SQL Server using DxCLI. Using this guide you will create a virtual host, create and format a virtual disk for your cluster nodes, create a disk group, and add a virtual instance of Microsoft SQL Server.


For cloud platforms with DxEnterprise pre-installed, please see the Azure or AWS installation guides.

  • Microsoft SQL Server 2017 or later installed on each server (node). Reference Microsoft documentation for instructions on installing SQL Server.

  • SAN (network) storage presented and accessible to the DxEnterprise cluster nodes.

  • A valid DxEnterprise license with availability group management features enabled. If tunnels will be used for availability group connections, tunneling features must also be enabled. A fully featured Developer Edition is available free for non-production use. To purchase DxEnterprise software for production workloads, visit the DH2i Store.

Add a Virtual Host

  1. To add a Vhost, use the dxcli cluster-add-vhost command and include the nodes you want to be attached to the virtual host.

    sudo dxcli cluster-add-vhost vhost1 UBUNTU1804,UBUNTU2004,RHEL8

    Ensure that the members you select are all exclusively Windows or Linux machines, not a mixture of both. Mount points for disks will not function across operating system types.

Manage a Disk for your Cluster

You need to manage a disk for the nodes in your Vhost so that SQL Server can store its data on a SAN disk.

  1. Run the sudo dxcli get-disks command to gather information on the disks that are available to your cluster.

    sudo dxcli get-disks | dxcli format-xml

    To make the output easier to read you can pipe (redirect) the XML output of get-disks to the command dxcli format-xml.

  2. Search through the XML output until you find an unmanaged disk that is available to all the nodes participating in the Vhost.


    You only need to find one disk id with a managed XML attribute of 1. When DxEnterprise manages a disk, it manages it across all nodes.

  3. Use the dxcli add-disk command to add the disk to your cluster using the disk-id.

    sudo dxcli add-disk ed455af7-8246-28fb-b5c7-b3ba677f865e
  4. Next, create a volume for the disk using the dxcli create-volume command with your disk id and the size of the volume in bytes. This command will generate a volume id for your disk. Copy this volume id, as you will need it for the next command.

    sudo dxcli create-volume ed455af7-8246-28fb-b5c7-b3ba677f865e,1000000000
  5. Format the disk using the dxcli format-volume command, specifying your volume ID, format type, volume name, block size, quick format option, and volume compression.

    sudo dxcli format-volume 56b4608b-2dc7-410b-a2ac-0a2ac86daea6 EXT4 textVolume1 4096 quick_format:true compression:false

Create a Diskgroup and Virtualize SQL Server Instance

  1. Set your volume mount point using the dxcli set-mountpoint command. Your mount point is the location on your managed SAN disk where your SQL Server data will be stored (e.g. //mnt/testFolder1).

    sudo dxcli set-mountpoint <volume_id> <mount_point>
  2. Add a diskgroup to your virtual host using the dxcli vhost-set-diskgroup command. You must specify your virtual host name as well as your disk ID.

    dxcli vhost-set-diskgroup vhost1 ed455af7-8246-28fb-b5c7-b3ba677f865e
  3. Add an instance of Microsoft SQL Server using the add-instance command.

    add-instance VHOST1\\MSSQLSERVER 1433 //mnt/testDrive1/data //mnt/testDrive1/logs sa p@ssw0rd

    You must provide a SQL Server username and password for non-Windows systems.

Additional Information