Monday, August 17, 2009

How to find out which HBA is connected on ESX host

I wanted to figure out how to find out which HBA is connected /cabled. I had been using Qlogic QLE406X and usually I used to press Ctrl + S to configure using BIOS. This way I use to ping the target to find out which port has been cabled.

Reason is we don’t cable all the available port and ESX is not kind enough to tell you which port is what. It does select randomly vmhba 0,1,2,3,4

I asked the same question to Vmware support but could not find any clue. Finally I found answer on Qlogic download site. Next go to downloads section, select your iSCSI HBA and choose Linux Red Hat (32-bit) from the select menu.

Download the SANsurfer iscli (x86/Intel 64) file (Latest available from the site) to your local machine. Unzip the file to a folder. Browse the datastore and upload the entire folder

SSH into the box and CD to the location where the folder has been uploaded . You will find following files under it

We have to install “iscli-1.2.00-15_linux_i386.rpm ”. To install this use following command

[root@xxxx]# rpm -ivh iscli-1.2.00-15_linux_i386.rpm

Preparing... ########################################### [100%]

1:iscli ########################################### [100%]

Installation completed successfully.

Now type command iscli , this will start nice interactive menu to configure/troubleshoot/update firmware for HBA

From the menu select the option 7 and then choose HBA which are detected by ESX host. Which ever HBA has been cabled ,link will show as UP. Select that HBA and configure it for IP and perform the ping test.

Enable/Disable maintenance mode from command line

vimsh -n -e /hostsvc/maintenance_mode_enter to enable maintenance mode


vimsh -n -e /hostsvc/maintenance_mode_exit to disable it

Set_rtc_mmss: when the hardware clock is out of synch with system clock

I saw following error message on the console

set_rtc_mmss: can't update from 59 to

When I ran

   [root@xxx]# hwclock -r;date

Thu 30 Oct 2008 05:22:47 AM EDT  -0.437804 seconds

Mon Aug 17 05:22:47 EDT 2009

It has the huge difference between system clock and H/W clock

I then ran 

  [root@xxx]# hwclock –systohc

And now the time difference is pretty low

[root@xxxx]# hwclock -r;date

Mon 17 Aug 2009 05:26:21 AM EDT  -0.026283 seconds

Mon Aug 17 05:26:20 EDT 2009

Saturday, August 15, 2009

Administrator can not see datacenter after No Access role assigned on it

I created new datacenter for testing purpose and gave “Administrator” “No Access” . After this even I being a Administrator at the “Host & Cluster ” level even was not able to see it . To fix such situation we have two resolution method

Resolution #1

If the permission was modified for a user or group (as long as it was not the administrators group):

This is by design that the local administrator/member of local admin group of Virtual Center does have admin level privilege on VC.

1. Create a new user that is a member of the local administrators group for temporary use

2. Log in with this user.

3. Modify the permissions of the user so that they are no longer as restrictive. You can now log in to VirtualCenter appropriately.

SQL method:

Since I have changed the Administrator privilege on datacenter , fist method will not work and then only SQL method will work

  1. Login to the SQL server for virtual center and lunch SQL server Management Studio

  1. Connect to the SQL server based on WINDOWS Authentication

  1. Expand Database ->VMwareVirtualCenter -> Tables.

  1. Search for Tables called VPX_ACCESS tables ,select and right click on it “Open Table”

  1. Check for the column “ROLE_ID” and see the value is -1 for Principle called “Administrator”. If the value is other than -1 then change it to -1 .Close the Database and then restart virtual Center service

India Turn 62 today - Happy Independence Day

India turn 62 today. ON 15th August 1947 India was freed from British Raj.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Happy Independence Day!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Friday, August 14, 2009

Creating a quiesced snapshot failed because the (user-supplied) custom pre-freeze script in the virtual machine exited with a non-zero return code

During one of the P2V I got below mention error message


Do not panic, just reinstall the VM tools and retry to the HOT cloning again. This will work

Thursday, August 6, 2009

Snapshot dependency on .vmsd file

There were a VM which has been spreads across multiple folder . One folder were holding .flat file and delta file. While other was holding all the snapshot.

We have to shift this VM to a different host in different site. We created the same folder structure at different site but still all the snapshot were lost. I started looking at each vmdk files (Every snapshot has its own VMDK to refer to) and corrected the file location /vmfs/volumes/<file_system_UUID>.

After fixing I was still not able to see my all snapshot under snapshot manager. Finally I had a look at .vmsd file .It has few pointers to old datastore

"snapshot0.disk0.fileName =". After I fix I was able to see all the snapshot.

Cloning a snapshot attached Virtual Machine

I am returning back after a long vacation. Thanks to my new family member.

If you want to clone a snapshot machine you have to be very careful because snapshots are lost on cloned machine. This was usual method which we were using for migrating from one location to other location in order to save WAN bandwidth.

The method which we adopted was to clone the VM's to a cheap filer (FAS2020) and ship the filer . This way WAN link will be saved. With VC2.5 U5 and all we can do live cloning of VM's For the VM's which has snapshot I usually copy it "as it is " to the filer and then do the same thing out of filer. Register the VMX and all set.

Copy using SCP was very painful so I found new way to do it TAR

Get inside the VMFS volume.

tar zcf - <vm_folder_name>/ | ssh root@<target ESX host name> "cd /vmfs/volumes/<target vol name>/; tar zpxvf -"