VMware Cloud Community
russjar
Enthusiast
Enthusiast
Jump to solution

Get Virtual Disk Local SCSI Address (Bus:Target)

Hi all,

I'm having a bit of a hard time getting this info from a couple of VMs. I need the local bus:target address for all virtual disks whether they be vmdks or RDMs. I've seen a few examples of comparing the widonws configuration to the virtual machine configuration but I'm not interested in this right now, I just need the virtual machine configuration. I would really appreciate your help. Thanks...

VCP,MCSE NT4/W2k/W2k3, MCSA W2k3
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Try something like this

Get-VM | Get-Harddisk |

Select @{N='VM Name';E={$_.Parent.Name}},

@{N='HD Name';E={$_.Name}},

@{N="SCSIid";E={$strControllerKey = $_.ExtensionData.ControllerKey.ToString(); "{0}`:{1}" -f $strControllerKey[$strControllerKey.Length - 1], $_.ExtensionData.Unitnumber}}


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

View solution in original post

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

Try something like this

Get-VM | Get-Harddisk |

Select @{N='VM Name';E={$_.Parent.Name}},

@{N='HD Name';E={$_.Name}},

@{N="SCSIid";E={$strControllerKey = $_.ExtensionData.ControllerKey.ToString(); "{0}`:{1}" -f $strControllerKey[$strControllerKey.Length - 1], $_.ExtensionData.Unitnumber}}


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

Reply
0 Kudos
russjar
Enthusiast
Enthusiast
Jump to solution

That's Fantastice thanks LucD!

I was poking around and I also found this function get-vmdiskmap which gives some good info as well. I think this function also grabs the Windows disk configuration.

VCP,MCSE NT4/W2k/W2k3, MCSA W2k3
Reply
0 Kudos