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

Re: vm to lun id number

$
0
0

I'm afraid I don't have a vSphere 4.1 left in my lab.

But the problem is probably how the script links the disk Uuid with the Canonicxalname of the LUN.

Can you try the following for a VM that you know has a RDM ?

 

foreach($vminGet-VMMyVMwithaRDM){  $luns=Get-ScsiLun-VmHost$vm.Host-LunTypeDisk
  $vm.ExtensionData.Config.Hardware.Device|where {$_.gettype().Name-eq"VirtualDisk"} |%{    if("physicalMode","virtualmode"-contains$_.Backing.CompatibilityMode){      $disk=$_.Backing.LunUuid
      $luns|      Select@{N="VM";E={$vm.Name}},CanonicalName,@{N="LunUuid";E={$disk}} |ft-AutoSize
    }  } }

 

In the output there should be a line where the 2nd part of the CanonicalName is present in the Uuid.

Uuid-Canonical.png


Viewing all articles
Browse latest Browse all 244528


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