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.
- 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:
- Retrieve the vSAN cluster configuration of the cluster to which you want to mount the remote datastore.
$config = Get-VsanClusterConfiguration -Cluster "MyCluster"
- Mount the remote datastore.
Set-VsanClusterConfiguration -Configuration $config -MountRemoteDatastore (Get-Datastore -Name "MyDatastore")
- (Optional) Retrieve the mounted datatore.
$newVsanConfiguration = Get-VsanClusterConfiguration -Cluster "MyCluster" $newVsanConfiguration.RemoteDatastore
To unmount a datastore:
- Retrieve the new vSAN cluster configuration of the cluster from which you want to unmount the remote datastore.
$vsanConfiguration = Get-VsanClusterConfiguration -Cluster "MyCluster"
- Unmount the remote datastore.
Set-VsanClusterConfiguration -Configuration $vsanConfiguration -UnMountRemoteDatastore $vsanConfiguration.RemoteDatastore
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:
Configure the remote vSAN server cluster configuration.
It depends on the network topology between the client and server clusters in your HCI Mesh configuration.
- In a symmetric HCI Mesh configuration:
$serverconfig = New-RemoteVsanServerClusterConfig -cluster $clusterServer -networktopology "Symmetric"
- In an asymmetric HCI Mesh configuration with one stretched cluster.
$serverconfig = New-RemoteVsanServerClusterConfig -cluster $clusterServer -networktopology "Asymmetric" -ServerSiteName "Secondary"
- 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"
- In a symmetric HCI Mesh configuration:
- Retrieve the vSAN cluster configuration of the cluster to which you want to mount the remote datastore.
$clusterClient = Get-VsanClusterConfiguration -Cluster "MyCluster"
- Mount the remote datastore.
Set-VsanClusterConfiguration -configuration $clusterClient -MountRemoteDatastore (Get-Datastore -Name "MyDatastore") -RemoteVsanServerClusterConfig $serverconfig
To unmount a datastore:
- Retrieve the new vSAN cluster configuration of the cluster from which you want to unmount the remote datastore.
$newVsanConfiguration = Get-VsanClusterConfiguration -Cluster "MyCluster"
- 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:
- Add the different vCenter Server as a datastore source to your current vCenter Server system.
$dsSource = New-VsanHCIMeshDatastoreSource -VCHost <RemoteVCAddress> -User <MyVCUser> -Password <MyVCPassword>
- Retrieve the available remote datastores.
$ds = Get-VsanHCIMeshDatastore -VsanHCIMeshDatastoresource $dsSource
- Retrieve the vSAN cluster configuration of the cluster to which you want to mount the remote datastore.
$clusterClient = Get-VsanClusterConfiguration -Cluster "MyCluster"
- Mount the remote datastore.
Set-VsanClusterConfiguration -Configuration $clusterClient -MountXVCDatastore $ds
- (Optional) Retrieve the mounted remote datastore.
$vsanConfiguration = Get-VsanClusterConfiguration -Cluster "MyCluster" $vsanConfiguration.VsanXVCDatastore
Set-VsanClusterConfiguration -Configuration $vsanConfiguration -UnmountXVCDatastore $ds