Hi all,
I'm scripting with Powershell for preparing a desaster recovery scenario with vSphere 5.1.
I assume, that the primary datacenter is down and I have mapped the replicated volumes of
Compellent storage to a single ESXi-host in the DR-datacenter, which is not connected to vCenter.
If I use the GUI, I can see and add the volumes to the mounted drives without resignature them.
How can I find them with powershell and mount them?
I have found a lot of examples, which are all using "$dsView.QueryUnresolvedVmfsVolumes()"
I just have tested some more with this small script (I'm connected to the ESXi-Host):
$hostView = get-vmhost -name $ESXiIP | get-view
$dsView = get-view $hostView.ConfigManager.DatastoreSystem
$unBound = $dsView.QueryUnresolvedVmfsVolumes()
Her I get the following error-message:
Method invocation failed because [System.Object[]] doesn't contain a method named 'QueryUnresolvedVmfsVolumes'.
At C:\Tools\Powershell\FindVol.ps1:3 char:46
+ $unBound = $dsView.QueryUnresolvedVmfsVolumes <<<< ()
+ CategoryInfo : InvalidOperation: (QueryUnresolvedVmfsVolumes:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
Is that method changed in vSpher 5.1?
I found another method via CLI to do that:
$esxcli = Get-EsxCli -VMHost (Get-VMHost -Name) and
$vmfs in $esxcli.storage.vmfs.snapshot.list()
Here I don't see the volume too; I can only see all volumes via $esxcli.storage.vmfs.extent.list()
but I can't mount that.
Is that the wrong way to do that or do I do that in a wrong way?
All help appriciated
Herbert