Sunday, April 26, 2009

SUN-ORACLE deal: Capitalist strikes again

Many blogs and article were busy understanding the deal and justifying it, who has win-win situation. How Oracle will deal with this buyout? How Oracle will be benefited with this deal? How Jonathan/Larry would be run their business? But no one talks about why SUN landed up in situation like this ? Did they put any effort to come out the situation like this? How Jonathan can transform the business of SUN to save his company?

But no what is the point to think, they have already milked the cow. Now cow is grown old and does need it any more. Well people may tell me that it was not worth to put any effort to save the company as regulator and shareholder were in favor of this deal. I agree because no business man in this world is for Charity . They do when they are looking for some government subsidies or when they feel that their popularity is going down. I may sound pessimistic but I can bet % of these business man do because of reason state above.

When I compare these MNC with Indian MNC I find that they are little bit for passionate about their company/business/employee (I may be wrong). I read that these Indian MNC are still honoring their offer given to collage pass out. They are not putting paper napkin/toilet paper inside toilet (I really don’t care and I can manage with handkerchief) .They are not giving any increment and also all the hikes are freeze (Which is fine as long as I have my job). We should be proud because they have shared their profit with us so we should be with them during the time of crisis.

I was wondering Jonathan given thought about something like this? SUN hardware is one of the costliest one, so what did they do to bring down the price. I guess NONE. So now Jonathan and team will get share after this deal. He and his family will have luxurious life, who care about employee’s grief. They are senseless creature. I have one of my friend who is part of Sun family and after looking at his agony I realize how painful it is to be part of MNC. He has been loyal servant of SUN and this what he got in return. Jonathan don’t have any emotion attach to his company and their employee? I feel that bringing up a company is similar to bringing up your own kid. You go through same pain and pleasure when you see kid/company grows. How can you just sell the company and enjoy the billions of dollar? Do you sleep on those dollar if yes do you get good sleep by devastating your own families (Remember employee are as good as your family member )

Thursday, April 23, 2009

Operation Lotus completed

Operation Lotus completed successfully today. Today India being world largest democratic country going through electoral phase to elect their government and I along with family casted their vote for the same reason. After casting my vote I got a feeling that “YES I have done something for the country”. Yeah I have casted my vote after a long gap because of various reason. Whom I voted for ? off course for BJP and not only me but my wife and brother also voted for BJP. Well people debate because of media influence terming them as communal force and other party as secular party. Well all the political party in India is one or the same but just their level are different. And to my view BJP level is little bit lower than other party. Party which focus is just not to grab the PM seat but also to protect implement Hindutav. Now this communal and Hindutav definition to such extend by this media that people now understand as a big drawback for India. Well Hindutav is not just Hinduism but is also talk about our culture and I don’t think there is nothing wrong If I say I want to protect Hinduism +our culture. I told I will follow hindutav and I did not told that I will devast muslism or christanism . When I say I will protect Hinduism I had been termed as communal why ? Well this is all Media which control peoples mind and I don’t care what people want to term me as but I will always follow BJP.

Wednesday, April 15, 2009

Change/Sync Harware clock with NTP on ESX host

My few hosts are spread across Australia it has major issue with H/W clock and local clock.
[root@xxxx]# hwclock --show
Sun 28 Sep 2008 10:03:23 PM EST -0.804718 seconds
[root@xxxx]# date
Wed Apr 15 22:33:50 EST 2009

In order to fix it use following command

hwclock --systohc –localtime

I cannot resist to cut and paste the following from this url

1. Make sure /etc/sysconfig/clock has the proper settings. For me this is:
This modification properly sets the system during the boot process in the init scripts.
2.Run the following command:
ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime

Substitute "America/Chicago" for the proper time zone setting. When you run the date command, you should now see your time presented with the correct timezone "indicator"

[root@SMHESX01 root]# date
Tue Jun 21 23:45:03 CDT 2005

3. Set your hardware clock to match the current time:
hwclock --systohc --localtime

4. Verify hardware clock with:
hwclock --show
Tue Jun 21 23:49:36 2005 0.956810 seconds

You can change to any time zone I want using this method and the time/date change based on timezone configured.

5. You may also want to toss the following in for good measure:

Tuesday, April 7, 2009

Can we attach Tape drive to the Virtual Machine ?

I had been askedweird question “Can I configure virtual machine with Tape drive connected to it and use it as my backup server?” Crap why you want to do that? Obvious answer we don’t have fund to buy hardware dedicated for backup. So here comes my googling and seems like you can have Tape drive configured to your virtual machine which can act as your backup server. It sounds funny but this is IT and you can expect question like this. How do I do it?There is very old article which holds good for ESX1.X but even same theory can be used for ESX3.X host.

Add the hardware as usual to the chassis. Once the hardware is physically added, log in to the ESX Server system's management interface as root, and make the hardware available to the virtual machines by configuring the virtual devices. The following steps provide more detail.

* Fibrechannel tape devices may work in the ESX Server console OS. They are not supported in virtual machines.
* If the ESX Server console OS sees the tape device, install the ESX Server3.x specific backup software agent that has support for your tape device.
* If no ESXServer 3.x specific backup agent is provided by your backup software vendor, you might try to install the backup agent your backup software vendor supplies for Red Hat EL3 U6. You should test this agent on an ESX Server 3.x test bed before installing on your ESXServer 3.x production system.
* See vi3_server_config.pdf, pg 281-2 for additional information.

Part 1 - Connect the tape drive to the ESX Server host and make it available to the service console.

1. Make sure the tape drive is connected to an Adaptec SCSI card, not a RAID controller. For a list of supported Adaptec cards, see

2. As a bestpractice, dedicate a SCSI card to the tape device. (The tape deviceis the only device attached to the SCSI card.)

3. Check that the service console sees the tape drive:
# cat/proc/scsi/scsi
Host: scsi1Channel: 00 Id: 03 Lun: 00
Vendor: IBM
Model: ULTRIUM-TD2 Rev: 36M3

Note: If the tape device does not show up, perform a rescan of the Adaptec HBA using esxcfg-rescan. See Using esxcfg-rescan from the command line and the Virtual Infrastructure Client to perform a rescan of the storage (1003988).

4. Use either the management interface or VirtualCenter to map a SCSI target from the controller to your virtual machine.

5. Find what path the tape drive was given by the VMkernel:

# cat/proc/vmware/scsi/vmhba1/3:0

Vendor: IBM
Model: ULTRIUM-TD2 Rev: 36M3

Type:Sequential-Access ANSI SCSI revision: 04

Id: 31 31 31 30 30 31 32 34 31 30 55 4c 54 52 49 55

Size: 0 Mbytes

Queue Depth: 2

6. Add aSCSI generic device, using a unique SCSI target ID that is different from the local boot device. Use the management interface to assign vmhba1:3:0:0. In the .vmx file, the tape drive lines should look like this:
scsi1:3.present = "TRUE"
scsi1:3.deviceType = "scsi-passthru" ="vmhba1:3:0:0"
Note: You cannot dedicate the entire SCSI controller to a virtual machine. You must manage it one SCSI ID at a time. If you're using a robotic tape library, you'll need to assign one SCSI ID for each tape drive and also one for the robotic changer.

Note: Tape drives are currently only supported using Adaptec SCSI cards that use the LSI Logic virtual SCSI controller. Make sure you use the LSI Logic virtual SCSI controller.

To determine what the vmhba address should be in the .vmx file, use this guideline. As a general rule, vmhbaX:Y:Z:0 should correspond to /proc/vmware/scsi/vmhbaX/Y:Z.

7. Using the management interface, add the hardware to the ESX Server system.

1. To add the tape drive, which is the first device, choose Hardware > Add Device > Generic SCSI Device.

2. To add the media changer, choose Add device > Generic SCSI device. Under Device Connection, select Manually. Specify a device, then enter the information accordingly.

Part 2 - Make thetape drive available to a virtual machine.

Make sure the SCSI controller attaching the tape drives and medium changer is dedicated
to the virtual machine only.

To confirm that the SCSI controller is dedicated:

1. Log on to the management interface as root or an administrative user.

2. Right-click VM.

3. ClickConfigure Hardware.

4. Look for the SCSI Controller section. Bus Sharing should be none.

To change the SCSI controller if it is shared:

1. Click the SCSI Controller link.

2. Choose none from the Bus Sharing pull-down menu.

The parent virtual disk has been modified since the child was created

We came across many instance when we have expanded the HDD which has snapshot and when we try to power on we get error “The parent virtual disk has been modified since the child was created” One
of my former college and guru’s has
blogged about it . I found nice KB 1007849 which I thought of copying because
of fear that I may loose the track.

This error can occur under the following circumstances:

  • The base disk of thevirtual machine has been changed

  • Running out of space on the LUN that contains the snapshot

  • Virtual machine suffers a blue screen exception when a snapshot is taken

For more details about snapshots and missing header files, see Cannot power on a virtual machine because the virtual disk cannot be opened (1004232)

Before implementing the solution, ensure:

  • You know the file names of all virtual disks associated with the virtual machine. Use the following command and record the output:
    #grep -i filename /vmfs/volumes/old_datastore/vmdir/*.vmx | grep -i

  • That there is enough space on the target datastore to receive the cloned virtual disks. Use the following command to assess how much space is needed:
    #ls -lah /vmfs/volumes/old_datastore/vmdir/*flat.vmdk

    Note: This example assumes that all of the virtual disks are contained in the directory with the virtual machine configuration file (

  • A complete snapshot chain with matching CIDs and Parent CIDs (obtained from step 2 in the procedure).

  • The virtual machine is in a powered off state.

  • There is enough time to commit the snapshots. This procedure can take an extended amount of
    time depending on the size of the delta files.

To match the CID of the snapshot to the base disk:

  1. Find out what disks the virtual machine is using. Log in to the ESX host and navigate to the directory that contains the virtual machine. Run the following command to identify which virtual disk files are being

    # grep -i filename *.vmx

    The output appears similar to:
    scsi0:0.fileName = "vm-000002.vmdk"
    scsi0:1.fileName = "vm_1-000002.vmdk"
    This virtual machine has two virtual disks.

  2. Check the CID of the base disks and compare them to the snapshots to see if they match.Run the following command to obtain the information about the virtual disk:
    #cat vm_1-000002.vmdk

    Theoutput appears similar to:
    This indicates that the file vm_1-000001.vmdk has the CID of 20d215cd.
    Do this for each file in the snapshot chain until you get to the base disk.

  3. Clone the virtual disk to a new base disk. To clone the virtual disk:

    1. Run the vmkfstools -i command to copy out and consolidate the snapshots. This requires enough space for the basedisk. The command ls -l *-flat.vmdk gives the size of
      each base disk in the current directory.

    2. Create a directory on a the target datastore if you are not cloning to the current directory:
      #mkdir /vmfs/volumes/new_datastore/recover

    3. Run the vmkfstools -i command to clone out the last vmdk delta disk pointer VMDK:
      #vmkfstools -i /vmfs/volumes/old_datastore/vmdir/vm_1-000002.vmdk

      The output appears similar to:
      Destination disk format: VMFS thick
      Cloning disk '/vmfs/volumes/old_datastore/vmdir/vm_1-000002.vmdk'...
      Clone:100% done.

      Note:If the above process does not work, choose the next snapshot up the tree as the one you are on (or one of the higher ones) is corrupt.

    4. Detach the disk from the virtual machine using the VI Client.

    5. Attach the new disk, /vmfs/volumes/new_datastore/recover/vm-disk2.vmdk
      to the virtual machine.

    6. Power up the virtual machine and ensure data integrity (Event Viewer, SQL, E-mail, etc).

  4. Delete the base disk and only it's snapshot disks.
    #grep -A2 parentFile vm_1-000002.vmdk | grep -v "#"

    Theoutput appears similar to:

    RW 41943040 VMFSSPARSE "vm_1-000002-delta.vmdk"

    This indicates that the pointer vm_1-000002.vmdk points to vm_1-000002-delta.vmdk and is using vm_1-000001.vmdk as it's parent disk.
    You may run the same command on the parent pointer to determine what files it uses, until you locate them all.
    #rm /vmfs/volumes/old_datastore/vmdir/vm_1-000002.vmdk
    # rm/vmfs/volumes/old_datastore/vmdir/vm_1-000002-delta.vmdk
    #rm /vmfs/volumes/old_datastore/vmdir/vm_1-000001.vmdk
    # rm /vmfs/volumes/old_datastore/vmdir/vm_1-000001-delta.vmdk
    #rm /vmfs/volumes/old_datastore/vmdir/vm_1.vmdk
    # rm /vmfs/volumes/old_datastore/vmdir/vm_1-flat.vmdk

    Note:If you are going to use rm with a wildcard, echo the command first.This allows you to see which files are being targeted for erase.

    #echo rm *.vmdk

  5. Move the VMDKs back to the original location and re-associate the virtual machine with the new disks.
    To move the VMDKs back to the original location:

    1. Run the following command to clone the disk back to the original data store.

      #vmkfstools -i /vmfs/volumes/new_datastore/recover/vm_1.vmdk/vmfs/volumes/old_datastore/vmdir/vm_1.vmdk

    2. Detach the recovered disk from the virtual machine using the VI Client

    3. Attach the new disk in the original location, /vmfs/volumes/old_datastore/vmdir/vm-disk2.vmdkto the virtual machine.

    4. Power up the virtual machine and ensure data integrity (Event Viewer, SQL, E-mail, etc).

  6. Clean up the snapshot database.Rename the .vmsd file, remove the virtual machine from inventory, and re-add the virtual machine to clear the snapshot database.
    #mv vm.vmsd vm.oldvmsd

Thursday, April 2, 2009

vSRM2: Database consideration

For Microsoft SQL Server, the database should be configured as follows:
1. Schema name should be same as the user name and you must have a default schema associated with the user account
2. Bulk insert administrator privileges
3. If Windows authentication is used, install SRM service on a host that shares the same domain as the database server
4. If SQL Server is installed locally, you might need to disable the shared memory network setting on the database server

vSRM 1: Network Consideration

I have done demo in past for vSRM 1.0 using NetApp SIM. I though of starting a new fresh topic on my blog about Site recovery Manager.

Option 1: Use the Same IP
When we start powering on VMs at the Recovery Site – they may be on totally different networks requiring different IP addresses and DNS updates to allow for user connectivity. The good news is SRM can control and automate this process. One very easy way to simplify this for SRM is to implement “stretched VLANs” where two geographically different locations appear to be on the same VLAN/subnet. However, you may not have the authority to implement this – and unless it is already in place it is a major change to your physical switch configuration, to say the least. It’s worth making it clear that even if you do implement stretched VLANs you may still have to create inventory mappings because of port group differences. For example there may indeed be a VLAN 101 in Boston and a VLAN 101 in Amsterdam . But if the administrative team in Boston call their port groups on a virtual switch BOS-101 and the guys in Amsterdam call theirs AMS-101 then you would still need a port group mapping in the Inventory Mappings tab.

(Source : Administering VMware's Site Recovery Manager chapter 4)

Option 2: Re-IP all the VM’s at the recovery site

This can be done using “dr-ip-customizer.exe” The basic process is to export the current NIC settings to a CSV, edit the CSV with your new IP addresses and then import it back into SRM with the new desired IP addresses. In reality this tool is helping to create the Customization Specifications for you, so you can actually see them from the Edit - Customization Specifications window after you follow the process.

(Source : Site Recovery Manager Administration Guide Page54)

Duncan : If you want to keep it simple in terms of failover I would always prefer stretched vlan's. Especially dependency wise re-ip'ing can be a huge problem. (hardcoded ip's within apps / databases etc)

Lee Dilworth : From the x86 side of things I sometimes get the feeling that for historic reasons a lot of x86 teams were forced to re-ip in DR since
A) Networks didn't support transparent failover
B) Not that many workloads existed on x86 that were classed as critical for the business that they needed to be included in any DR strategy, as we all know in the last 5-10 years this swing has shifted massively and now the vast majority of workloads will be running on x86 based OS's. So maybe its time for a re-think?
What you need to consider are todays "modern" and multi-tier applications (web/msg/rdbms) how many in your portfolio would you expect to work unaided if you simply re-ip'd them? probably not many and confidence is low...for example would you really want to failover lots of oracle/sql srvr/exchange VM's and then give them all brand new ipaddresses. ok they may work if you are VERY confident that the apps respond well to that and that you have been very strict company wide in your use of FQDN's and aliases if not then there's always those hardcoded ipaddresses that can bring your application stacks to their knees if you forget (or miss) to change on. Bottom line, when changing the ip-addresses over you could (not always) introduce a whole extra set of tests that need to be run once the VM's are recovered. The nice thing about SRM is that at least now you can perform these tests in a non-disruptive way which is great but if you feel that in real DR situations you still need to run them no matter how well your testing went then any extra tests

1. Whats our strategy for failover? change ip addresses / keep same address?
2. Do we stretch layer2 vlan?
3. Do we failover layer 3?
4. How do we update DNS if we make changes? is that scripted?
5. Do we need a secure test set of vlans created at the test site that can be used for DR testing? do these exist?
6. If we do re-ip do we have an existing mechanism/solution/set of scripts/dhcp reservations that do this for us (if you do then these same techniques will almost certainly work unaltered against your VM's)
7. Does SRM offer any other options for re-ip if we don't have an existing mechanism (yes it does!)

Once you can answer the above you then will have a better idea of what your solution should look like. customers i am working with now that are deploying SRM and have answered this usually then come back with a simple addition to their network setup. they create the required vlans at the network layer, ensure they have the correct routing / ACL's set etc and then they present these down the same trunk ports that the recovery site ESX hosts are using. once this is done they can then create portgroups for these new test vlans and finally in their SRM recovery plans they now select these "test" portgroups as the ones to use for the test network rather than the "Auto" default.