Hi,
I am working with vSphere 6 (no upgrade schedulded)
My problem can be resolved with the KB2057513, nonetheless I need to reclaim space in PowerCLI, not with SSH (internal process, cannot explain here)
Do you know how to reclaim space with PowerCLI?
esxcli storage vmfs unmap --volume-label=volume_label|--volume-uuid=volume_uuid --reclaim-unit=number
Regards
Gary
You can do something like this.
$esxName = 'MyEsx'
$datastoreName = 'MyDatastore'
$esxcli = Get-EsxCli -VMHost $esxName -V2
$sParam = @{
volumelabel = $datastoreName
}
$esxcli.storage.vmfs.unmap.Invoke($sParam)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you. It seems to be okay, unfortunately I have an error message saying " device or resource busy"
I don't have yet the password of the other VMs to check is someone is connecting and working on them.
After that I've personnalized the script like this:
"$esxname= 'my esx'
$esxcli= ' Get-Esxcli -VMhost $esxname - V2
$esxcli.storage.vmfs.unmap.Invoke"
Here's the result:
OverLoadDefinition: {boolean Invoke(Hastable args)}
Membertype:
TypeNameOfValue:
Value:
Name:
IsInstance:
Can you share a screenshot of the error?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You might want to have a look at the last bullet in KB2057513
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I used this: -u|--volume-uuid=volume_uuid
but I have a timeout message...
Sorry, not following.
You didn't use the Get-EsxCli cmdlet?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I did, but I thought you were suggesting to use the -u option.
I already knew about this KB VMware Knowledge Base , but as I said, I have to do it with PowercLI...
No, I was referring to the last bullet in that KB, the one that starts with 'If the UNMAP operation fails and you see an error...'
To try and find why you get the error
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I read the article but I have to activate the SSH to enter the command "vmkfstools"
Unfortunately, my client doesn't want me to activate the SSH --'
It seems we can not unmap a datastore with PowerCLI in vSphere 6.
Thany you anyway
Hi Lucd,
I am trying below command but it was not freeing up the space on the datastore as I have created datastore from scaleio.
regards,
babu
Did you check all the possible reasons why unmap might not work in the KB I referenced earlier?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference