VMware Cloud Community
randylawrence42
Contributor
Contributor

Add RDM Disks to VM using SCSI IDs

I spent the day simplifying some of my RDM Functions to assist with people trying to map out RDM Disks to VMs using SCSI ID for input.

I played legos today and packaged 4 functions to allow people to feed CSV Data for Mapping RDM Disks.

It seems to be a pretty frequent topic in these forums.

Tip on Naming Conventions and Input Logic for my Functions.

Fp= File Path = Full VMDK File Path =
FP Example : '[Sempra-OraTable1] rl-centClone72/rlcentClone72_OraTable1_3x11_5c6ea.vmdk'

VDN = VirtualDeviceNode = SCSI ID =  Matches what they gave you in the vSphere Web UI 
VDN Format I Use :  Ctr-ID:DiskID : Example Controller 1 / SCSI Disk ID 5 = 1:5


List of PowerShell Functions in Zip File Attached 

Gold Bonus = < Get-OraDiskInfo.ps1 >

Function 1 = < New-RdmFpCsv.ps1 > 

Function 2 = < Mount-RdmFpCsv.ps1 > 

Function 3 < Umount-RdmVdnCsv.ps1 > 

Function 4 < Delete-RdmVdnCsv.ps1 > 


CSV Data Format for Parameters 

Function 1 = < New-RdmFpCsv.ps1 > 
Function 2 = < Mount-RdmFpCsv.ps1 > 
VDN,VmdkFilePath,diskNAA,MultiWriterFlag

** Function 1 and Function 2 can be fed the same CSV as it is most likely you will be Mounting to Secondary Node using same Info for Path.

Function 3 < Umount-RdmVdnCsv.ps1 > 
Function 4 < Delete-RdmVdnCsv.ps1 > 
VDN

** Just need VDN Path for RDM Disk you want to unmount or delete.
** Typical use case Unmount from all Secondary Nodes then run Delete from Primary Node

I will Add two Example CSV Input Files that I used to test in my lab today.

Just follow that format for the CSV Parameter Input.

Hope this helps someone out.

Cheers RL

 

 

 

 

 

 

 

 

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership

Nice initiative and a great contribution to the community.

Just one consideration, the PowerCLI Discussion forum is not the ideal platform to find this kind of community contribution.
Seen the number of threads in here this will scroll rather quickly out of view.
And the Search functionality is rather limited (and awkward).

Might I suggest you also post this to the PowerCLI Documents and/or the VMware Sample Exchange.


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

Tags (1)
Reply
0 Kudos
randylawrence42
Contributor
Contributor

Thanks, Will Do.  I will work on moving this over there.  

Reply
0 Kudos