Starting from VMware PowerCLI 12.7 and vSAN 7.0 Update 1, you can mount and unmount remote vSAN datastores to your vSAN-enabled clusters.

You can mount a remote datastore:
  • From a vSAN or vSAN ESA-enabled cluster on the same vCenter Server system.
  • From a vSAN stretched cluster.
  • From a vSAN cluster on a different vCenter Server system.

Mount and Unmount a Remote vSAN Datastore from the Same vCenter Server System

Starting from VMware PowerCLI 12.7 and vSAN 7.0 Update 1, you can mount a remote vSAN datastore from another vSAN-enabled cluster residing on the same vCenter Server system.

To mount a datastore:

  1. Retrieve the vSAN cluster configuration of the cluster to which you want to mount the remote datastore.
    $config = Get-VsanClusterConfiguration -Cluster "MyCluster"
  2. Mount the remote datastore.
    Set-VsanClusterConfiguration -Configuration $config -MountRemoteDatastore (Get-Datastore -Name "MyDatastore")
  3. (Optional) Retrieve the mounted datatore.
    $newVsanConfiguration = Get-VsanClusterConfiguration -Cluster "MyCluster"
    $newVsanConfiguration.RemoteDatastore

To unmount a datastore:

  1. Retrieve the new vSAN cluster configuration of the cluster from which you want to unmount the remote datastore.
    $vsanConfiguration = Get-VsanClusterConfiguration -Cluster "MyCluster"
  2. Unmount the remote datastore.
    Set-VsanClusterConfiguration -Configuration $vsanConfiguration -UnMountRemoteDatastore $vsanConfiguration.RemoteDatastore
Important: Starting from VMware PowerCLI 13.1.0 and vSAN 8.0 Update 1, you can mount remote datastores from vSAN ESA-enabled clusters. You can follow the same steps as for vSAN clusters.

Mount and Unmount a Remote vSAN Datastore from a vSAN Stretched Cluster

Starting from VMware PowerCLI 13.1.0 and vSAN 8.0 Update 1, you can mount a remote vSAN datastore to a vSAN cluster from a vSAN stretched cluster.

To mount a datastore:

  1. Configure the remote vSAN server cluster configuration.

    It depends on the network topology between the client and server clusters in your HCI Mesh configuration.

    1. In a symmetric HCI Mesh configuration:
      $serverconfig = New-RemoteVsanServerClusterConfig -cluster $clusterServer -networktopology "Symmetric" 
      
    2. In an asymmetric HCI Mesh configuration with one stretched cluster.
      $serverconfig = New-RemoteVsanServerClusterConfig -cluster $clusterServer -networktopology "Asymmetric" -ServerSiteName "Secondary"
      
    3. In an asymmetric configuration where both the client and server cluster are stretched clusters.
      $serverconfig = New-RemoteVsanServerClusterConfig -cluster $clusterServer -networktopology "Asymmetric" -ServerSiteName "Secondary" -ClientSiteName "Preferred"
      
  2. Retrieve the vSAN cluster configuration of the cluster to which you want to mount the remote datastore.
    $clusterClient = Get-VsanClusterConfiguration -Cluster "MyCluster"
  3. Mount the remote datastore.
    Set-VsanClusterConfiguration -configuration $clusterClient -MountRemoteDatastore (Get-Datastore -Name "MyDatastore") -RemoteVsanServerClusterConfig $serverconfig

To unmount a datastore:

  1. Retrieve the new vSAN cluster configuration of the cluster from which you want to unmount the remote datastore.
    $newVsanConfiguration = Get-VsanClusterConfiguration -Cluster "MyCluster"
  2. Unmount the datastore.
    Set-VsanClusterConfiguration -configuration $newVsanConfiguration -UnmountRemoteDatastore $newVsanConfiguration.RemoteDatastore

Mount and Unmount a Remote vSAN Datastore from a Different vCenter Server System

Starting from VMware PowerCLI 13.1.0 and vSAN 8.0 Update 1, you can mount a remote vSAN datastore to a vSAN cluster from a vSAN cluster residing on a different vCenter Server system.

To mount a datastore:

  1. Add the different vCenter Server as a datastore source to your current vCenter Server system.
    $dsSource = New-VsanHCIMeshDatastoreSource -VCHost <RemoteVCAddress> -User <MyVCUser>  -Password <MyVCPassword>
  2. Retrieve the available remote datastores.
    $ds = Get-VsanHCIMeshDatastore -VsanHCIMeshDatastoresource $dsSource
  3. Retrieve the vSAN cluster configuration of the cluster to which you want to mount the remote datastore.
    $clusterClient = Get-VsanClusterConfiguration -Cluster "MyCluster"
  4. Mount the remote datastore.
    Set-VsanClusterConfiguration -Configuration $clusterClient -MountXVCDatastore $ds
    
  5. (Optional) Retrieve the mounted remote datastore.
    $vsanConfiguration = Get-VsanClusterConfiguration -Cluster "MyCluster"
    $vsanConfiguration.VsanXVCDatastore
To unmount the datastore:
Set-VsanClusterConfiguration -Configuration $vsanConfiguration -UnmountXVCDatastore $ds