I faced few issues during pre and post installations and get them resolved thru' articles on google,i thought to consolidate all and blog them if people can take advantage of it.
How to clone a virtual machine without using VirtualCenter Server
We can use the Service Console to manually clone the vmdk using command line options, follow the steps below:
1) Connect using an SSH client to the ESX Server host.
2) Login to the ESX Server host using a user with administrative privileges, for example root.
3) Change directory to "/vmfs/volumes/<storage>", where "storage vmfs volume" is the friendly name of the storage LUN presented to the ESX server host.
4) Create a directory in the vmfs volume using the standard Linux command "mkdir
5) Change directory to the new folder.
6) Type "vmkfstools - i /vmfs/volumes/<source>/<source>.vmdk /vmfs/volumes/<destination>/<destination>.vmdk" and hit enter
7) Once the cloning completes connect using Virtual Infrastructure Client to the ESX Server host directly.
8) Login as an user with administrative privileges like the user root.
9) Right click on the ESX Server host from the Inventory panel and click on "New Virtual Machine".
10) Select the "Custom" radio button from the wizard and click next.
11) Select the Datastore where the new virtual machine files should be created.
12) Select Operating System, Number of virtual processors, memory, network, SCSI adapter type by clicking next on each option.
13) Select the option "Use an existing virtual disk" when it comes to selecting virtual disk and click next.
14) Click Browse button to navigate to the location were the new vmdk is created and select it.
15) Complete the wizard and click finish
16) Power On the virtual machine and it should now boot through the newly created vmdk.
Installing Windows XP on ESX using LSI Logic driver
Note: I have taken this helpful article from http://virtrix.blogspot.com/
For the deployment of Windows XP on ESX. By default, ESX will use the LSI Logic driver when deploying a new Windows XP virtual machine. The LSI Logic driver is not found on the CD-ROM media, so Windows XP will not continue with the installation if this driver is not found.
The steps:
Create a new Windows XP Virtual Machine
Upload a Windows XP .iso file to your datastore/ISOstore (preferably a VLK version) and link it via the CD-ROM options in your Virtual Machine. Make sure it is connected / at power on
Go to http://www.lsilogic.com/cm/DownloadSearch.do and search for a driver for the LSI20320-R controller.
Extract all files in the symmpi_wXP_1201800.ZIP
Use a program such as WinImage to create an LSILogic.flp file and include the extracted files in the .flp image.
Upload the newly created LSILogic.flp to your datastore/ISO store
Link the .flp file via the Floppy options => use existing floppy image in datastore in your Virtual Machine. Do NOT connect it yet.
Power On your Windows XP machine. The installation of Windows XP should begin.
During setup, press F6 to select additional SCSI drivers
Now is the time to connect your floppy and use S during Windows Setup when prompted to connect to the floppy drive.
The LSILogic drive should appear. Press ENTER to continue
Setup will continue as normal
Install VMware tools
Done!
NOTE: when using the BusLogic driver instead, you can download & use a preconfigured .flp file from the VMware site: http://download3.vmware.com/software/vmscsi-1.2.0.4.flp. Follow the same procedure as described above. The driver should be name VMware SCSI Controller in Windows XP.
How to shutdown VM instance on ESX using CLI
On the ESX console :
/usr/bin/vmware-cmd -v /vmfs/volumes/Storage/vm.vmx stop soft
Argument -v will give a verbose output
"/vmfs/columes/Storage/vm.vmx is the path of your virtual machine configuration file."
"stop soft" will shutdown the instance gracefully.
In order to reset or start the instance use the same command followed by "reset" or "start".
/usr/bin/vmware-cmd -v /vmfs/volumes/Storage/vm.vmx start
How to make VMotion work with NFS
1) Installed Red Hat Linux ( only for NFS purpose )
2) shared a directory thru' NFS : /etc/exports
Method: On Linux server for NFS :
#vi /etc/exports
/shareddirectory *(rw,sync)
wq!
3) Assign permissions on the directory shared to be accessed by VMware servers.
4) start "portmap" and "NFS" services on the vmware servers.
Method and commands used:
#service portmap start
#service nfs start
In order to check if services are running
#pgrep -l nfs
5) Mounted the shared directory on the vmware servers.
Command used:
#mount linuxserver:/shareddirectory /mountpoint
Mountpoint directory is on VMWare ESX hosts.
6) Activate the NFS client port on both vmware host servers thru configuration tab in Virtual Center.
In the Virtual center connected thru' VI client select the host you want to enable the port for and go to the configuration tab ---> Security profile---> check the NFS client port.( Should be done for both ESX servers )
7) Configure VMkernel port on both vmware servers with IP adresses such as "10.1.1.1" & "10.1.1.2".( Depend on your network, this is just an example i gave )
Create a virtual switch as for VMKernel port add a physical NIC, assign IP ( belonging to same subnet as your network ).
8) Enable VMotion on the respective "VMKernel Ports".
9) Add the shared NFS storage on both the Vmware Hosts.
To add storage,login to Virtual Center thru' VI client Go to Configuration ---> storage ---> Add Storage---> select Netowrk File system ----> assign Network Path for shared NFS.
10) Install the VM instance ( Microsoft Windows,Linux etc.) on any VMware host using NFS as shared storage.
11) After installation let the instance be running and try migrating the instance to another host, since vmotion is enabled on VMKernel Port it will migrate VM in running state.
*** A few conditions needed to be taken care of :***
i) Label of the VMKernel Port should be same on both Vmware host for VMotion to work.
ii) To avoid any warnings and failures both hosts should be in single Datacenter.
iii) CPU vendors should be same.
iv) No CD drive should be mounted on the VM instance which needed to be migrated.