Nice script I found to get the lun ids for your vm
Thanks pelicano
$vm= "VMNAMEHERE"
if (Get-VM $VM)
{
$Disks= Get-VM $VM | Get-HardDisk | Where {$_.DiskType -eq “RawPhysical”}
Foreach ($Disk in $Disks) {
$Lun= Get-SCSILun $Disk.SCSICanonicalName -VMHost (Get-VM $VM).VMHost
$Lun.RuntimeName.Substring($Lun.RuntimeName.LastIndexof(“L”)+1)
}
}
update:
here is another good script that I used to find what vmdk a particular lun number is associated with
Thanks pelicano
$vm= "VMNAMEHERE"
if (Get-VM $VM)
{
$Disks= Get-VM $VM | Get-HardDisk | Where {$_.DiskType -eq “RawPhysical”}
Foreach ($Disk in $Disks) {
$Lun= Get-SCSILun $Disk.SCSICanonicalName -VMHost (Get-VM $VM).VMHost
$Lun.RuntimeName.Substring($Lun.RuntimeName.LastIndexof(“L”)+1)
}
}
update:
here is another good script that I used to find what vmdk a particular lun number is associated with
Get-VM | Get-HardDisk -DiskType "RawPhysical","RawVirtual" |
where { $_.ScsiCanonicalName -eq "naa.600601607290250060ae06da248be111"} |
Select Parent,Name,DiskType,ScsiCanonicalName,DeviceName | fl
Thanks to:
http://virtuallyhyper.com/2012/06/powercli-script-identify-which-vm-using-rdm-lun-identified-naa-id-lun/