Virtual Ascetic

everything about virtualization, storage, and technology

  • Home
  • About

Your likes and shares help increase my enthusiasm to share knowledge. Please leave a comment if you like any post

Map LUN NAA id to Virtual Machine (VM) using PowerCLI

February 27, 2015 By asceticadmin

Have you had a situation in which you wanted to detach a RDM LUN or LUN using NAA id, but could not because there were multiple LUNs with the same size. In such a situation you cannot distinguish which LUN NAA to pick? This post is your answer because what you need is to map the NAA id to a VM. LUNs already in use will show connected to a VM and the LUNs that are not in use should not be attached to any VM. It’s that simple.

Today I was looking to detach some LUNs and it worked fine for the most part until I came across one LUN which had a conflict with another.

Two LUNs had the same size and the same HLU. Moreover, they were also presented as RDM in the same cluster. So it made a bit confusing to find out which LUN I should remove since all I could was identify the LUN using naa id.

Looking around, I came across VMware KB – 2001823 that shows very clearly how to identify virtual machines with Raw Device Mappings (RDMs) attached to them.

The command is very simple and all you need to do is connect to vCenter and run the query –

connect-viserver -server EnterYourvCenterName

Get-VM | Get-HardDisk -DiskType “RawPhysical”,”RawVirtual” | Select Parent,Name,DiskType,ScsiCanonicalName,DeviceName | fl > output.txt

 

Note that I took the output to a file (KB uses a different syntax). When you work with a large number of LUNs it is great to have flexibility in searching through a file.

The output came across in the following format :

Parent : Virtual Machine Display Name
Name : Hard disk 4
DiskType : RawVirtual
ScsiCanonicalName : naa.600601602ec03800b92de53df9a6e411
DeviceName : vml.020000000060123456789abcdef0123456789abcde1234567890ab

 

When I ran the above command, I received a listing of all VMs with their RDM devices. All I had to do after the output was generated was to copy the LUN Identifier (NAA id) from vCenter – one naa id at a time, and search in this file.

If you find it then skip that NAA identifier and do not detach the LUN because that particular LUN is in use. If you search and cannot find the NAA identifier in this file – that would be the one to detach.

Now if anyone has the question – what if there are multiple LUN naa id’s and they cannot be found in this file, then my answer is – you can detach all of those LUNs since they are not being used. If you need to present any LUNs always try to use unique Host LUN Id’s and you would never have any confusion.

In my case, I was trying to remove something that was a legacy item and hence I had a situation with multiple LUNs having same Host LUN ID (HLU).

Filed Under: PowerCLI Tagged With: anil sedha, LUN, Map, naa id, powercli, to, using, vExpert, virtual machine, vm, vmware kb

VMware moving fast to offer Heartbleed patches for its products

April 16, 2014 By asceticadmin

VMware has published a KB article and updated it with new information related to the patches for OpenSSL (aka Heartbleed) for VMware Products.

The list of VMware products affected are as follows and patches are going to be available by April 19th. The Horion DaaS and vCloud Hybrid Service remains unaffected.

  • ESXi 5.5
  • NSX-MH 4.x
  • NSX-V 6.0.x
  • NVP 3.x
  • vCenter Server 5.5 (including VMware Big Data Extensions 1.x)
  • vFabric Web Server 5.0.x – 5.3.x (For remediation details, see the Security Advisory on Critical Updates to vFabric Web Server document.)
  • VMware Fusion 6.0.x
  • VMware Horizon Mirage Edge Gateway 4.4.x (for specific remediation details, see VMware Security Advisory VMSA-2014-0004)
  • VMware Horizon View 5.3 Feature Pack 1
  • VMware Horizon View Client for Android 2.1.x, 2.2.x, 2.3.x
  • VMware Horizon View Client for iOS 2.1.x, 2.2.x, 2.3.x
  • VMware Horizon View Client for Windows 2.3.x
  • VMware Horizon Workspace 1.0 (for specific remediation details, see VMware Security Advisory VMSA-2014-0004)
  • VMware Horizon Workspace 1.5 (for specific remediation details, see VMware Security Advisory VMSA-2014-0004)
  • VMware Horizon Workspace 1.8 (for specific remediation details, see VMware Security Advisory VMSA-2014-0004)
  • VMware Horizon Workspace Client for Macintosh 1.5.1
  • VMware Horizon Workspace Client for Macintosh 1.5.2
  • VMware Horizon Workspace Client for Windows 1.5.1
  • VMware Horizon Workspace Client for Windows 1.5.2
  • VMware Horizon Workspace for Macintosh 1.8
  • VMware Horizon Workspace for Windows 1.8
  • VMware OVF Tool 3.5.0
  • VMware vCloud Automation Center (vCAC) 6.x
  • VMware vCloud Networking and Security (vCNS) 5.1.3
  • VMware vCloud Networking and Security (vCNS) 5.5.1

There is also a long list of VMware products that are not affected by the bug and more information is available on the KB article.

Filed Under: General Tagged With: 2014, anil sedha, bug, EMCElect, heartbleed, issue, openssl, response, to, vExpert, vmware

Let’s Get Social

  • Google+
  • Linkedin
  • Twitter


Recent Posts

  • VMware’s Photon OS 1.0 Now Available!
  • VMware’s Photon OS 1.0 Now Available!
  • VMware’s Photon OS 1.0 Now Available!
  • VMware’s Photon OS 1.0 Now Available!
  • VMware’s Photon OS 1.0 Now Available!

Archives

  • June 2016
  • May 2016
  • April 2016
  • February 2016
  • September 2015
  • August 2015
  • February 2015
  • January 2015
  • October 2014
  • September 2014
  • August 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • October 2013
  • September 2013
  • August 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • November 2012
  • October 2012