Thursday, November 12, 2009

Setup quick Webserver

1. Download the mongoose installer from http://code.google.com/p/mongoose/
2. Install it on C:/mongoose
3. Go to C:/mongoose and double click on mongoose.exe to start the Webserver.

Thats it...

Now keep the folder which you wants to access over the http into C:/ . If you browse http://localhost:8080 then you should able to see content of the C:/ from
the browser.

Note : By default the mongoose Web Root folder will be set to c:\ you can modify it of your own folder.

Monday, November 9, 2009

I am now VMware Certified Professionla on vSphere 4

Yesterday I completed my VCP 410 with wooing 494 marks. Yes I missed 6 marks to score 500/500. In my last VCP310 I finished with same marks. Compare to VCP310 it was bit tough.
I have referred to VCP410 what’s new Student manual and configure maximum for VCP410. Sometimes I failed to understand regarding testing pattern. For example out of 4 answers only 2 will be correct as per VMware and we are sure that 3 of them are correct. But VMware will only accept the two which they think is best. I guess they should add intelligence to their system database and also allow accepting 3rd answer.

Wednesday, November 4, 2009

How to perform manual DR using VMWare and NetAPP?

Well I had been working on vSRM as you can find few reference from my blog about it. But I had been asked to see incase SRM fail how can we have “plan B”.
We used SNAP mirror technologies from NetAPP to accomplish “Plan B”
Here is what I suggested:
1. During initial setup snap mirror on LAN and then once it is completed plan to ship the filer to DR location. This way we can save some bandwidth for replication as it will be only changes which will get replicated.
2. With manual process we need to maintain few documents especially with all the luns which will get replicated across location along with the serial number. The reason will be explained below
3. Once the replication is over we will start preparing for DR testing. For testing purpose I have selected one ESX host with dummy VLAN’s
4. I broke the snap mirror relationship between filer for the volume which was interested in testing. Once the volume is broken it become active and all luns are visible on the filer. It will be with same lun name and lun number . But the serial number will be changes.
5. This being very scariest part of entire exercise . If the lun serial number do not match with that of primary site then lun will appear as blank lun. We need to one to one mapping for lun serial number as it should be matching with that of protected site.

Before you change the lun serial number at the recovery site we need to make the lun offline and then run following command to change the serial number
# lun serial serial number.

Eg: lun serial /vol/S_xxxx_011PP_vol1/lun1 12345

6. Once it has same serial number map the lun to correct igroup and rescan hba on ESX host. Once the rescan is completed all the lun and datastore will appear “AS IT IS ” at the recovery site.

7. We have to register all the VM in order to power on . This can be accomplished using script.

Happy DR.

Sunday, October 25, 2009

VSRM2:Network Consideration

I had been trying to write about my SRM implementation for a long time. I wrote about Network consideration long time back. This is how I have implemented stretched VLAN.
Then Man behind this effort was network colleague Randall Bjorge.
1. What we did is we created same VLAN at Recovery site as in Protected site. For example say if VLAN100 exist in Protected site then we also created VLAN 100 at the Recovery Site
2. Same VLAN created at Recovery site has been keep in shutdown state.
3. When we initiated actual DR for our test environment we shut down the VLAN at Protected site.
4. We then brought VLAN at Recovery Site and pressed the RED recovery button.

To simplified this process we scripted this VLAN shutdown and VLAN bring up process. When we brought VLAN at Recovery site we had some challenges in routing network.

I expected this process to be very tough but when we worked it turned out to be very simple and straight. In actual DR scenario I am planning to place a DC/DNS/DHCP to make this IP routing simple.

Friday, October 23, 2009

Storage VMotion myth and deep dive

I had been involved so heavily in storage Vmotion that I decided to write about it. Nice source is here

First of all storage vmotion is

  1. Takes an ESX snapshot
  2. Then file copies the closed VDMK (which is the large majority of the VM) to the target datastore
  3. Then "reparents" the open (and small) VDMK to the target (synchronizing)
  4. Then "deletes" the snapshot (in effect merging the large VDMK with the small reparented VMDK)

Myth and deepdive:

  1. In a cluster if you have 5 host and have 10 luns. If you want to svmotion to 11th lun, the 11th lun should be visible to all the host in the cluster. It does not work on individual host
  2. You can do 1 svmotion per ESX host and maximum of 32 per cluster (Pheew)

  1. You can have 4 svmotion per lun . Which means you have many source lun but at a time only 4 svmotion will done at any target lun

  1. Storage vmotion can happen be only between on datacenter and cannot happen between two different datacenter (phewee).
  2. Storage VMotion cannot be used on a virtual machine with NPIV enabled

Batch Storage Vmotion

I had to do batch svmotoion and I decided to follow this guy nice article

Place postie.exe (Freeware), AutoSVmotion.vbs (Contents at then ) in the Remote CLI (Download and install it from VMWare site) bin directory (default location is "C:\Program Files\VMWare\VMWare VI Remote CLI\Bin"). Also create a batch file in this directory, this will be used to call AutoSVMotion.vbs. In the batch file put all the VM's that you require migrating in the below format:

cscript.exe AutoSVmotion.vbs %VC% %Username% %Password% %Datacentre% %SourceDatastore% %VMXFilePath% %DestDatastore% %SMTPServ% %ToEmailAddress% %FromEmailAddress%

Example of the batch file:

cscript.exe AutoSVmotion.vbs VC01 Admin P@ssw0rd London OLDLUN1 VM1/VM1.vmx NewLUN1 SMTP01 virtuallysi@example.com vikash.roy@test.com
cscript.exe AutoSVmotion.vbs VC01 Admin P@ssw0rd London OLDLUN1 VM2/VM2.vmx NewLUN1 SMTP01 virtuallysi@example.com vikash.roy@test.com

Example of the email output:

From: vikash.roy@test.com
Date: 13 September 2009 08:45:43 GMT+01:00
To: virtuallysi@example.com
Subject: SVMotion Progress Report

Successfully migrated VM1/VM1.vmx

Contents of AutoSVmotion.vbs

Dim WshShell, oArgs, sVCServer, sUsername, sPassword, sDatacenter, sSourceStore, sVMXLocation,_

sDestStore, sSMTPServer, sEmailAddress, sSVMotioncmd, iRetVal, sEMailText, sEmailCmd

On Error Resume Next

Set WshShell = WScript.CreateObject("WScript.Shell")

Set oArgs = WScript.Arguments

sVCServer = oArgs(0)

sUsername = oArgs(1)

sPassword = oArgs(2)

sDatacenter = oArgs(3)

sSourceStore = oArgs(4)

sVMXLocation = oArgs(5)

sDestStore = oArgs(6)

sSMTPServer = oArgs(7)

sToEmailAddress = oArgs(8)

sFromEmailAddress = oArgs(9)

sSVMotioncmd = "cmd.exe /c svmotion.pl --url=https://" & sVCServer & "/sdk --username=" & sUsername & _

" --password=" & sPassword & " --datacenter=" & sDatacenter & " --vm=" & Chr(34) & "[" & sSourceStore & "] " & sVMXLocation &_

":" & sDestStore & Chr(34)

WScript.Echo sSVMotioncmd

iRetVal = WshShell.Run(sSVMotioncmd, 1, True)

If iRetVal = 0 Then

sEMailText = "Successfully migrated " & sVMXLocation

sEmailCmd = "cmd.exe /c postie.exe -host:" & sSMTPServer & " -to:" & sToEmailAddress & " -from:" & sFromEmailAddress & " -s:" & Chr(34) & "SVMotion Progress Report" & Chr(34) & " -msg:" & Chr(34) & sEMailText & Chr(34)

Else

sEMailText = "SVmotion failed for " & sVMXLocation & " with error number " & iRetVal

sEmailCmd = "cmd.exe /c postie.exe -host:" & sSMTPServer & " -to:" & sToEmailAddress & " -from:" & sFromEmailAddress & " -s:" & Chr(34) & "SVMotion Progress Report" & Chr(34) & " -msg:" & Chr(34) & sEMailText & Chr(34)

End If

WshShell.Run sEmailCmd, 1, True