VMware Cloud Community
vmEck
Hot Shot
Hot Shot

Need help updating Get-VMDiskMapping

Hey all, I'm trying to help a customer map some VMDK's to logical drives in Windows.  We were trying to use Get-VMDiskMapping from Alan & Luc's book but just as there was an update required for HW7 there seems to be some changes required for HW8 because the script does not report correct information.  Has anyone tried and successfully used the script on vSphere 5.1+ with HW8+?

Thank you!

Reply
0 Kudos
4 Replies
Brian_Graf
Enthusiast
Enthusiast

Do you mind posting the script here?

Senior Product Manager - Distributed Resource Management | @vBrianGraf
Reply
0 Kudos
vmEck
Hot Shot
Hot Shot

Sure, it's a bit tough since this came from the book (i.e. no easy way to copy/paste) so indentation and line breaks may be wrong.  File is attached.

Reply
0 Kudos
Brian_Graf
Enthusiast
Enthusiast

Thanks Adam. What errors are you getting?

Senior Product Manager - Distributed Resource Management | @vBrianGraf
Reply
0 Kudos
vmEck
Hot Shot
Hot Shot

The script runs successfully without any errors.

The issue is with the report.  Because of changes between the HW versions (see section in the script regarding how it deals with differences in HW4 and HW7) the script does not correctly report the VMDK to logical drive mapping for VMs with HW8 (or newer).  At least not for my customer.

For example, they have a Windows 2008 R2 VM that has quite a few logical drives - 10.  Each of those drives is assigned a drive letter in Windows.  The script correctly maps some of the VMDK's to drive letter but most of them list a blank drive letter.

I'm sorry I can't provide a screenshot at this time but I'm working on it. I know that would help.

Reply
0 Kudos