Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 293210

A little help converting Perl CLI to PowerShell

$
0
0

Hi all - this question revolves around both NetApp and VMware functionality - I am only really expecting replies on the VMWare side, so please feel free to skip or gloss over the NetApp stuff (I'll be asking the same question on their support forums)

 

I have a series of scriptable steps that run and creates a clone of a volume.
Once this volume has been created, I initiate a VMWare rescan of the available volumes with
esxcfg-rescan.pl --server VCenter1 --vihost VHost1 vmhba2
I believe the Powershell equivalent is
Get-VMHostStorage -RescanAllHba -VMHost VHost1
The bit I am struggling with is next - working out what the new NetApp volume is seen as by VMware and getting the volume resignatured.
What I currently do is this, but I have been unable (as yet) to find the equivalent PowerShell commands
vifs.pl --server vCenter -Z "FARM 1" -S
The PowerShell equivalent seems to be Get-Datastore, but the output is fairly different and I am still trying to work out how to discover the 'newly' created snapshot from the list.
I used to use
esxcfg-volume.pl --server vCenter1 --vihost VHost1 -l
This would return only the problematic entries - the new snapshot for example and returns (amongst other things) a VMFS UUID -
VMFS3 UUID/label: 4ed80a41-92a1c549-2df1-b499bac0cc24/D10
Can mount: No (the original volume is still online)
Can resignature: Yes
Extent name: naa.60a98000503444504e5a686655565239:1     range: 0 - 511999 (MB)

This UUID I can then use to initiate a re-signature.
Unfortunately, the only correlation I can seem to find from NetApp PowerCLI is the Get-VMHostDisk cmdlet which gives me lines like:-
/vmfs/devices/disks/naa.60a98000503444504e5a686655565239          1048735744
I need the UUID from this, or I need a way to discover the UUID from PowerCLI in the same way as above
Question: Is there a Powershell equivalent to vifs.pl and esxcfg-volume.pl? I need to list and resignature volumes, given a NetApp /vol/T00/T00 type reference, or an naa.+++ type extent reference.
I think I can get the extent name from NetApp, I don't know how to get the UUID from it.
The old command I used was : esxcfg-volume.pl --server vCenter1 --vihost VHost1 -l
and, how do i resignature it given the extent refrerence (naa.+++++)
The old command I have used the UUID : esxcfg-volume.pl --server vCenter1 --vihost VHost1 -r "4ed80a41-92a1c549-2df1-b499bac0cc24"
Everything else, I am pretty much complete on
Any help would be greatly appreciated.

Viewing all articles
Browse latest Browse all 293210

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>