Showing posts with label VSphere. Show all posts
Showing posts with label VSphere. Show all posts

Tuesday, 18 August 2015

Convert from EMC naa. in VMware VSphere to Device ID

This is a short how-to on converting the VMware VSphere device wwn (naa. number) to an EMC device ID.
Of course in real life one can always get this by using the symmetrix command line

symdev -sid 1234 list -all -wwn | grep wwn
If it is only few devices you want to work with, you can just copy and paste the naa number from Vsphere Client, where the number (naa) is a bit longer, as it contains additional information. e.g. 
vml.02000800006000097000019570421253303030424253594d4d4554


Convert from naa. to Dev id:
Take the last 8 digits of the naa number
e.g. for naa.60000970000292601174533030334435, numbers after 53 are 3030334435.
This will usually start with a 30.
Break it apart in pairs of two.
So 3030334435 becomes 30 30 33 44 35. The first "30" is discarded, so we'll take only 30 33 44 35
The Dev ID equivalence for the resultant pair of numbers is as follows:
30 = 0
31 = 1
32 = 2
33 = 3

34 = 4
35 = 5
36 = 6
37 = 7
38 = 8
39 = 9
40 = **** DOES NOT EXIST ****
41 = A
42 = B
43 = C

44 = D
45 = E
46 = F
…. Follows in that order

Just write that out and you’ll obtain the dev id.
So in the example, 30334435 becomes
30 = 0
33 = 3
44 = D
35 = 5
thus the EMC device ID for 30334435 is 03D5


Friday, 14 August 2015

VSphere LUN naa identifier decoded and explained

In VMware VSphere, the identifier comes in the form of naa.aaaaaaaabbbbbbbbbbbbccccdddddddd
I’ve been able to find this information from multiple sources, so I think it is very accurate. Your comments are welcome if it doesn't match your case.

The breakdown is as follows:
  • aaaaaaaa is an 8 digit vendor identifier, and I’ve listed the vendors we use below, as well as others I’ve been able to find online:
o    60060480 <— EMC
o    60060e80 <— HDS
o    60a98000 <— NetApp
o    60060160 <— DGC (Clariion)
o    6090a038 <— EQL
I found that in certain cases, you can also do a lookup of the vendor. To do that drop the leading ‘6’ and then take digits 2 to 8 and enter them into an OUI lookup tool http://www.wireshark.org/tools/oui-lookup.html . e.g. entering 0060480 to an OUI lookup confirms the vendor is EMC.
  • bbbbbbbbbbbb is a 12 digit serial # of the device providing the storage.  This may differ from device to device, but matches up perfectly to the id’s of our EMC storage.
  • cccc is a 4 digit code for model (at least for EMC). Please double check with your storage system.
-               on VMAX it’s ‘5330’ on all luns
-               on DMX-3 it’s also ‘5330’
-               on DMX-3000 it’s ‘4E45′

  • dddddddd is an 8 digit LUN identifier.  This differs based on the device on how the device ID is actually represented. I will explain how to decode this number for EMC in a future post.

Thursday, 13 August 2015

How to identify NetApp LUN ID in VMware VSphere?

When using Netapp as your SAN storage, the TL / DR (Target Lun / Device Representation), also known as the VMware LUN identifier, is the hex representation of the NetApp LUN Serial No. string. It is as easy as it sounds:
1.       In vSphere, select the host configuration tab, storage.
2.       Select the Devices View   
3.       Sort by LUN # and locate the LUN you want to verify.
4.       Right click the LUN in the Devices list and select "Copy identifier to clipboard", i.e., naa.600a09803830336d785d476d634c424d
5.       Paste the characters after “naa.” into a Hex to String converter. (i.e., 600a09803830336d785d476d634c424d)
6.       Copy the converted string and paste to a work note. It may contain some special characters, so just concentrate on the readable portion. i.e., 803mx]GmcLBM
7.       In the NetApp System manager, select the LUN you want to verify in the LUN list.
8.       In the LUN properties pane, copy the Serial No. i.e.,  803mx]GmcLBM
9.       Paste Serial No. below the converted hex in the work note and compare.  There may be some odd ASCII characters at the beginning of the converted hex that you can ignore.
Note an alternate method to get the NetApp LUN Serial No. value in the CLI, use the command:

lun show -v

Thursday, 6 August 2015

Using CDP to trace physical networking connections in Netapp Data ONTAP

Have you ever been on a Data ONTAP system without a clear idea of how the physical network is connected, and wish you could interrogate your network to try and find out? If so, CDP – the Cisco Discovery Protocol – might be the help you’re looking for. This can be very useful on systems with large or complex Ethernet configurations.
Once CDP is enabled in Data ONTAP, your Cisco switches will become aware of which NetApp systems are cabled to which ports. It wil know both the source port (on the NetApp) and the destination port (on the Cisco switch).
CDP has been available in Netapp Data ONTAP since version 7.3.3, and is supported in both 7-mode and cDOT, and it’s simply enabled with an option command.
To enable CDP in 7-mode:
options cdpd.enable on
To enable CDP in cDOT:
node run -node * options cdpd.enable on
NOTE that the command is cdpd.enable, not cdp.enable
The nice thing about NetApp’s CDP implementation is that it is bi-directional. That means you can query CDP from either the Cisco switch or the NetApp controller and see information — meaning you don’t have to rely on a network administrator to provide you the information!
To view CDP information from 7-mode Data ONTAP, you would use the cdpd show-neighbors command.
Here’s some sample output:
nas1> cdpd show-neighbors
Local  Remote          Remote                 Remote           Hold  Remote   
Port   Device          Interface              Platform         Time  Capability
------ --------------- ---------------------- ---------------- ----- ----------
e0M    charles         e0M                    FAS3170           146   H        
e0M    nane-cat4948-sw GigabitEthernet1/8     cisco WS-C4948-.  174   RSI      
e3a    nane-nx5010-sw. Ethernet1/4            N5K-C5010P-BF     173   SI       
e4a    nane-nx5010-sw. Ethernet1/14           N5K-C5010P-BF     177   SI
Note that we can see that Filer’s HA partner, charles, is in the output. Here we can see that e0M is cabled to port Giga1/8 on nane-cat4948, whereas e3a and e4a are cabled to Eth1/4 andEth1/14 on nane-nx5010-sw respectively.
This is incredibly useful information if you’re ever trying to track down how a system is cabled!
To view CDP information from clustered Data ONTAP, use the run -node nodeName cdpd show-neighbors command.
The output is the same format as in 7-mode:
dot83cm::> node run -node local cdpd show-neighbors
Local  Remote          Remote                 Remote           Hold  Remote   
Port   Device          Interface              Platform         Time  Capability
------ --------------- ---------------------- ---------------- ----- ----------
e6a    nane-nx5010-sw. Ethernet1/12           N5K-C5010P-BF     145   SI       
e6b    nane-nx5010-sw. Ethernet1/5            N5K-C5010P-BF     145   SI       
e4a    dot83cm-01      e4a                    FAS3240           161   H        
e4b    dot83cm-01      e4b                    FAS3240           161   H        
e0a    nane-cat4948-s. GigabitEthernet1/9     cisco WS-C4948-.  168   RSI
In this case, e6a and e6b go to the same switch, with e4a and e4b going to the other node in this HA pair — that’s my switchless cluster interconnect. e0a goes to an older Catalyst switch.

To view CDP information from Cisco IOS or NX-OS, use the show cdp neighbors command.
Sample output:
nane-nx5010-sw# show cdp neighbors
Capability Codes: R - Router, T - Trans-Bridge, B - Source-Route-Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater,
                  V - VoIP-Phone, D - Remotely-Managed-Device,
                  s - Supports-STP-Dispute, M - Two-port Mac Relay


Device ID              Local Intrfce   Hldtme  Capability  Platform      Port ID
US-WLM-LS02            mgmt0           124     R S I       WS-C6509      Gig5/1
nane-cat4948-sw        Eth1/2          179     R S I       WS-C4948-10GE Ten1/49
dot83cm-01             Eth1/3          163     H           FAS3240       e6b   
mystic                 Eth1/4          127     H           FAS3170       e3a   
dot83cm-02             Eth1/5          158     H           FAS3240       e6b

In IOS/NX-OS, you may wish to run show cdp neighbors detail to gather more information.

To view CDP information using the vSphere/VI Client: Connect to the vCenter Server/Virtual Center or ESX host using the vSphere/VI Client.
·         Select the ESX host in the Inventory.
·         Click the Configuration tab.
·         Click Networking.
·         Click the Info icon to the right of the vSwitch, under Properties.
More detailed information about the output of CDP commands can be found in the relevant Ontap Network Management Guide, Cisco and VMware documentation.

Hope you don’t have to trace the network cables the hard way anymore!

Thursday, 7 August 2014

How to configure Raw Disks in RHEL 5 for Oracle11g udev

The following is to change the owner, group and permissions for raw devices used for Oracle RAC.
Create a file called /etc/udev/rules.d/65-raw-permissions.rules with these contents:
#Set permissions of raw bindings to Oracle Clusterware devices
KERNEL=="raw1", OWNER="root", GROUP="oinstall", MODE="640"
KERNEL=="raw2", OWNER="root", GROUP="oinstall", MODE="640"
KERNEL=="raw3", OWNER="oracle", GROUP="oinstall", MODE="640"
KERNEL=="raw4", OWNER="oracle", GROUP="oinstall", MODE="640"
KERNEL=="raw5", OWNER="oracle", GROUP="oinstall", MODE="640"

Test executing:
udevtest /class/raw/raw1
It should show something like:
udevtest /class/raw/raw1
main: looking at device '/class/raw/raw1' from subsystem 'raw'
udev_rules_get_name: rule applied, 'raw1' becomes 'raw/raw1'
udev_device_event: device '/class/raw/raw1' already in database, validate currently present symlinks
udev_node_add: creating device node '/dev/raw/raw1', major = '162', minor = '1', mode = '0640', uid = '0', gid = '600'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply /dev/raw/raw1 '

To apply the rules run:
# start_udev
Starting udev:                           [  OK  ]

References:
http://www.oracleflash.com/7/How-to-configure-Raw-Disks-in-RHEL-5.html
http://www.ardentperf.com/2008/02/13/oracle-clusterware-on-rhel5oel5-with-udev-and-multipath/

Tuesday, 25 February 2014

VMware Vsphere: Fix hidden NIC devices after P2V conversion of Windows servers

VMware Vsphere: Fix hidden NIC devices after P2V conversion of Windows servers


After a physical conversion a number of “stale devices” will exist in the new virtual machine. These are hardware devices which are no longer required.

Windows 2000 & 2003

To identify which devices are no longer physically installed on your virtual machine, use the Microsoft environment variable devmgr_show_nonpresent_devices. This is explained in the Microsoft article:


1. From the command prompt, type:

set devmgr_show_nonpresent_devices = 1

2. Start the search. Type:

start devmgmt.msc

3. From the Device Manager, list the devices.

Select: View > Show hidden devices.

4. Deinstall the listed devices:

Select the device and uninstall it from the Device Manager.

Reboot.



Friday, 6 May 2011

Vsphere ESX NIC numbering

VMware had an issue with the nics port numbering. If you have on board nics, and some PCIe nics, the numbering is not correct. With HP server and Broadband and Intel adapter it happens.

 

It pretty much assigns them in whatever order it finds them - you can see this article (http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002315) for a rundown on the process. Now if you are really dead set on changing them it can be done. You would have to:

 

You can change the numbering by changing the esx.conf

 

1. go into the console (tech support mode on ESXi)

2. cd /etc/vmware

3. backup your esx.conf

                eg. cp esx.conf esx.conf.bak

4. edit esx.conf and look for your vmnic entries.. will look something like

     /device/000:001:00.0/vmkname = "vmnic0"

     /device/000:001:00.1/vmkname = "vmnic1"

     /device/000:002:00.0/vmkname = "vmnic2"

     /device/000:002:00.1/vmkname = "vmnic3"

5. Order as desired by editing the string vmnicX

6. Look for mac address assignment to vmnicX and change them accordingly, change the lines for the mac "xx:xx:xx:xx:xx:xx" and virtualmac "yy:yy:yy:yy:yy:yy" to be consistent. Don't change just the "vmnicX", leave everything in the same place.

 

                /net/pnic/child[000X]/mac/ = "xx:xx:xx:xx:xx:xx"

                /net/pnic/child[000X]/name/ = "vmnicX"

                /net/pnic/child[000X]/virtualmac/ = "yy:yy:yy:yy:yy:yy"

 

7. Save the edited file and reboot

 

You may have to readjust your nic bindings in networking in the Virtual Center when done.

 

For many implementations, the numbering is not an issue, but for a correct design (using nic port to a specific Switch port) and validate the cabling the right numbering is important. The use of host profiles is standardized, including the nic names, which makes things easier to maintain with less efforts.

 

Example: We use vmnic0 and vmnic5 for service console and vmkernel for iscsi, and vmnic1 and vmnic4 for Virtual Machines Data, if the numbering is not correct, you can use the same nic/port for High Availability, if you have a nic problem, both nics/ports can be the some physical port, and you have no vmkernel, or Service Console

 

This is just an example what can happen if you have your infrastructure very well documented, and the correct design for High Availability on all connections.

 

I hope It is useful for you as it was for me !

Wednesday, 10 February 2010

SOLVED: unable to access file unspecified filename since it is locked

SOLVED: unable to access file since it is locked

This error message is so generic, and appeared to me at least in two different situations.

First time, trying to remove a snapshot of a VM, and second time, trying to power on a VM.

This is the second time now where I cannot power on the VDR virtual machine.

The message "Unable to access file since it is locked appears in the Recent tasks panel.




Since the filename is unspecified, it makes it hard to figure out what the issue is.
Why did it happen? Well, first I have to tell you that something went wrong in a backup process of one of my VMs, specifically the Virtual Center Server (in my case, this is a VM). It could be ANY VM, but in this case is this one. The last time, the same issue happened with a different VM, but anyway, the problem is the same.



I figured out that the job failed, and It couldn't remove the snapshot. (VDR appliance creates a snapshot, and then copies the contents to the destination; after that, the snapshot is removed). But something went wrong, and the snapshot was not removed. It caused all future jobs also failed. I tried manually creating a snapshot for the failed VM, and then remove it, to force it to "Delete All" the unused snapshots, but the procedure failed, giving me the same error: "unable to access file since it is locked" ... mmmm, who is locking and which file ?????

I tried also moving the VM to another ESX in the cluster; restarted vmware management services; restarted the VM; restarted the ESX host itself, but no luck.

Ok, you got it, VDR is locking it .... but which file ???? I searched hours in google and Vmware KB, but nothing ... I opened a ticked with VMware. It took one day for them to call me back, just to acknowledge the ticket. It took another 3 days to have an email from them asking me for uploading the log files (I already did it at the time I opened the ticket !).It took another 3 days for them to call me, but I was busy and I couldn't work with them, after three more days, I called them again, but they told me they will call me back ... GRRR. I hate VMware support procedures and times.

Don't worry, I solved it by myself, and let me tell you how:

1) Shutdown the VDR appliance. It will free up the locked files in your VMs that were not sucessfuly backed up.

2) Create manually a snapshot in every VM with the problem, then "Delete all" snapshots will work !, you won't get that error message again.

3) "Try" to power on the VDR (VMware Data Recovery) appliance... Oh, no, the same message again! And now, I cannot power up the Virtual Machine !

4) I found the VDR "mounts" the hard disks of the VMs it is creating the backups, so, go to the VDR, and in commands "Edit settings".

By default, the VDR has only one hard disk, but mine shows three: those two extra hard disks corresponds to the Virtual Machine the backup failed!

Look at the hard disk description path for the first hard disk drive, and disk mode independent checkbox is not checked.



Look at the extra hard disks added to the VDR, see the hard disk description path (it corresponds to the VM that was in progress of backup). It also has the independent checkbox checked.





Select one by one the extra hard disks and click "Remove". Be very careful here, selecting just remove, and DO NOT dele files from disk.





Also, confirm that you selected the right hard disks ! If you make a mistake, just hit Cancel and do it again.

5) Verify that you have the single and right hard disk in place.



6) Power on the (VMware Data Recovery) appliance. Problem solved !