Archive for the ‘Geek Tips’ Category

Match VMWare LUN ID to EMC SAN LUN ID

Tuesday, August 31st, 2010

This is the procedure to match a (VMWare Datastore and) VMWare LUN ID to the underlying storage ID on an EMC SAN. (The procedure would work for another type

of SAN as long as you can get the UUID off the SAN for each LUN.

With help from
# KB Article: 1005587
# Updated: Aug 14, 2009
# Products:
VMware ESX
# Product Versions:
VMware ESX 2.5.x
VMware ESX 3.0.x
VMware ESX 3.5.x
VMware ESX 4.0.x

1. Running this command from an ESX 3.5 host gives a list of all the UUIDs of each of the LUNS as they are presented to the ESX host.

vmware-vim-cmd hostsvc/summary/scsilun > iscsiluns.txt
Copy the text file to your machine.

2. Now take the UUID from a LUN on the SAN in this example taking LUNs 29 and 37.

To find the LUN from Navisphere, drill down into your raid groups and look for a LUN, right click and select “Properties” on the general tab you should see

the unique ID: 60:06 etc. this is the UUID.

600601606DE02100584A57537670DE11 – LUN 29
600601606de02100986b2f4b3a7adf11 – LUN 37

vmhba0:0:0 disk Dell VIRTUAL DISK 0200000000600508e000000000a8d8ba4420388505 564952545541 vmhba0
vmhba1:1:0 disk DGC RAID 5 0200000000600601606de021009c6f675d0a04de11 524149442035 vmhba1
vmhba1:0:1 disk DGC RAID 5 0200010000600601606de02100dc40c2cd0a04de11 524149442035 vmhba1
vmhba1:0:2 disk DGC RAID 5 0200020000600601606de0210066ad4ac9c604de11 524149442035 vmhba1
vmhba1:0:3 disk DGC RAID 5 0200030000600601606de021003a6875470d04de11 524149442035 vmhba1
vmhba1:0:4 disk DGC RAID 5 0200040000600601606de0210034291a0cd404de11 524149442035 vmhba1
vmhba1:0:5 disk DGC RAID 5 0200050000600601606de021000caa8c2cd404de11 524149442035 vmhba1
vmhba1:0:6 disk DGC RAID 5 0200060000600601606de02100f41d1958d404de11 524149442035 vmhba1
vmhba1:0:7 disk DGC RAID 5 0200070000600601606de021006450da80d404de11 524149442035 vmhba1
vmhba1:0:8 disk DGC RAID 5 0200080000600601606de02100988c6d87d404de11 524149442035 vmhba1
vmhba1:0:9 disk DGC RAID 5 0200090000600601606de021007c61aa00d404de11 524149442035 vmhba1
vmhba1:0:10 disk DGC RAID 5 02000a0000600601606de02100bc30ce18d404de11524149442035 vmhba1
vmhba1:0:11 disk DGC RAID 5 02000b0000600601606de021000ce5e434d404de11524149442035 vmhba1
vmhba1:0:12 disk DGC RAID 5 02000c0000600601606de02100f8805e3dd404de11524149442035 vmhba1
vmhba1:0:13 disk DGC RAID 5 02000d0000600601606de02100d4cc9f4cd404de11524149442035 vmhba1
vmhba1:0:14 disk DGC RAID 5 02000e0000600601606de02100664f9664d404de11524149442035 vmhba1
vmhba1:0:15 disk DGC RAID 5 02000f0000600601606de02100eabb686fd404de11524149442035 vmhba1
vmhba1:0:16 disk DGC RAID 5 0200100000600601606de0210062b1f876d404de11524149442035 vmhba1
vmhba1:0:17 disk DGC RAID 5 0200110000600601606de02100927c1f91d404de11524149442035 vmhba1
vmhba1:0:18 disk DGC RAID 5 0200120000600601606de02100162a22be370ede11524149442035 vmhba1
vmhba1:0:19 disk DGC RAID 5 0200130000600601606de02100cc0931b0370ede11524149442035 vmhba1
vmhba1:0:20 disk DGC RAID 5 0200140000600601606de0210034e7037bdb13de11524149442035 vmhba1
vmhba1:0:21 disk DGC RAID 5 0200150000600601606de021008e3e9b5fdb13de11524149442035 vmhba1
vmhba1:0:22 disk DGC RAID 5 0200160000600601606de0210062e6178adb13de11524149442035 vmhba1
vmhba1:0:23 disk DGC RAID 5 0200170000600601606de021009a8764707b44de11524149442035 vmhba1
vmhba1:0:24 disk DGC RAID 5 0200180000600601606de021000adceb7e7b44de11524149442035 vmhba1
vmhba1:0:25 disk DGC RAID 5 0200190000600601606de02100e04d319c6d61de11524149442035 vmhba1
vmhba1:0:26 disk DGC RAID 5 02001a0000600601606de02100cadbae397670de11524149442035 vmhba1
vmhba1:0:27 disk DGC RAID 5 02001b0000600601606de02100584a57537670de11524149442035 vmhba1 – LUN 29
vmhba1:0:28 disk DGC RAID 5 02001c0000600601606de021008aa643704c7bde11524149442035 vmhba1
vmhba1:0:29 disk DGC RAID 5 02001d0000600601606de02100f2f4f4674c7bde11524149442035 vmhba1
vmhba1:0:30 disk DGC RAID 5 02001e0000600601606de021002086b6b47ea8de11524149442035 vmhba1
vmhba1:0:31 disk DGC RAID 5 02001f0000600601606de0210060beb13b9addde11524149442035 vmhba1
vmhba1:0:32 disk DGC RAID 5 0200200000600601606de021006445e37ba7ddde11524149442035 vmhba1
vmhba1:0:33 disk DGC RAID 5 0200210000600601606de0210060b2646eacddde11524149442035 vmhba1
vmhba1:0:34 disk DGC RAID 5 0200220000600601606de021005405b1a931eede11524149442035 vmhba1 – LUN 36
vmhba1:0:35 disk DGC RAID 5 0200230000600601606de02100986b2f4b3a7adf11524149442035 vmhba1 – LUN 37
vmhba1:0:36 disk DGC RAID 10 0200240000600601606de021008e6c3164f5b1df11524149442031 vmhba1
vmhba1:0:37 disk DGC RAID 10 0200250000600601606de02100e28ef880f5b1df11524149442031 vmhba1
vmhba1:0:38 disk DGC RAID 5 0200260000600601606de021005aec3ec3f6b1df11524149442035 vmhba1
vmhba1:0:39 disk DGC RAID 5 0200270000600601606de0210052791990f7b1df11524149442035 vmhba1
vmhba1:0:40 disk DGC RAID 5 0200280000600601606de0210098b24703fab1df11524149442035 vmhba1
vmhba1:0:41 disk DGC RAID 5 0200290000600601606de021009a753b9c9db2df11524149442035 vmhba1
vmhba1:0:42 disk DGC RAID 5 02002a0000600601606de021009b753b9c9db2df11524149442035 vmhba1
vmhba2:0:43 disk DGC RAID 5 02002b0000600601606de02100566157059eb2df11524149442035 vmhba1
vmhba1:0:44 disk DGC RAID 5 02002c0000600601606de02100049c1c7f9eb2df11524149442035 vmhba1
vmhba1:0:45 disk DGC RAID 5 02002d0000600601606de02100059c1c7f9eb2df11524149442035 vmhba1
vmhba1:0:46 disk DGC RAID 10 02002e0000600601606de021000ea0339ff5b1df11524149442031 vmhba1
vmhba1:0:47 disk DGC RAID 5 02002f0000600601606de02100069c1c7f9eb2df11524149442035 vmhba1

Search for the UUID from the strings in the iscsiluns.txt, you should only find this appearing once for each Vmhba, if you have multiple paths you may see

the same UUID more than once.

Now from this we can see that VMWare thinks vmhba1:0:27 (i.e. LUN 27 on the VMWare ESX server) is actually LUN 29 on the EMC SAN.

3. You can right click on a VMWare datastore and select “Properties” under the “Extents” pane you’ll see the vmhba1:0:34:xx number this is the LUN(s) that

are used to make this datastore, you can match from the iscsiluns.txt file to get a UUID then look for the UUID on the EMC Lun report.

From Navisphere you can run a report to display all the LUNS so you don’t have to hunt it down manually. From Navisphere, on the left pane select “Reporting”

and then click “Generate Report” you can then create a LUN report to get all the UUIDs and their LUN ID listed.

APC UPS Management Card Utility Not Working

Saturday, July 31st, 2010

I had the problem that the APC UPS Management Card Utility software used to configure the IP was not working. It detected the unconfigured card okay, and prompted for the settings but never took them. In the end I found a document from APC support that showed a workaround to get it configured. Note: you need to be configuring the device on the same subnet as the computer running the utility. However you can change the IP to whatever you want afterwards.

<!– @page { margin: 2cm } P { margin-bottom: 0.21cm } –>

How to configure Network Management Card 2 (AP9630)

  1. Install APC Device IP Configuration Wizard

  2. Open APC Device IP Configuration Wizard

  3. When NMC screen pops up (as below) then please write down MAC address.

  1. Open Command Prompt on Server (Start-> Run -> CMD)

  2. Enter the following command

    1. Arp<space>–s<space><IP Address><space><MAC Address>

  1. Type: ping <IP Address> -l 113 (This is a lower case L)

  2. If there is a reply, in Internet Explorer type: http://<IP Address>

  3. Configure Management Card as usual.

Documents freezing on load in Microsoft Word 2003

Wednesday, April 21st, 2010

Here was a weird one, Word 2003 froze on startup, opening the document in word 2007 was the key to it, in the bottom left, it flashed up trying to connect to \\servername\folder\test.dot. Hmm in our case the servername was the name of a server that had been decommissioned! WOrd 2007 allows you to hit ESC to abort this. Word 2003 just freezes up.

The resolution is to stip this out of the file, either by using WOrd 2007 or by using the link belows solutions:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;830561

Microsoft DPM 2007 (ID 998 Details: An existing connection was forcibly closed by the remote host (0×80072746))

Wednesday, April 21st, 2010

The operation failed because of a protection agent failure. (ID 998 Details:
An existing connection was forcibly closed by the remote host (0×80072746))

Had this problem occouring when trying backup to tape.

The majority of the tape backup jobs worked fine, then on two of the disks on two of the servers it kept failing
interestingly failing at about the same place. In our case at 3.5GB on one disk and 700MB on the other.

After getting Dell to replace the TL2000, upgraded firmware for the library and the drive, used the latest drivers from DEll and
from IBM as its a IBM rebranded library and drive still the same problem.

Patched up all the hotfixes i could find at the time, SP1 of DPM 2007 too. Still no joy.

This doesn’t make sense as the backup is from the DPM replica to tape, it is NOT connecting to the original host.

I was with our Anti-virus guy (Kaspersky) and was discussing the problem, although i’d given him the list of the DPM volume
mount points used to exclude from the scan the AV software still scanned the replica and volume shadow copies on the DPM server.

I retried the failed job and waiting, about 5 seconds before the tape job failed the AV detected 3 virsues on the disk and tried
to delete them, as its in a volume mount point, it couldn’t and therefore blocked access, 10 seconds later the tape backup job reported failed.

So that was it the AV was causing the problem. Removed the AV software (to test) and reran the job went through no problems.

Now we have working backups the challenge is to get them to work with the AV installed (Kaspersky in our case)

DPM 2007 – Volume Missing

Saturday, February 27th, 2010

After a power cut, (before the UPS was installed!), on booting back up the DPM 2007 server, the server showed loads of replica disks saying “Volume Missing”, before i crying, it tried the following to get DPM to pick them back up and it appeared to work ok:

Run the command below to enable auto-detect of new volumes.

Mountvol /e

Rescan for disks in the COmputer Management Disk Management.

Then in DPM 2007 Console
DPM 2007 -> Management -> Disks -> Select DIsk 1
Click Rescan and wait.

Repeat for all the disks you have.

Then go back to the “monitoring” tab. And select alerts you should see all this missing disk alerts disappear. Once gone mop up any other warnings and run some synchs on the disks that were missing just to be sure. But that should resolve the problem.

WSUS – Computers reporting and then disappearing

Tuesday, February 9th, 2010

Reset WSUS ClientBeen working on WSUS and have setup a WSUS server. However started to get a problem whereby the computers were appearing on WSUS and reporting their status then disappearing. I noticed that they were disappearing and being replaced by another computer.

It turns out that when a machine is ghosted and then sysprep’ed it doesnt reset the WSUS id, which is a unique ID that WSUS uses to track the computer. So i’ve been able to come up with a script that can be run manually or via a script (GPO) on startup to reset this ID and make it talk properly to WSUS. Note this also sorted problems with Virtual Machines that have been cloned too.

Set oShell = CreateObject(”WScript.Shell”)

sRegKey = “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate”
pRegKey = “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections”

‘ suppress error in case values does not exist
On Error Resume Next

‘ check for marker
sIDDeleted = oShell.RegRead( sRegKey & “\IDDeleted”)

‘ to be sure values is only deleted once, test on marker
If sIDDeleted <> “yes” Then

‘ delete any WinHttpSettings registry entry (interferes with WSUS)
oshell.RegDelete pRegKey & “\WinHttpSettings”

‘ delete values
oShell.RegDelete sRegKey & “\AccountDomainSid”
oShell.RegDelete sRegKey & “\PingID”
oShell.RegDelete sRegKey & “\SusClientId”

‘ Stop and start the Automatic updates service
oShell.Run “%SystemRoot%\system32\net.exe stop wuauserv”, 0, True
oShell.Run “%SystemRoot%\system32\net.exe start wuauserv”, 0, True

‘ Run wuauclt.exe with resetauthorization
sCmd = “%SystemRoot%\system32\wuauclt.exe /resetauthorization /detectnow”
oShell.Run sCmd, 0, True

‘ create marker
oShell.RegWrite sRegKey & “\IDDeleted”, “yes”

End If

Note: this should be copied and saved as a .vbs file. I’ve also attached it as a file to this post, needs to be renamed though!

Reset WSUS Client Script

Enable Jumbo Frames on Hardware ISCSI HBA vmhba

Saturday, January 30th, 2010

If you need to use jumbo frames on your ISCSI you need to run this command from the command line of the ESX host:

esxcfg-hwiscsi -j enable <vmhbaX>

e.g.

esxcfg-hwiscsi -j enable vmhba1

You’ll need to reboot to let the changes take effect. To verify run:
esxcfg-hwiscsi -l – lists the current settings.

Useful link: http://www.vi-tips.com/2009/04/configuration-of-iscsi-in-vmware-vi3.html

Finding email addresses on an object in Active Directory

Monday, August 24th, 2009

http://www.msexchange.org/articles/Finding-Duplicate-SMTP-Addresses.html

Shows how to find an email address within the Exchange infrastructure.

Migrating a DHCP server from one server to another

Wednesday, July 29th, 2009

Heres a neat trick, seems to work ok. Remember however, when you export it switches off the old dhcp server. So be quick!

http://support.microsoft.com/kb/325473/

Nagios – Example using check_icmp

Friday, July 24th, 2009

This is what would be needed in your hosts configuration to monitor using check_icmp rather than check_ping.

define service{
use                     generic-service ; Inherit values from a template
host_name               SWITCH    ; The name of the host the service is associated with
service_description     PING            ; The service description
check_command           check_icmp!40.0,10%!100.0,40%  ; The command used to monitor the service
normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
}

This is what would be needed in the commands.cfg

# ‘check-host-alive’ command definition
define command{
command_name    check_icmp
command_line    $USER1$/check_icmp -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 2
}

This makes the assumption its going to do two pings, otherwise turn “-p 2″ into $ARG3$ instead!