Hi
i am trying to develop an app in PowerCli .net Api
i could not find out that how can i use "MountVmfsVolume" method under the HostStorageSystem.
HS.MountVmfsVolume needs an vmfsUuid and i retrive it from "QueryUnresolvedVmfsVolume"
But i get this error : "The object or item referred to could not be found."
İ try to code like this,
HostStorageSystem HS = new HostStorageSystem(Host.Client, mor);
foreach (HostUnresolvedVmfsVolume V in HS.QueryUnresolvedVmfsVolume())
{
string[] array = new string[] { V.VmfsUuid };
HS.MountVmfsVolume(array[0]);
//HS.MountVmfsVolume(array[0].ToString());
}
Thank you for your help.
Your code converted to PowerCLI, will be something like the following:
$VMHostStorage = Get-VMHost -Name ESXi01 | Get-VMHostStorage | Get-View
foreach ($Volume in ($VMHostStorage.QueryUnresolvedVmfsVolume()))
{
$VMHostStorage.MountVmfsVolume($Volume.vmfsUuid)
}
Hello
İ wrote this code in .NET below and i found uuid as "56fe100d-d5f3a81a-853b-441ea1430778"
HostStorageSystem HS = new HostStorageSystem(Host.Client, mor);
foreach (var item in HS.QueryUnresolvedVmfsVolume())
{
HS.MountVmfsVolume(item.VmfsUuid.ToString());
}
But i got same error..
