ganapa2000
Hot Shot
Hot Shot

Unable to remove Perennially Reserved on device

Jump to solution

Hi,

Using the below script, I am unable to Perennially Reserved on device. 

Please help.

$myhost = "10.10.10.3"
$rdm = "naa.624578bdfgdf454455690001109e"
$myesxcli = get-esxcli -VMHost $myhost
$myesxcli.storage.core.device.setconfig($false, $rdm, $false)

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

No, like this

$myhost = "10.10.10.3"
$rdm = "naa.624578bdfgdf454455690001109e"

$myesxcli = Get-EsxCli -VMHost $myhost -V2
$myesxcli.storage.core.device.setconfig.Invoke(@{device=$rdm;perenniallyreserved=$false})


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
6 Replies
LucD
Leadership
Leadership

Works for me, are you sure?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ganapa2000
Hot Shot
Hot Shot

LucD,

The device size shows Zero. I am assuming that disk might have removed incorrectly.

When I execute the below command on the ESXi, it works but the script dont work through PowerCLI

esxcli storage core device setconfig -d naa.624578bdfgdf454455690001109e --perennially-reserved=false

Tags (1)
0 Kudos
LucD
Leadership
Leadership

Then it is probably a problem with LUNs with size 0.
Did you also try the V2 version of Get-EsxCli?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ganapa2000
Hot Shot
Hot Shot

LucD,

you mean like this ?

$myhost = "10.10.10.3"
$rdm = "naa.624578bdfgdf454455690001109e"
$myesxcli = get-esxcli -VMHost $myhost -V2
$myesxcli.storage.core.device.setconfig.invoke($false, $rdm, $false)

0 Kudos
LucD
Leadership
Leadership

No, like this

$myhost = "10.10.10.3"
$rdm = "naa.624578bdfgdf454455690001109e"

$myesxcli = Get-EsxCli -VMHost $myhost -V2
$myesxcli.storage.core.device.setconfig.Invoke(@{device=$rdm;perenniallyreserved=$false})


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ganapa2000
Hot Shot
Hot Shot

Perfect 🙂 Thank you so much.

0 Kudos