VMware ESX and ESXi Scripts & Resources

Disclaimer These scripts have been tested/verified in our own development/staging and production environment. We try to test for all scenarios within our capabilities. It is the responsibility of the end user to validate these scripts prior to implementation within their own environment, especially on production live ESX Hosts and Virtual Machines. We are not held responsible for any unexpected behaviors, though we.d be more than welcome to provide insight or additional information on the scripts as feedback is paramount in aiding our efforts. These scripts are not work of genius; they were created for specific tasks and automation during times of need.

Jump to: ESXi stateless configuration/instructions
Jump to: VMware vimsh commands
Jump to: VMware vCLI
Jump to: VMware RCLI
Jump to: VMware VI Perl Toolkit / vSphere SDK for Perl
Jump to: VMware vMA
Jump to: VMware VIMA
Jump to: VMware VIX & vmrun
Jump to: VMware vSphere API Refrence
Jump to: VMware VI API Reference
Jump to: VMware CodeCentral
Jump to: HP Remote Graphics Software ESX/ESXi VDI Tricks
Jump to: HP RGS (v5.1.5) on Windows 7 on vSphere
Jump to: HP RGS (v5.2.5) on Windows 7 on vSphere (Addendum)
Jump to: vSphere ESX 4.0 tips/tricks
Jump to: vSphere ESX 4.0 - Crash VM Bug?
Jump to: Cloudafied Desktops: HP RGS on Amazon EC2
Jump to: Enable SSH for ESXi
Jump to: Additional Resources
Jump to: Development Server For Sale!!
Jump to: Contacts



Scripts:
vGhetto Script Respository: http://communities.vmware.com/docs/DOC-9852

ghettoVCB-restore.sh
Compatiable with: ESX/ESXi 3.5u2+ and 4.x+
Please find more details located at: http://communities.vmware.com/docs/DOC-10595
Ghetto Tech Preview - Restoring VM's backed up from ghettoVCB to ESX(i) 3.5 and 4.0+

Hot add cpu to supported Linux guestOSes using vSphere ESX(i) 4.0 http://communities.vmware.com/docs/DOC-10492

Hot add memory to vMA or other supported Linux guestOSes using vSphere ESX(i) 4.0 http://communities.vmware.com/docs/DOC-10492

How to increae/resize vMA Disks http://communities.vmware.com/docs/DOC-10501

ghettoVCBg2.pl
Compatiable with: ESX/ESXi 3.5u2+ and 4.x+
Please find more details located at: http://communities.vmware.com/docs/DOC-9843
This tool is the follow up release of the ghettoVCB backup utility which allows users to perform backups of virtual machines residing on ESX(i) 3.5+ servers using methodology similar to VMware's VCB tool. By incorporating highly constructive feedback from the VMware community and utilizing the existing VI API, ghettoVCB’s framework was completely rewritten to be harder, better, faster, stronger.

vGhettoLinkedClone.pl
Compatiable with: ESX/ESXi 4.x+ and vCenter 4.x+
Please find more details located at: vGhettoLinkedClone

vmwarevSphereHealthCheck.pl
Compatiable with: ESX/ESXi 4.x+ and vCenter 4.x+
Please find more details located at: http://communities.vmware.com/docs/DOC-9842
This script generates a health check report similiar to that of vmwareHealthCheckScript but for the new vSphere release of VMware ESX(i) 4.x and VMware vCenter 4.x and it's managed entities.

Sample health report here and here

ghettoShutdown.pl
Compatiable with: ESX/ESXi 3.5u2+
Please find more details located at: http://communities.vmware.com/docs/DOC-9531
This script is similar to Joseph’s work How to configure ESXi to shutdown using an APC SmartUPS although it will not necessitate enabling the unsupported SSH console on the ESXi hosts. This is made possible by utilizing the VI Perl Toolkit to communicate with the ESXi hosts. The only possible drawback however is that next revision of ESXi may disallow write operations and require that the user purchase ESXi license(s) to make full use of the VI API (read/write).

vmwareHealthCheck.pl
Compatiable with: ESX/ESXi 3.5+ and vCenter 2.5+
Please find more details located at: http://communities.vmware.com/docs/DOC-9420
This script generates a health check report of all attributes pertaining to a single ESX/ESXi 3.x+ host or VMware vCenter and its managed entities (i.e. clusters and individual ESX/ESXi 3.x+ hosts). The generated report is based off of some earlier Powershell script work created by Ivo Beerens/Duncan Epping.

Sample health report here and here

ghettoQuickMigrate.sh
Compatiable with: ESX/ESXi 3.5u2+
Please find more details located at: http://communities.vmware.com/docs/DOC-9400
This script provides administrators running the free version of ESXi on several hosts with the capability to perform Hyper-V-like "quick" migrations of virtual machines residing on shared storage between the hosts. VMware's VIMA virtual appliance was chosen as the central launch point for the quick migration process. ghettoQuickMigration.sh is executed from within VIMA and is compatible with ESXi 3.5u2+.

This script follows similarly to the Hyper-V Quick Migration process with the exception of replacing the disk resource swap with a virtual machine unregister/register command on the source and target hosts respectively. The state (powered ON/Suspended/OFF) of the virtual machine designated for migration is preserved through the entire process. Online virtual machines undergoing this migration will experience a temporary pause due to the suspend and resume steps.

ghettoClone.sh
Compatiable with: ESX/ESXi 3.5u2+
Please find more details located at: http://communities.vmware.com/docs/DOC-9321
This script provides administrators with a means to automatically clone and deploy a large subset of virtual machines into a virtual environment without requiring tedious Service Console work or Virtual Center. Furthermore, for ease of accessibility, the free VMware VIMA appliance was chosen as the central launch point for the cloning process. ghettoClone.sh is executed from within VIMA and is compatible with both ESX and ESXi 3.5u2+. It accepts a single source virtual machine along with inputted configuration parameters to tailor cloned virtual machines.

ghetto-esx-linked-clones.sh
Compatiable with: ESX 3.x
Please find more details located at: http://communities.vmware.com/docs/DOC-9020
This script allows users to create linked cloned virtual machine(s) from a master (or golden) virtual machine. Clones may be stored on any type of datastore (LOCAL, SAN, NFS) that is presented to the ESX host. The script is very capable in deploying a large VDI environment in a relatively short amount of time.

There are currently 3 supported use cases:
1) Default
--Description: Generate linked clones located in the same datastore that houses the master (golden) virtual machine. Writes will be directed to their respective linked virtual machine delta file with reads originating from the master virtual machine.
2) Distributed Write(s) I/O
--Description: Generate linked clones evenly across available datastores of choice. Reads will originate from the specified master virtual machine while writes are directed towards their respective virtual machine delta files that have been dispersed across the specified datastores.
3) Distributed Read(s) & Write(s) I/O
--Description: Duplicate the master virtual machine on available datastores of choice and evenly generate linked clones off of each duplicated master virtual machine. Reads and writes will be isolated onto the datastore of the linked clone(s) in question. This process is similar to running multiple instances of the default behavior of the script.
Note: This linked clones script is virtual machine OS independent (i.e. it is not restricted to just Windows OS's for VDI environment). For example, one can utilize this script to their advantage in development environments where new VMs need to be (mass) cloned quickly for testing.

ghetto-esxi-linked-clones.sh
Compatiable with: ESXi
Please find more details located at: http://communities.vmware.com/docs/DOC-9202
This script allows users to create linked cloned virtual machine(s) from a master (or golden) virtual machine on ESXi. The only supported use case is that of the default behavior of the "ghetto-esx-linked-clones.sh" script which is due to some of the limitations in the ESXi Busybox Service Console like environment.

Linked Clones implementation for VMware VDI environment at UC Santa Barbara, ResNet
Please find more details located at: http://communities.vmware.com/docs/DOC-9201

my-vmware-cmd.sh
Supported On: ESX 3.5+ and ESXi
Please find more details located at: http://communities.vmware.com/docs/DOC-9061
This is a custom management script to help administer large virtual machine environments. This script is used to run administrative commands across a large set of virtual machines specified in a file. In particular, this tool complements the developed linked clones. scripts. For example, to save unique attributes (Active Directory personalities, etc.) for each linked VM, a final snapshot is executed on all linked VMs after joining each to the domain. After a specified duration, this script is then used to revert each VM back to a clean state. The same may be applied on other (non-linked) virtual machines currently residing on the ESX(i) server(s).
Usage:
        Local execution-
            my-vmware-cmd.sh [operation] [vm_input_file] 
        Remote execution-
            my-vmware-cmd.sh remote [ESX_ESXI_IP_ADDRESS] [operation] [vm_input_file] 

   Operations:
        start [vm_input_file]
           -- Start all VMs in the input file
        stop [vm_input_file]
           -- Stop all VMs in the input file
        suspend [vm_input_file]
           -- Suspend all VMs in the input file
        resume [vm_input_file]
           -- Resume all suspended VMs in the input file
        reset [vm_input_file]
           -- Hard reset all VMs in the input file
        shutdown [vm_input_file]
           -- Shutdown all VMs in the input file (VMware Tools required)
        reboot [vm_input_file]
           -- Reboot all VMs in the input file (VMware Tools required)
        snap [vm_input_file]
           -- Create administrative pristine snapshot of all VMs in the input file
        revert [vm_input_file]
           -- Revert all VMs in the input file back to pristine state
        purge [vm_input_file]
           -- Removes from local inventory and purges all VMs in the input file
        mac [vm_input_file] [generic|nixdhcp] [NETWORK (172.30.0)] [HOST_COUNT_START (200)]  default=0
           -- Extracts MAC addresses and generates either a generic file or one compatible with *nix dhcpd
               ( e.g. my-vmware-cmd.sh mac [vm_input_file] generic )
               ( e.g. my-vmware-cmd.sh mac [vm_input_file] nixdhcp 172.30.0 200 )
        vnic [vm_input_file]  default=0
           -- Change vNic portgroup for all VMs in the input file
               ( e.g. my-vmware-cmd.sh vnic [vm_input_file] 3 )

Download: npiv_wwn_discovery-esx.sh - 09/20/08
Compatiable with: ESX 3.5+
This script is used to locate all virtual machines that have the NPIV option enabled and provide the VMs Name, Port WWN, Node WWN and the WWN TYPE on an ESX host. This can possibly list virtual machines with the NPIV option in a cluster if the ESX host is connected to all datastores present to the cluster.

Download: npiv_wwn_discovery-esxi.sh - 09/20/08
Compatiable with: ESXi
This script is used to locate all virtual machines that have NPIV option enabled and provide the VMs Name, Port WWN, Node WWN and the WWN TYPE on an ESXi host.

rdm.sh
Please find more details located at: http://communities.vmware.com/docs/DOC-10188
Compatiable with: ESX 3.5+ and ESXi
This script is used to locate all virtual machines that have an RDM mapping and provides the VMs Name, Hard Disk label shown on the VIC/VC, Datastore, LUN UUID, HBA/LUN, Compatibility Mode (Phys/Virt), DiskMode and Capacity.

ghettoVCB.sh
Please find more details located at: http://communities.vmware.com/docs/DOC-8760
Compatiable with: ESX(i) 3.5 and 4.0+
This is a non-interactive script that backs up a specified list of VMs to a chosen datastore. Supported datastores are: local storage, SAN and NFS. The nature of the script allows backups to be scheduled via crontab. The script also provides an option to backup virtual machines to a non-persistent NFS share. The NFS connection is created on the ESX(i) server and is disconnected upon completion of backups.

Detail instructions on how to configure/schedule ghettoVCB (Raj Perumal's The World Runs on Technology Blog):
Part 1 Part 2 Part 3

Stateless ESXi PXE Boot containing stateful information instructions - Click here for more info


VMware's undocumented "vimsh"

Vimsh
is an interactive shell buffer. It allows execution of shell commands in a vim 
buffer, without having to suspend the vim session. It provides an interactive command 
line session. 

In the context of VMware ESX it has been implemented as an API for the ESX host 
agent. VI Client via the ESX host and/or VirtualCenter, and can report and configure 
numerous items.  Changes made by using this command appear in the VI Client console 
at normal refresh schedules. 
What is vmware-vim-cmd?
Introduced in ESX 3.5 this command is a 'wrapper' for the vimsh shell.  It simplifies the 
command and means that vimsh can be run without having to enter and exit the shell 
and use previously documented command switches and "quotes".
Why use it?
There is some overlap from current Service Console tools, such as vmware-cmd and 
esxcfg-* but this API also provides some excellent reporting options and offers new ways 
to tailor and automate scripting tasks. 
The above definitions are the work/findings of Xtravirt and their initial publishing's on VMware vimsh.

Versions of VMware's vimsh:
ESX 3.0.x+
	/usr/bin/vimsh -n -e "command"
ESX 3.5+ 
	/usr/bin/vimsh -n -e "command"
	/usr/bin/vmware-vimsh "command"
	/usr/bin/vmware-vim-cmd "command"
ESXi 3.5+
	/bin/vim-cmd "command"
How to use vimsh?
To see the available commandset for a given "vimsh" release, you just execute the command normally on the shell. 
You'll be be brought into the interactive shell, you can hit "tab" to see the various options and flags. 
When running specific commands on Virtual Machine(s), vimsh requires the internal Virtual Machine Id called "VmId" which
needs to be passed as a parameter, the VmId for a given VM can be located when running vmsvc/getallvms as shown below.
Unlike the traditional vmware-cmd, where you pass in the .vmx path of a VM, you need to extract the VmId if you're looking
to automate/script any tasks using vimsh
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

General "vimsh" commands for all ESX versions:
Substitute the appropriate "vimsh" for the version of ESX

Find all VMs currently registered to ESX host
[vimsh|vmware-vimsh|vmware-vim-cmd] vmsvc/getallvms
vimsh -n -e "vmsvc/getallvms"
vmware-vimsh -n -e "vmsvc/getallvms"
vmware-vim-cmd "vmsvc/getallvms"
		
All VMs output for ESX 3.0.x+

[root@appalachian root]# vmware -v
VMware ESX Server 3.0.0 build-27701

[root@appalachian root]# vimsh -n -e "vmsvc/getallvms"
[2008-12-23 10:18:55.989 'App' 3076464768 info] Current working directory: /usr/lib/vmware/hostd
[2008-12-23 10:18:55.990 'BaseLibs' 3076464768 info] Using system libcrypto, version 90709F

[2008-12-23 10:18:56.021 'BaseLibs' 6237104 warning] [Vmdb_Unset] Unsetting unknown path: /vmomi/

------------------------------
VmId           : 16
Name           : Microsoft Windows XP Professional
File           : [appalachian-local-U320.Storage] /Quentin/Quentin.vmx
GuestOS        : winXPProGuest
Annotation     :
------------------------------
------------------------------
[root@appalachian root]#
All VMs output for ESX 3.5+ / ESXi 3.5+
[root@himalaya lamw]# vmware -v
VMware ESX Server 3.5.0 build-110268
	
[root@himalaya lamw]# vmware-vim-cmd vmsvc/getallvms
Vmid    Name                                                File                                              Guest OS          Version         Annotation                                 
1040    STA202H                 [himalaya-local-SAS.VMStorage] STA202H/STA202H.vmx                              winXPProGuest           vmx-04    
1072    William-XP              [himalaya-local-SAS.VMStorage] William-XP/William-XP.vmx                        winXPProGuest           vmx-04    
16      Bitsy                   [himalaya-local-SAS.VMStorage] Bitsy/Bitsy.vmx                                  otherLinuxGuest         vmx-04    		MySQL FTP Database
1680    Quentin                 [himalaya-local-SAS.VMStorage] Quentin/Quentin.vmx                              winXPProGuest           vmx-0

[root@himalaya lamw]#
Register virtual machines - (functions just like vmware-cmd -s register /vmfs/volumes/......MY_VM.vmx)
[vimsh|vmware-vimsh|vmware-vim-cmd] solo/registervm /vmfs/volumes/......MY_VM.vmx
	
Register virtual machines and assign to specific resource pool
[vimsh|vmware-vimsh|vmware-vim-cmd] solo/registervm /vmfs/volumes/......MY_VM.vmx MACHINE_NAME `cat /etc/vmware/hostd/pools.xml | grep "YOUR-RESOURCE-POOL-NAME" -A1 | grep "<objID>" | sed 's/<objID>//;s/<\/objID>//g' | sed -e 's/^[[:blank:]]*//;s/[[:blank:]]*$//'`
	
vmware-vim-cmd solo/registervm /vmfs/volumes/olga-local-SAS.Storage/UCSB-GAUCHOS/UCSB-GAUCHOS.vmx UCSB-GAUCHOS `cat /etc/vmware/hostd/pools.xml | grep "UCSB-DEV-RP" -A1 | grep "<objID>" | sed 's/<objID>//;s/<\/objID>//g' | sed -e 's/^[[:blank:]]*//;s/[[:blank:]]*$//'`
		
Unregiseter virtual machines - (functions just like vmware-cmd -s unregister /vmfs/volumes/......MY_VM.vmx)
[vimsh|vmware-vimsh|vmware-vim-cmd] vmsvc/unregister [VmId]
	
Find LUN information regarding HBA Adapter, Storage Vendor, State, LUN ID, LUN UUID, portWWN, nodeWWN, pathState, TransportMode,etc.....
[vimsh|vmware-vimsh|vmware-vim-cmd] hostsvc/storage/info | less
	
For HBA information only
[vimsh|vmware-vimsh|vmware-vim-cmd] hostsvc/storage/hba_info
	
For datastore information only
[vimsh|vmware-vimsh|vmware-vim-cmd] hostsvc/datastore/listsummary
[vimsh|vmware-vimsh|vmware-vim-cmd] hostsvc/storage/fs_info
vdf -h equivalent
[vimsh|vmware-vimsh|vmware-vim-cmd] hostsvc/datastore/listsummary | grep -E '(name|url|capacity|type)' | sed 's/,//g'
	
Create NFS Datastore as you would from VIC or VC (different from traditional NFS mount, so you can run vmkfstools w/o having to break up VMDK(s) into 2GB Sparse files)
[vimsh|vmware-vimsh|vmware-vim-cmd] hostsvc/datastore/nas_create [DISPLAY_NAME] [NFS_SERVER_IP] [MOUNT_PATH] [MODE(readwrite=1/readonly=0)]
[vimsh|vmware-vimsh|vmware-vim-cmd] hostsvc/datastore/nas_create MY_NFS_DATASTORE 172.30.0.254 /nfs/mount/point 1
		
Refresh various system attributes to show up on the VIC / VC, this helps when you automating tasks through scripts but don't refresh the GUI
[vimsh|vmware-vimsh|vmware-vim-cmd] internalsvc/refresh_consolenic
[vimsh|vmware-vimsh|vmware-vim-cmd] internalsvc/refresh_datastores
[vimsh|vmware-vimsh|vmware-vim-cmd] internalsvc/refresh_datastores
[vimsh|vmware-vimsh|vmware-vim-cmd] internalsvc/refresh_gateway
[vimsh|vmware-vimsh|vmware-vim-cmd] internalsvc/refresh_network
[vimsh|vmware-vimsh|vmware-vim-cmd] internalsvc/refresh_pnic
[vimsh|vmware-vimsh|vmware-vim-cmd] hostsvc/refresh_firewall
[vimsh|vmware-vimsh|vmware-vim-cmd] hostsvc/refresh_services
	
#############################################################################################################################

ESX 3.0.x+ specific "vimsh" commands:

Standard VM operations:
vimsh -n -e "vmsvc/powerstate [VmId]"
vimsh -n -e "vmsvc/poweron [VmId]"
vimsh -n -e "vmsvc/poweroff [VmId]"
vimsh -n -e "vmsvc/suspend [VmId]"
vimsh -n -e "vmsvc/reset [VmId]"
vimsh -n -e "vmsvc/shutdown [VmId]"
vimsh -n -e "vmsvc/reboot [VmId]"
vimsh -n -e "vmsvc/hibernate [VmId]"
vimsh -n -e "vmsvc/createsnapshot [VmId] [snapshotName] [snapshotDescription] [includeMemory]"
vimsh -n -e "vmsvc/createsnapshot XXXX FIRST_SNAPSHOT MY_FIRST_SNAPSHOT_1"
vimsh -n -e "vmsvc/revertsnapshot [VmId] [snapshotLevel] [snapshotIndex]"
vimsh -n -e "vmsvc/revertsnapshot XXXX 1"
vimsh -n -e "vmsvc/removesnapshot [VmId] [removeChildren] [snapshotLevel] [snapshotIndex]"
vimsh -n -e "vmsvc/removeallsnapshots [VmId]"
	
Maintenance Mode for ESX host (unfortunately this command will not evacuate/VMotion your VMs to rest of the cluster)
vimsh -n -e "hostsvc/maintenance_mode_enter"
vimsh -n -e "hostsvc/maintenance_mode_exit"
	
Enable VMotion
vimsh -n -e "hostsvc/vmotion/vnic_set [vnic]" 
	
Add/Remove vSwitch
vimsh -n -e "hostsvc/net/vswitch_add [vswitch_name]"
vimsh -n -e "hostsvc/net/vswitch_add vSwitch12"
vimsh -n -e "hostsvc/net/vswitch_add [vswitch_name]"
Add/Remove portgroup
vimsh -n -e "hostsvc/net/portgroup_add [options] [vswitch_name] [portgroup_name] [vlan_id]"
vimsh -n -e "hostsvc/net/portgroup_add --nicteaming-policy=loadbalance_ip vSwitch0 Admin_Portgroup 27"
vimsh -n -e "hostsvc/net/portgroup_remove [vswitch_name] [portgroup_name]"
#############################################################################################################################

ESX 3.5+ and ESXi 3.5+ specific "vimsh" commands:
Substitute either (vmware-vim-cmd) for ESX 3.5+ w/Service Console or (vim-cmd) for ESXi 3.5+

Standard VM operations:
vmware-vim-cmd vmsvc/power.getstate [VmId]
vmware-vim-cmd vmsvc/power.on [VmId]
vmware-vim-cmd vmsvc/power.off [VmId]
vmware-vim-cmd vmsvc/power.suspend [VmId]
vmware-vim-cmd vmsvc/power.reset [VmId]
vmware-vim-cmd vmsvc/power.shutdown [VmId]
vmware-vim-cmd vmsvc/power.reboot [VmId]
vmware-vim-cmd vmsvc/power.hibernate [VmId]
vmware-vim-cmd vmsvc/snapshot.create [VmId] [snapshotName] [snapshotDescription] [includeMemory]
vmware-vim-cmd "vmsvc/snapshot.create XXXX FIRST_SNAPSHOT MY_FIRST_SNAPSHOT_1"
vmware-vim-cmd vmsvc/snapshot.revert [VmId] [snapshotLevel] [snapshotIndex]
vmware-vim-cmd "vmsvc/snapshot.revert XXXX 1"
vmware-vim-cmd vmsvc/snapshot.removeall [VmId]
vmware-vim-cmd vmsvc/snapshot.remove [VmId] [removeChildren] [snapshotLevel] [snapshotIndex]
vmware-vim-cmd vmsvc/snapshot.get [VmId]
	
Maintenance Mode for ESX host (unfortunately this command will not evacuate/VMotion your VMs to rest of the cluster)
vmware-vim-cmd hostsvc/maintenance_mode_enter
vmware-vim-cmd hostsvc/maintenance_mode_exit
	
Enable VMotion (prior release used the VMotion portgroup name, as of 3.5, the command requires the VmkX value)
vmware-vim-cmd hostsvc/vmotion/vnic_set [vnic]
vmware-vim-cmd "hostsvc/vmotion/vnic_set" `esxcfg-vmknic -l | grep "VMKERNEL_PORTGROUP_NAME" | awk '{print $1}'`
		
Add/Remove vSwitch
vmware-vim-cmd hostsvc/net/vswitch_add [vswitch_name]
vmware-vim-cmd hostsvc/net/vswitch_add vSwitch12
vmware-vim-cmd hostsvc/net/vswitch_remove [vswitch_name]
Add/Remoev portgroup
vmware-vim-cmd hostsvc/net/portgroup_add [options] [vswitch_name] [portgroup_name] [vlan_id]
vmware-vim-cmd hostsvc/net/portgroup_add --nicteaming-policy=loadbalance_ip vSwitch0 Admin_Portgroup 27
vmware-vim-cmd hostsvc/net/portgroup_remove [vswitch_name] [portgroup_name]
For LUN information only
vmware-vim-cmd hostsvc/summary/scsilun
	
For HBA information only
vmware-vim-cmd hostsvc/summary/hba
	
For datastore information only
vmware-vim-cmd hostsvc/summary/fsvolume
	
List Promiscuous Mode, Mac Address Change and Forged Transmission @vSwitch or @portgroup level
vmware-vim-cmd hostsvc/net/vswitch_info | grep -E '(name|allowPromiscuous|macChanges|forgedTransmits)'
[root@himalaya backup_test]# vmware-vim-cmd hostsvc/net/vswitch_info | grep -E '(name|allowPromiscuous|macChanges|forgedTransmits)'
      name = "vSwitch0",
               allowPromiscuous = false,
               macChanges = true,
               forgedTransmits = true,
      name = "vSwitch1",
               allowPromiscuous = false,
               macChanges = true,
               forgedTransmits = true,
      name = "vSwitch5",
               allowPromiscuous = false,
               macChanges = true,
               forgedTransmits = true,
vmware-vim-cmd hostsvc/net/config | grep -E '(name|allowPromiscuous|macChanges|forgedTransmits)'


VMware VI Perl Toolkit

What is VMware VI Perl Toolkit?
VI Perl Toolkit command documentation

VMware vSphere SDK for Perl

This is the new name for the VIPT which are the Perl bindings to the vSphere SDK, all utilities are now under the following path: /usr/lib/vmware-vcli/apps
vSphere SDK for Perl command documentation

One of the new utilties that is packaged with the toolkit is /usr/lib/vmware-vcli/apps/general/credstore_admin.pl
   add -s|--server  -u|--username  -p|--password 
      Add new entry into the credential store.

   get -s|--server  -u|username 
      Retrieve password from credential store

   remove -s|--server  -u|--username 
      Remove existing entry from credential store.

   list [-s|--server ] [--showpw]
      List existing entries.

   clear
      Delete all entries from credential store.

   help
      Display this menu.
	

VMware vCLI

VMware vCLI is the next version of the popular VMware RCLI toolset, all vCLI commands no longer contain the .pl extension, be sure to update your scripts if you're planning on testing/porting over to vCLI. There have been numerous bug fixes and new features, including some new commands. The following will document some of the changes and formal documentation will be available from VMware upon vSphere's GA.
System Management
vicfg-advcfg / esxcfg-advcfg
    --set-message
    -m
	Set DCUI welcome message.
	
vicfg-module / esxcfg-module
    --list
    -l
	List the set of modules on the host.
	
vihostupdate [for ESX(i) 4.x+] and vihostupdate35 [for ESX(i) 3.5]
   --bulletin
    -B

             Parameter to specify the selective bulletin(s) to install. Use
             comma to specify multiple bulletins (eg. bulletin1,bulletin2).
             All bulletins will be installed if this option is not specified.
   --list
    -l

             List the bulletins in the bundle or in the depot.

   --nodeps
    -d

             Ignore dependencies during install operation.

   --nosigcheck
    -c

             Ignore integrity checking during install operation.

   --remove
    -r

             Remove selective bulletins from the host.

	
vmkuptime
	This was never implemented in VIMA 1.0 and looks like it's been removed in vMA 4.0
	
Network Management
vicfg-route / esxcfg-route
    --add
    -a
          Add route to the VMkernel,
                     requires <network> (described below)
                     <network> can be specified in 3 ways:
                             * As a single argument in <IP>/<Mask> format
                             * Or as a <IP> <Netmask> pair.
                             * Or as 'default'
   --del
    -d
          Delete route from the VMkernel,
                     requires <network> (described below)
                     <network> can be specified in 3 ways:
                             * As a single argument in <IP>/<Mask> format
                             * Or as a <IP> <Netmask> pair.
                             * Or as 'default'
   --family (default 'v4')
    -f
          Address family to work on ('v4' or 'v6').  Default to 'v4'.
   --list
    -l
          List configured routes for the VMkernel
	
vicfg-vmknic / esxcfg-vmknic
    --add
    -a
          Add a VMkernel NIC to the system. Requires ip, netmask, portgroup.
   --delete
    -d
          Delete the VMkernel NIC on the given portgroup.
   --disable-vmotion
    -u
          Disable VMotion for the VMkernel NIC on a specified
                     portgroup.
   --dvport-id
    -v
          Setting DVPort ID of the connection point. Requires --dvs-name parameter.
   --dvs-name
    -s
          Setting DVSwitch name of the connection point. Requires --dvport-id parameter.
   --enable-ipv6
    -6
          Enable (true) or disable (false) IPv6 for next boot.
   --enable-vmotion
    -E
          Enable VMotion for the VMkernel NIC on a specified portgroup.
   --ip
    -i
          The IP address for this VMkernel NIC where IP address can be:
             <X.X.X.X>      - to use static IPv4 address specified
             DHCP           - to enable IPv4 DHCP for address
             <X:X:X::/X>    - to use static IPv6 address
             DHCPV6         - to enable IPv6 DHCP for address
             AUTOCONF       - to enable IPv6 Router advertised address
   --list
    -l
          List VMkernel NICs on the system.
   --mtu
    -m
          MTU for the interface being created.
   --netmask
    -n
          The IP netmask for this VMkernel NIC
   --portgroup
    -p
          Setting portgroup as connection point.
   --tso
    -t
          Disable TSO for the vmknic being created.
   --unset-ip
    -U
          The IP address for this VMkernel NIC where IP address can be:
             <X:X:X::/X>    - to remove the specified IPv6 address
             DHCPV6         - to disable IPv6 DHCP address
             AUTOCONF       - to disable IPv6 Router advertised address
	
vicfg-vswitch / esxcfg-vswitch
   --add-dvp-uplink
    -P
          Add an uplink adapter (pnic) to a DVPort
   --del-dvp-uplink
    -Q
          Delete an uplink adapter from a DVPort
   --dvp
    -V
          The name of the DVPort
	
Storage Management
esxcli (Take a look at Duncan Epping's post for more information)
	esxcli is a framework for CLI commands
	
vicfg-iscsi / esxcfg-iscsi (We finally have a way of managing iSCSI configurations using the vCLI and there are quite a few options)
	
   --adapter
    -H

         List iSCSI adapter(s).

   --add
    -a

         Add operation.  Used with --discovery or --static option.

   --alias
    -k

         iSCSI initiator alias name.  Used with --iscsiname option.

   --auth_password
    -w

         Authentication password.  Used with --authentication option.

   --auth_username
    -u

         Authentication username.  Used with --authentication option.

   --authentication
    -A

         Authentication properties and configuration.

   --detail
    -f

         Details of iSCSI parameters.  Used with --parameter option.

   --disable
    -q

         Disable operation.  Used with --swiscsi option.

   --discovery
    -D

         Discovery addresses properties and configuration.

   --enable
    -e

         Enable operation.  Used with --swiscsi option.

   --gateway
    -g

         Default gateway.  Used with --network option.

   --ip
    -i

         Specify IP address or DNS recognized domain name.  Used with
         --discovery, --static, --authentication, --network, or
         --parameter option.

   --iscsiname
    -I

         List or configure iSCSI initiator name or alias.

   --level
    -c

         Authentication level.  Used with --authentication option.

   --list
    -l

         List operation.  Used with --discovery, --static, --target, --lun,
         --authentication, --phba, --network, --pnp, --iscsiname, --parameter,
         --swiscsi or --adapter options.

   --lun
    -L

         List active LUNs information.

   --method
    -m

         Authentication method, allows 'CHAP'.  Used with --authentication
         option.

   --mtu
    -M

         MTU size.  Used with --pnp option.

   --mutual
    -b

         If set, indicates mutual CHAP.  Used with --authentication option.

   --name
    -n

         Initiator or target iSCSI name.  Used with --static,
         --authentication, --iscsiname, or --parameter option.

   --network
    -N

         Network properties and configuration.

   --parameter
    -W

         For iSCSI parameters operations.

   --phba
    -P

         List Phba and node information.

   --pnp
    -p

         List Physical Network Portal properties.

   --remove
    -r

         Remove operation.  Used with --discovery or --static option.

   --reset
    -o

         Reset target level specified iSCSI parameter to be inherited from
         adapter level. Provide <name>.  The <name> can be one of the
         parameter names listed in the --parameter --list option. Used with
         --parameter option.

   --reset_auth
    -z

         Reset target level authentication properties to be inherited from
         adapter level.  Used with --authentication option.

   --set
    -j

         Set iSCSI parameter specified by <name> to the value specified by
         <value>.  Provide <name>=<value> pair to this option.  The <name>
         can be one of the parameter names listed in the --parameter --list
         option plus 'dataDigestType', or 'headerDigestType' when used with
         --parameter option.  The <name> can be 'ARP' when used with
         --network option.

   --static
    -S

         Static discovery targets properties and configuration.

   --subnetmask
    -s

         Subnet mask.  Used with --network option.

   --swiscsi
    -E

         Software iSCSI enabling configuration or information.

   --target
    -T

         List active targets information.

   --target_id
    -t

         Target ID.  Used with --lun option.


	
vicfg-mpath / esxcfg-mpath
	for ESX(i) 3.5 use vicfg-mpath35 / esxcfg-mpath35 
	for ESX(i) 4.x+ use vicfg-mpath / esxcfg-mpath
	
vicfg-nas / esxcfg-nas
    --readonly
    -y
      Add the new NAS filesystem with readonly access
	
vicfg-vmhbadevs / esxcfg-vmhbadevs
	is now vicfg-scsidevs/ esxcfg-scsidevs
	
vicfg-volume / esxcfg-volume (Take a look at Duncan Epping's post for more information
   --list
    -l

              List all volumes which have been detected as snapshots/replicas.

   --persistent-mount
    -M

              Mount a snapshot/replica volume persistently, if its original
              copy is not online.

   --resignature
    -r

              Resignature a snapshot/replica volume.

   --umount
    -u

              Umount a snapshot/replica volume.

	

VMware RCLI

What is VMware RCLI?
The VMware Infrastructure Remote CLI provides a command-line interface for datacenter management from a remote server. This interface is fully supported on ESX(i) 3.5u2+. Download it here. 

You can also download the RCLI command documentation here
Here are some awesome examples and usage of the RCLI commands by Dave Mischenko

System Management
vicfg-advcfg.pl  / esxcfg-advcfg.pl 
Sets and query advanced configuration options
vicfg-cfgbackup.pl  / esxcfg-cfgbackup.pl 
Backup and restore the configuration of your ESX 3i host
vicfg-dumppart.pl / esxcfg-dumppart.pl 
Used to set and configure the host dump partition
vicfg-module.pl / esxcfg-module.pl 
View and set the option string sent to modules when they are load by the VMkernel
vicfg-ntp.pl / esxcfg-ntp.pl 
Add / remove NTP servers
vicfg-syslog.pl / esxcfg-syslog.pl  
Configure syslog setting
vicfg-user.pl / esxcfg-user.pl 
Manage local users and groups
vihostupdate.pl 
Apply patches to your ESX 3i host
vmkuptime.pl
Not implemented at this time
Network Management
vicfg-dns.pl / esxcfg-dns.pl 
Configure the host name and domain name for your ESX 3i host
vicfg-nics.pl / esxcfg-nics.pl 
Configure host NIC duplex and speed
vicfg-route.pl / esxcfg-route.pl 
Set the default gateway for the VMkernel IP stack
vicfg-snmp.pl / esxcfg-snmp.pl 
Configure SNMP community and trap settings for SNMP traps
vicfg-vmknic.pl / esxcfg-vmknic.pl 
Used to manage VMkernel port groups
vicfg-vswitch.pl / esxcfg-vswitch.pl 
Used to manage virtual switches and port groups
Storage Management
vicfg-mpath.pl / esxcfg-mpath.pl 
Manage multipath setting for iSCSI and Fibre Channel LUNs
vicfg-nas.pl / esxcfg-nas.pl 
Used to managed NFS datastores
vicfg-rescan.pl / esxcfg-rescan.pl 
Rescan an HBA for LUN changes
vicfg-vmhbadevs.pl / esxcfg-vmhbadevs.pl 
Display available LUNs
File/Datastore Management
vifs.pl 
Copy files to and from your ESXi host
vmkfstools.pl - Create, manipulate and manage files stored in VMFS volumes
[vi-admin@vima ~]$ vmkfstools.pl --help
	
Virtual Machine Management
vmware-cmd.pl - Legacy command to manage virtual machines on a given host
[vi-admin@vima ~]$ vmware-cmd.pl --server himalaya.primp-industries.com --username root -l
	
	/vmfs/volumes/48c3a8cb-92b015b9-de33-003048670886/VCAP/VCAP.vmx
	/vmfs/volumes/48e91a93-a0a8d3bf-f831-003048670887/NATbox/NATbox.vmx
	/vmfs/volumes/48c3a8cb-92b015b9-de33-003048670886/Mog/Mog.vmx
	/vmfs/volumes/48e91a93-a0a8d3bf-f831-003048670887/Primp-DevAD/Primp-DevAD.vmx
	/vmfs/volumes/48c3a8cb-92b015b9-de33-003048670886/Fullerene/Fullerene.vmx
	.....
	
svmotion.pl 
Migrate a running virtual machine to another storage LUN
Performance Management
resxtop.pl - Monitor the hosts use of CPU, memory and disk resources
[vi-admin@vima ~]$ resxtop.sh --server himalaya.primp-industries.com --username root
	
	 6:06:26pm up 45 days  4:49, 163 worlds; CPU load average: 0.25, 0.24, 0.24
PCPU(%):   0.00,   0.00,   0.00,   0.00,   0.00,   0.00,   0.00,   0.00 ;   used total:   0.00
CCPU(%):   0 us,   0 sy,   0 id,   0 wa ;       cs/sec:      0

     ID    GID NAME             NWLD   %USED    %RUN    %SYS   %WAIT    %RDY   %IDLE  %OVRLP   %CSTP  %MLMTD
      1      1 idle                8    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
      2      2 system              6    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
      6      6 helper             23    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
      7      7 drivers            12    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
      8      8 vmotion             1    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
      9      9 console             1    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
     17     17 vmware-vmkauthd     1    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
     18     18 Fullerene           5    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
     19     19 Synapse             5    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
     20     20 William-XP          7    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
	....
	


VMware vMA

What is VMware vMA?
VMware vMA is the next release of the VMware VIMA vApp (Virtual Appliance) which will be available as part of the vSphere platform launch, there have been numerous fixes and enhancements from the last release and more information will be available upon vSphere's GA.
Interesting tools
There will be no direct upgrade paths from VIMA 1.0 to vMA 4.0, you'll need to re-deploy the vApp and reconfigure and re-add all your ESX(i) 3.5u2+ and ESX(i) 4.x hosts manually using vifp. Here are two tools that I are worth mentioning when deploying vMA 4.0.

The first tool is called bulkAddServers.pl which allows a user to specify a list of host(s) and providing a username/password once and the script will automatically import the entire list, without having to add each host manually and providing the credentials each time. [this works very if you a common account across all your host(s))]. 
The script is stored in: /opt/vmware/vima/samples/perl/bulkAddServers.pl

Sample file containing host(s) to add
[vi-admin@rafaeli ~]$ cat hosts_to_add
everest.primp-industries.com
himalaya.primp-industries.com
	
Sample execution of adding two host(s)
[vi-admin@rafaeli ~]$ sudo /opt/vmware/vima/samples/perl/bulkAddServers.pl --filename hosts_to_add
Do you want to use the same password for all of the hosts (yes/no) :  yes
Enter common root password:

All Targets Added Successfully.
	
Verify host(s) have been added
[vi-admin@rafaeli ~]$ sudo vifp listservers
everest.primp-industries.com    ESX
himalaya.primp-industries.com   ESX

	
The next tool is primarly to help user's execute a command or series of command across a set of ESX(i) host(s), in the past you would need to manually do this for each of the manage host(s) with the vCLI/RCLI tools, say to add/update portgroup on a vSwitch for example. This can be pretty redudant and you could write a quck for loop to do this but VMware wrote a script called mcli which allows a user to execute a command and it's argument against a set of host(s) listed in a file. 
The script is stored in: /opt/vmware/vima/samples/perl/mcli.pl

[vi-admin@rafaeli ~]$ /opt/vmware/vima/samples/perl/mcli.pl --help

Invalid arguments

Usage:
        ./mcli <filename> <vicli-command> <options-for-vicli-command>
	
Sample file containing host(s) to execute command against
[vi-admin@rafaeli ~]$ cat hosts_to_execute_cmd_on
everest.primp-industries.com
himalaya.primp-industries.com
	
Sample execution to check for syslog configuration
[vi-admin@rafaeli ~]$ /opt/vmware/vima/samples/perl/mcli.pl hosts_to_execute_cmd_on esxcfg-syslog --show

everest.primp-industries.com:
No remote syslog server configured.

himalaya.primp-industries.com:
No remote syslog server configured.

	
What's new with vMA
vma-help
For help on the vSphere Authentication Component (vi-fastpass)
run 'vma-help ' Possible commands are:
        vifp vifpinit vilogger


For help on vSphere CLI commands run 'vma-help '. Possible commands are:
        esxcfg-advcfg esxcfg-cfgbackup esxcfg-dns esxcfg-dumppart
        esxcfg-iscsi esxcfg-module esxcfg-mpath esxcfg-mpath35
        esxcfg-nas esxcfg-nics esxcfg-ntp esxcfg-rescan esxcfg-route
        esxcfg-scsidevs esxcfg-snmp esxcfg-syslog esxcfg-user
        esxcfg-vmknic esxcfg-volume esxcfg-vswitch esxcli resxtop
        svmotion vicfg-advcfg vicfg-cfgbackup vicfg-dns vicfg-dumppart
        vicfg-iscsi vicfg-module vicfg-mpath vicfg-mpath35 vicfg-nas
        vicfg-nics vicfg-ntp vicfg-rescan vicfg-route vicfg-scsidevs
        vicfg-snmp vicfg-syslog vicfg-user vicfg-vmknic vicfg-volume
        vicfg-vswitch vifs vihostupdate vihostupdate35 viperl-support
        vmkfstools vmware-cmd

	
vifp (supports vCenter targets now)
    removeserver  <server>  [--protocol ]
                            [--portnumber ]
                            [--servicepath ]
                            [--username ]
                            [--password ]
                            [--force]
	
vilogger
    disable         [--server ]
                    [--logname ]
                    [--force]
	
vima-update
        vima-update scan
                Lists applicable bulletins with updates
        vima-update -b  update
                Updates to a specific bulletin
        vima-update update
                Applies all available updates
	
Add a vCenter 4.0 as a target
[vi-admin@vma ~]$ sudo vifp addserver mauna-loa.primp-industries.com --username primp
primp@mauna-loa.primp-industries.com's password:
This will store username and password in credential store which is a security risk. Do you want to continue?(yes/no): yes

[vi-admin@vma ~]$ sudo vifp listservers
himalaya.primp-industries.com   ESX
everest.primp-industries.com    ESX
mauna-loa.primp-industries.com  vCenter

	
Querying specific ESX/ESXi host through vCenter target (use --vihost to specify ESX/ESXi host)
[vi-admin@vma ~]$ vifpinit mauna-loa.primp-industries.com

[vi-admin@vma ~][mauna-loa.primp-industries.com]$ esxcfg-mpath -l --server mauna-loa.primp-industries.com --vihost everest.primp-industries.com
block.cciss/c0d0:0-block.0:0-mpx.vmhba0:C0:T0:L0
   Runtime Name: vmhba0:C0:T0:L0
   Device: mpx.vmhba0:C0:T0:L0
   Device Display Name: Local VMware Disk (mpx.vmhba0:C0:T0:L0)
   Adapter: vmhba0 Channel: 0 Target: 0 LUN: 0
   Adapter Identifier: block.cciss/c0d0:0
   Target Identifier: block.0:0
   Plugin: NMP
   State: active
   Transport: block

	


VMware VIMA

What is VMware VIMA?
http://www.vmware.com/support/developer/vima/

Why use VMware VIMA
-VIMA can help with centralize management (still WIP for VMware)
-RCLI + VI Perl Toolkit is consolidated within VIMA
How to setup VMware VIMA
Click here to setup

Add an ESX/ESXi 3.5+ to VIMA's managment (prompts for root password of ESX(i) host)
sudo vifp addserver [ESX_IP]
	
Remove an ESX/ESXi 3.5+ to VIMA's managment (prompts for root password of ESX(i) host)
sudo vifp removeserver [ESX_IP]
	
List all managed ESX/ESXi 3.5+ hosts on VIMA
sudo vifp listservers
[vi-admin@vima-primp-industries host]$ sudo vifp listservers
olga.resnet.ucsb.edu
himalaya.primp-industries.com
Enable VI fastpass for a given host. This allows you to store credentials without having to pass them in each time you execute a command
vifpinit [ESX_HOSTNAME_OR_IP]
	
Example of using an RCLI command utlizing VI Fastpass
[vi-admin@vima-primp-industries host]$ ./hostinfo.pl --server himalaya.primp-industries.com
Host Information

Host Name:                       himalaya.primp-industries.com
Port Number:                     902
BootTime:                        2008-11-19T23:14:13.703017-08:00
Cpu Model:                       Intel(R) Xeon(R) CPU           L5410  @ 2.33GHz
Cpu Speed:                       18666663120
Cpu Usage:                       1977
File System:                     vmfs nfs
Host Status:                     The status is unknown
Maintenance mode:                0
Physical Memory:                 12884115456 bytes
Memory Usage:                    7719MB
Network Adapters:                2
Reboot Required:                 0
Software on host:                VMware ESX Server 3.5.0 build-110268
VMotion:                         0
Host operations can be performed on a given ESX/ESXi Server or operations can be performed within Virtual Center such as adding/removing host/etc
./hostops.pl --operation [operation] --target_host [ESX_HOSTNAME]
operations: add_standalone, disconnect, enter_maintenance, exit_maintenance, reboot, shutdown ,addhost,removehost, moveintofolder, moveintocluster
[vi-admin@vima-primp-industries host]$ ./hostops.pl --operation enter_maintenance --target_host olga.resnet.ucsb.edu
		
[vi-admin@vima-primp-industries host]$ ./hostops.pl --operation disconnect --target_host olga.resnet.ucsb.edu --server VC_SERVER --username VC_USER
		
Locate all Virtual Machines with snapshots on all ESX/ESXi servers being managed by VIMA
snapshotmanager.pl --operation list | grep -v "No Snapshot" | sed '/^$/d'
	
Locate all VMs with snapshots on a specific ESX host
snapshotmanager.pl --operation list --server [ESX_HOSTNAME] | grep -v "No Snapshot" | sed '/^$/d'
[vi-admin@vima-primp-industries vm]$ ./snapshotmanager.pl --operation list --server himalaya.primp-industries.com | grep -v "No Snapshot" | sed '/^$/d'
		
Snapshots for Virtual Machine Tuan-test under host himalaya.primp-industries.com
Name                                           Date             State Quiesced
  s                                              2008-12-14T00:38 poweredOff N
Snapshots for Virtual Machine Thinapp under host himalaya.primp-industries.com
Name                                           Date             State Quiesced
  Before Thinapp                                 2008-12-16T20:57 poweredOff N
   Pristine-After Thinapp Install                2008-12-16T21:17 poweredOff N
Snapshots for Virtual Machine Labclient-2 under host himalaya.primp-industries.com
Name                                           Date             State Quiesced
  Cloned                                         2008-12-13T14:41 poweredOff N
   pristine                                      2008-12-13T14:52 poweredOff N
Snapshots for Virtual Machine Labclient-3 under host himalaya.primp-industries.com
Name                                           Date             State Quiesced
  Cloned                                         2008-12-13T14:41 poweredOff N
   pristine                                      2008-12-13T14:52 poweredOff N
Snapshots for Virtual Machine Labclient-1 under host himalaya.primp-industries.com
Name                                           Date             State Quiesced
  Cloned                                         2008-12-13T14:41 poweredOff N
   pristine                                      2008-12-13T14:52 poweredOff N
	
List all information regarding datastore(s)/filesystem/vm/etc... for specific ESX/ESXi server
dsbrowse.pl --server [ESX_HOSTNAME]
dsbrowse.pl olga.resnet.ucsb.edu
Information about datastore : 'olga-local-SAS.Storage'
---------------------------
Summary
 Name             : olga-local-SAS.Storage
 Location         : /vmfs/volumes/49167992-ac31f0a5-3f9f-001f29c7a04c
 File system      : VMFS
 Maximum Capacity : 255.25 GB
 Available space  : 244.658203125 GB

Hosts associated with this datastore.
 olga.resnet.ucsb.edu

Virtual machines on this datastore.
 None

Templates on this datastore.
 None

Datastore Folder Structure.
 Folder Path: '[olga-local-SAS.Storage]'
 Files present
  UCSB-GAUCHOS
  ........
  .......
  ......
		
List specific attributes regarding datastore(s)/filesystem/vm/etc... for specific ESX/ESXi server (this will include VM information by default)
dsbrowse.pl --server [ESX_HOSTNAME] --attributes [name,location,filetype,capacity,freespace,hosts,vm,templates]
./dsbrowse.pl --server olga.resnet.ucsb.edu --attributes name,location,capacity,freespace
Information about datastore : 'olga-local-SAS.Storage'
---------------------------
Summary
 Maximum Capacity : 255.25 GB
 Available space  : 244.658203125 GB
 Location         : /vmfs/volumes/49167992-ac31f0a5-3f9f-001f29c7a04c
 Name             : olga-local-SAS.Storage

Datastore Folder Structure.
 Folder Path: '[olga-local-SAS.Storage]'
 Files present
  UCSB-GAUCHOS		
		
If you would like to exclude VM information, use the following and extract what you need:
dsbrowse.pl --server olga.resnet.ucsb.edu --attributes name,location,capacity,freespace | grep -E '(Name|Location|File system|Maximum Capacity|Available space)'

 Maximum Capacity : 124.75 GB
 Available space  : 34.1806640625 GB
 Location         : /vmfs/volumes/48e1cd81-81223593-6cd8-00215acaa2b2
 Name             : dlgCore-FC-LUN200.Templates
 
 Maximum Capacity : 255.25 GB
 Available space  : 244.658203125 GB
 Location         : /vmfs/volumes/49167992-ac31f0a5-3f9f-001f29c7a04c
 Name             : olga-local-SAS.Storage
 
 Maximum Capacity : 151.75 GB
 Available space  : 30.5517578125 GB
 Location         : /vmfs/volumes/48e1a4a6-3b55e69b-02a9-001f29c948e2
 Name             : dlgCore-FC-LUN202.VMstorage2
 
 Maximum Capacity : 152.75 GB
 Available space  : 55.947265625 GB
 Location         : /vmfs/volumes/48e16ed0-420158d5-5601-00215acaa2b2
 Name             : dlgCore-FC-LUN203.VMstorage3
 
 Maximum Capacity : 150.75 GB
 Available space  : 23.7802734375 GB
 Location         : /vmfs/volumes/48e1b819-3443974c-03c4-001f29c948e2
 Name             : dlgCore-FC-LUN201.VMstorage1
		
		
Quick and dirty script of pulling information about all Virtual Machines residing on a given ESX/ESXi 3.5+ Server
#!/bin/bash

if [ ! $# -eq 1 ]; then
        echo "Usage: `basename $0` [ESX_ESXi_HOSTNAME_OR_IP]"
        exit 1
fi

ESX_HOST=$1

for VM in `/usr/lib/vmware-viperl/apps/vm/vminfo.pl --server "${ESX_HOST}" | grep -E '(Name:|vmPathName:)' | sed -e '$!N' -e 's/\n//;s/vmPath//g' | sed 's/[[:blank:]]$//g' | sed 's/Name://g' | sed 's/[[:blank:]]\{3,\}/   /g' | awk -F'   ' '{print "\""$2"\";\""$3"\""}' |  sed 's/\] /\]\";\"/g'`;
	do
        VM_NAME=$(echo "${VM}" | awk -F ";" '{print $1}' | sed 's/"//g')
        /usr/lib/vmware-viperl/apps/vm/guestinfo.pl --vmname ${VM_NAME} --operation display --server "${ESX_HOST}"
        echo -e "###################################################################################\n"
done
[vi-admin@vima-primp-industries ~]$ ./getallvms.sh
Usage: getallvms.sh [ESX_ESXi_HOSTNAME_OR_IP]
[vi-admin@vima-primp-industries ~]$ ./getallvms.sh olga.resnet.ucsb.edu


Guest Info for the Virtual Machine 'UCSB-RESNET' under host olga.resnet.ucsb.edu

UCSB-RESNET guestFamily: windowsGuest
UCSB-RESNET guestFullName: Microsoft Windows XP Professional (32-bit)
UCSB-RESNET guestId: winXPProGuest
UCSB-RESNET guestState: running
UCSB-RESNET hostName: WinXPeDev.
UCSB-RESNET ipAddress: 169.254.74.15
UCSB-RESNET toolsStatus: VMware Tools is running and the version is current.
UCSB-RESNET toolsVersion: 103908
UCSB-RESNET Screen - Height: 0
UCSB-RESNET Screen - Width: 0
UCSB-RESNET Disk[0]: Capacity 10725732352
UCSB-RESNET Disk[0]: Path : C:\
UCSB-RESNET Disk[0]: freespace : 5716586496
UCSB-RESNET net[0] - connected : 1
UCSB-RESNET net[0] - deviceConfigId : 4000
UCSB-RESNET net[0] - macAddress : 00:50:56:b4:69:0b
UCSB-RESNET net[0] - network : IsolatedNetwork
UCSB-RESNET net[0] - ipAddress : 169.254.74.15
###################################################################################

	
You can see that you can easily modify the output to extract certain pieces of information from this output, including substituting other RCLI commands

VMware VIX & vmrun

What is VMware VIX and why use it?
http://blogs.vmware.com/vix/2008/07/what-is-vix-and.html

What is VMware vmrun?
VMware vmrun
vmrun command documentation List running VMs on specific ESX/ESXi host
[vmrun.exe|vmrun] -T esx -h https://ESX_IP_OR_HOSTNAME/sdk -u ESX_USER_NAME -p ESX_PASSSWORD list
# Windows example of running vmrun on Windows XP
C:\Program Files\VMware\VMware VIX>vmrun.exe -T esx -h https://himalaya.primp-industries.com/sdk -u root -p ********* list
Total running VMs: 14
[himalaya-local-SAS.VMStorage] Fullerene/Fullerene.vmx
[himalaya-local-SATA.Storage] Primp-DevAD/Primp-DevAD.vmx
[himalaya-local-SAS.VMStorage] Synapse/Synapse.vmx
[himalaya-local-SAS.VMStorage] STA202I/STA202I.vmx
[himalaya-local-SAS.VMStorage] Bitsy/Bitsy.vmx
[himalaya-local-SAS.VMStorage] William-XP/William-XP.vmx
[himalaya-local-SAS.VMStorage] VIMA/VIMA.vmx
.......
.......
		
# Linux example of running vmrun on VMware VIMA
[vi-admin@vima-primp-industries ~]$ vmrun -T esx -h https://himalaya.primp-industries.com/sdk -u root -p ********* list
Total running VMs: 14
[himalaya-local-SAS.VMStorage] Fullerene/Fullerene.vmx
[himalaya-local-SATA.Storage] Primp-DevAD/Primp-DevAD.vmx
[himalaya-local-SAS.VMStorage] Synapse/Synapse.vmx
[himalaya-local-SAS.VMStorage] STA202I/STA202I.vmx
[himalaya-local-SAS.VMStorage] Bitsy/Bitsy.vmx
[himalaya-local-SAS.VMStorage] William-XP/William-XP.vmx
[himalaya-local-SAS.VMStorage] VIMA/VIMA.vmx
.......
.......
		
List all registered VMs on specific ESX/ESXi host
[vmrun.exe|vmrun] -T esx -h https://ESX_IP_OR_HOSTNAME/sdk -u ESX_USER_NAME -p ESX_PASSSWORD listRegisteredVM 
[vi-admin@vima-primp-industries ~]$ vmrun -T esx -h https://olga.resnet.ucsb.edu/sdk -u root -p ********* listRegisteredVM     
Total registered VMs: 2
[olga-local-SAS.Storage] UCSB_TEST/UCSB_TEST.vmx
[dlgCore-FC-LUN200.Templates] UCSB-ENGINEERING/UCSB-ENGINEERING.vmx
		
VM power operations on specific ESX/ESXi host
[vmrun.exe|vmrun] -T esx -h https://ESX_IP_OR_HOSTNAME/sdk -u ESX_USER_NAME -p ESX_PASSSWORD [start|stop|reset|suspend|pause|unpause] "[VM_DATATORE] VM/VM.VMX"
	
Register a VM on specific ESX/ESXi host
[vmrun.exe|vmrun] -T esx -h https://ESX_IP_OR_HOSTNAME/sdk -u ESX_USER_NAME -p ESX_PASSSWORD register "[VM_DATATORE] VM/VM.VMX"
[vi-admin@vima-primp-industries ~]$ vmrun -T esx -h https://olga.resnet.ucsb.edu/sdk -u root -p *********' register "[dlgCore-FC-LUN200.Templates] UCSB-ENGINEERING/UCSB-ENGINEERING.vmx"
		
Unregister a VM on specific ESX/ESXi host
[vmrun.exe|vmrun] -T esx -h https://ESX_IP_OR_HOSTNAME/sdk -u ESX_USER_NAME -p ESX_PASSSWORD unregister "[VM_DATATORE] VM/VM.VMX"
	
Create new snapshot for a VM on specific ESX/ESXi host
[vmrun.exe|vmrun] -T esx -h https://ESX_IP_OR_HOSTNAME/sdk -u ESX_USER_NAME -p ESX_PASSSWORD snapshot "[VM_DATATORE] VM/VM.VMX" "SNAPSHOT_NAME"
	
Delete snapshot for a VM on specific ESX/ESXi host
[vmrun.exe|vmrun] -T esx -h https://ESX_IP_OR_HOSTNAME/sdk -u ESX_USER_NAME -p ESX_PASSSWORD deleteSnapshot "[VM_DATATORE] VM/VM.VMX" "SNAPSHOT_NAME"
	
Upload a file to a VM from your host on a specific ESX/ESXi host (VM must be online)
[vmrun.exe|vmrun] -T esx -h https://ESX_IP_OR_HOSTNAME/sdk -u ESX_USER_NAME -p ESX_PASSSWORD copyFileFromHostToGuest "[VM_DATATORE] VM/VM.VMX" "LOCAL_SOURE_FILE" "REMOET_FILE"
[vi-admin@vima-primp-industries ~]$ vmrun -T esx -h https://olga.resnet.ucsb.edu/sdk -u root -p ********* copyFileFromHostToGuest "[dlgCore-FC-LUN200.Templates] UCSB-ENGINEERING/UCSB-ENGINEERING.vmx" "/home/vi-admin/vix_sample.bat" "C:\Documents and Settings\Administrator\Desktop\vix_sample.bat
		
Download a file from a VM to your host on a specific ESX/ESXi host (VM must be online)
[vmrun.exe|vmrun] -T esx -h https://ESX_IP_OR_HOSTNAME/sdk -u ESX_USER_NAME -p ESX_PASSSWORD copyFileFromHostToGuest "[VM_DATATORE] VM/VM.VMX" "LOCAL_SOURE_FILE" "REMOET_FILE"
[vi-admin@vima-primp-industries ~]$ vmrun -T esx -h https://olga.resnet.ucsb.edu/sdk -u root -p ********* copyFileFromGuestToHost "[dlgCore-FC-LUN200.Templates] UCSB-ENGINEERING/UCSB-ENGINEERING.vmx" "C:\Documents and Settings\Administrator\Desktop\vix_sample.bat" "/home/vi-admin/vix_sample.bat" 
		
vmrun commands that may have a bug or may not work properly:
revertToSnapshot         Path to vmx file     		Set VM state to a snapshot
                         Snapshot name
clone                    Path to vmx file     		Create a copy of the VM
                         Path to destination vmx file
                         full|linked
                         [Snapshot name]
Automate vmrun using batch script (save as .bat file)
setlocal
@echo off
::set up custom user variables

:: ######## ESX Variables ##############::
set ESX_IP=172.30.0.61
set ESX_USER_NAME=root
set ESX_PASSSWORD=FILL_IN_PASSWORD
::#####################################::

::##### GUEST VM Variables ############::
set VM_USER_NAME=administrator
set VM_PASSWORD=FILL_IN_PASSWORD
::#####################################::

::set path to VIX vmrun binary
set Path=%PROGRAMFILES%\VMware\VMware VIX

::some test VM
::this can be automated by passing in a list of VMs and comparing with the registered list
set VM_NAME=WILLIAM-LC-22
set VM_PATH=[himalaya-local-SAS.VMStorage] %VM_NAME%/%VM_NAME%.vmx

::vmrun command
REM vmrun.exe -T esx -h https://%ESX_IP%/sdk -u %ESX_USER_NAME% -p %ESX_PASSSWORD% -gu "%VM_USER_NAME%" -gp "%VM_PASSWORD%" start "%VM_PATH"
vmrun.exe -T esx -h https://%ESX_IP%/sdk -u %ESX_USER_NAME% -p %ESX_PASSSWORD% list

endlocal
C:\Documents and Settings\Administrator\Desktop\VIX_samples>vix_sample.bat
	
Automate vmrun using shell script (save as .sh file)
#!/bin/bash

######## ESX Variables ##############::
ESX_IP=172.30.0.61
ESX_USER_NAME=root
ESX_PASSSWORD=FILL_IN_PASSWORD
#####################################::

##### GUEST VM Variables ############::
VM_USER_NAME=administrator
VM_PASSWORD=FILL_IN_PASSWORD
#####################################::

# some test VM
# this can be automated by passing in a list of VMs and comparing with the registered list
VM_NAME=WILLIAM-LC-22
VM_PATH="[himalaya-local-SAS.VMStorage] ${VM_NAME}/${VM_NAME}.vmx"

# vmrun command
# vmrun -T esx -h https://${ESX_IP}/sdk -u ${ESX_USER_NAME} -p ${ESX_PASSSWORD} -gu "${VM_USER_NAME}" -gp "${VM_PASSWORD}" start "${VM_PATH}"
vmrun -T esx -h https://${ESX_IP}/sdk -u ${ESX_USER_NAME} -p ${ESX_PASSSWORD} list
[vi-admin@vima-primp-industries ~]$ ./vix_sample.sh
	

HP Remote Graphics Software ESX/ESXi VDI Tricks

Multiple Displays:
This (option found on: sanbarrow.com however unsupported it may be by VMware and/or HP) is by far the most useful feature we've discovered while testing HP's RGS display protocol in our VDI environment. It works in versions pre-ESX3.5 however we don't remember how far back the compatibility stretches. From what we can recall, this does not work in ESX 3.0. This option has been tested with HP Remote Graphics Software Sender version 5.1.5 running on Windows XP SP2 and SP3 and is being used daily with dual 1280x1024 screens on an HP thinclient.

To enable multiple displays for virtual machines in ESX 3.5, insert the following into the .vmx file or use the "Configuration Parameters" in the VI client that corresponds to the virtual machine:

svga.numDisplays = "x"

where x is the number of displays including the primary display. In the case of this example, it should be set to 2.

The PC version of HP's Remote Graphics Software only supports 2 screens so please set it accordingly. Afterwards, connect to the virtual desktop using the RGS Receiver and enable the second screen as if on a physical workstation. This option will allow you to fully expand windows in their respective screens without using special display spanning software (Go RGS!!).

Issues:
- When connecting to the virtual desktop using the RGS Receiver, the video will be somewhat corrupted if any of the displays on the virtual desktop is set to 32bit. This can be fixed by setting the display depth to 16bit for both screens. The problem seems to be related to the VMware SVGA driver as the corruption can be seen to occur inside the VI client console.
- The second display can not sit directly above the first display. To fix this, set the second (secondary) display to be below the first (primary) display and align the entire virtual display to the top of your physical display layout.
- Some little icons don't fully display. It is pretty annoying when it happens but we've seen this seldomly occur when using the VI client (or the Device Manager as another example) inside the virtual desktop on the primary screen. Moving the VI client (or affected application) over to the secondary screen or clicking on the icons (if possible) will sometimes fix it...

Additional Settings:

svga.vramSize = "25165824"
svga.maxHeight = "1200"
svga.maxWidth = "1920"

These settings are documented in the HP RGS documentation and are needed to increase the virtual machine's display resolution capability (to 1920x1200) and video memory size (to 24MByte). Please be aware that this option imposes additional memory overhead for the virtual machine being modified. Please size the parameters accordingly to your VDI setup.

RGS on Windows 7 on vSphere
After the Windows 7 RC came out, we were naturally inclined to throw it into our ESX3.5 environment. The main aim was to test it using RDP 7 (the VI console is a tad bit unresponsive because the SVGA driver isn't compatible) but we realized that only Windows 7 has the RDP 7 client so in turn, you would need another Windows 7 box (physical) to connect to the Windows 7 VM with RDP 7 (inefficient and no fun to say the least). So instead of installing 7 on a physical box, we decided to go the unconventional (or more affectionately, ghetto) route: get RGS running on 7.

The first issue in our quest to get a "rich remote Windows 7 desktop user experience" is the SVGA II video driver. RGS relies on the underlying "virtual" video card to display information. Video performance without the SVGA driver, as it stands, is quite simply crap and would continue to be so through RGS. To get around this problem, this virtual machine was pushed over to vSphere (with motivation from Eric Sloof's ntpro.nl article) and it's virtual hardware/VMware tools upgraded.

- Make sure the SMBIOS.reflectHost = "true" parameter or licenses are installed where appropriate
- Connect to the console of the virtual machine
- Installing the RGS sender (we used v5.1.5) on 7 can be accomplished by setting the compatibility mode of the installer to Windows XP SP2 (or SP3). Don't enable single sign-on. Upon reboot, the service will not start because of missing dependencies.
- Go to the installation directory and set the rgsender.exe compatibility mode to Windows XP SP2 (for performance reasons, oddly, SP3 gives laggy remote desktop response).
- Run rgsender.exe
- The screen will then lock, so unlock it in the VI console (if you try to connect using the RGS Receiver at this point, you'll get a blank screen)
- Log in using the RGS Receiver
- Enjoy the somewhat rich remote Windows 7 desktop user experience without RDP 7 (somewhat because advance graphics features needing acceleration won't work due to SVGA II limitations)

Issues encountered so far:
While usable, this ghetto rig isn't practical and should be used for demo or testing purposes only.
- Collaboration sessions with another user will not work because the dialogue does not pop up
- UAC notifications pause the screen because RGS can not display it, you need to go to the console to click out of it. A quick fix is to disable the UAC notification all together
- If at any point 7 locks the screen while you are away from it, you won't be able to log in. Doing the console walk of shame is the only way to unlock it so far or one can turn off the "lock when away from computer" feature all together.
- The sound may be distorted, turn the volume down to fix this. The output audio is oddly using the microphone input...
- Disconnecting from the virtual desktop will leave it unlocked. While this is good because you can log back in (until 7 locks itself), please be advised that the virtual desktop is vulnerable to others that have VI client console access.
- Although vSphere was used for this, RGS may run on Windows 7 in ESX 3.5 but without the SVGA II driver (not tested).
- We pulled this RGS setup all the way up to 1920x1200 with good results. We haven't tried dual screens yet although it may take some effort to do so because the second display is not coming up in the virtual machine.

And for fun, this post was created using Windows 7 with RGS through a VPN connection over wireless. But of course an image does not do it justice.

HP RGS (v5.2.5) on Windows 7 on vSphere (Addendum)

Thanks to a tip from Greg Hughes, he has noted that the latest version of HP RGS can be installed onto Windows 7 without using the workarounds noted above. Due to the licensing changes, the parameter:

SMBIOS.reflectHost = "true"

is no longer needed in the .vmx file.

Some issues encountered during this run:
- Screen blanking does not work. RGS does not even give a warning that the screen is visible at the console.
- The sound may be distorted, turn the volume down to fix this.
- RGS icon does not show up on task bar.
- If the system is locked on the console side, the RGS session will lock of course. Entering the password on the RGS session will unlock the session however mouse control is cut from the RGS session. Enabling remote keyboard/mouse may solve this however the RGS icon is not available on the taskbar. There may be another way to enable it...

We have included a quick demo of RGS 5.2.5 running on Windows 7. The recording program that we used made the video a little sluggish (as can be seen from the not-so-smooth mouse movements which should otherwise be smooth when using RGS regardless of connection quality).

Somewhat rich remote Windows 7 desktop user experience? You be the judge:
http://engineering.ucsb.edu/~duonglt/vmware/RGSonSeven

Cloudafied Desktops: HP RGS on Amazon EC2

Provided is a quick recording of how RGS (v5.1.5) performs on a "cloud" hosted machine when playing Flash and Quicktime videos. The capture software that we used made the video a little sluggish (as can be seen from the not-so-smooth mouse movements which should otherwise be smooth when using RGS regardless of connection quality). User interface performance was crisp and interaction was very near to the all important “local feel” (which is uncharacteristic of RDP connections).

A Windows AMI configured as a "High-CPU Medium (c1.medium)" instance type was selected for this session. The HP RGS image quality was arbitrarily set to 50% to conserve bandwidth and processing load. As this is an initial proof of concept, we did not optimize the image quality parameter and as so it will be left as an additional exercise in the future. Due to time constraints, common office productivity software was not tested and demonstrated on the cloudafied desktop however we strongly believe that RGS would perform well in this area as most common office productivity software is static and thus not bound by the CPU and connection bandwidth requirements necessary for dynamic multimedia content.

We believe that performance can be improved because the EC2 hosted Windows machine is not running an optimized video driver, that is, it is using the standard Windows VGA adapter driver. This drawback limits the maximum desktop size to 1280x1024 (without explicit hacks to increase the resolution capability if at all possible). Additionally, an older version of RGS was used during testing on an operating system not intended for desktop use (although changing processor scheduling and memory usage parameters may improve apparent desktop performance); newer versions of RGS running on the intended platforms may offer improved performance. Despite these drawbacks, multimedia performance was still surprisingly satisfactory.

And now to the video:
http://engineering.ucsb.edu/~duonglt/vmware/RGSonEC2

vSphere ESX 4.0 tips/tricks

Map Service Concole/COS VMDK to ESX host (useful if you boot from SAN)
grep -i "hostname" /vmfs/volumes/<datastore>/esxconsole-<datastore-uuid>/logs/sysboot-vmkernel-late.log
[root@everest ~]# grep -i "hostname" /vmfs/volumes/everest-local-storage/esxconsole-49a095a4-204d-c7ba-9bb8-001f29c7b048/logs/sysboot-vmkernel-late.log
	
0:00:00:06.289 cpu1:4105)Config: 363: "HostName" = "everest.primp-industries.com", Old value: "localhost" (Status: 0x0)
	
Retrieve VmId from vmware-cmd similiar to that in vimsh/vmware-vim-cmd (only available on classic ESX, not sure why it's not in vCLI
vmware-cmd /vmfs/volumes/<datastore>/<path_to_vm>/vm.vmx getid
[root@everest ~]# vmware-cmd /vmfs/volumes/d32c5a97-e039bdbf/vCenter-ESX4.02172009/vCenter-ESX4.02172009.vmx getid
getid() = 32

[root@everest ~]# vmware-vim-cmd vmsvc/getallvms | grep "vCenter-ESX4.02172009" | awk '{print $1}'
32

	

vSphere ESX 4.0 - Crash VM Bug?

We recently discovered an anomaly while backing up one of our development VMs using ghettoVCB.sh. When attempting to back up this powered on VM, the backup was successful however oddly, we were left with a powered off VM immediately following the first VMDK clone operation. After some investigation, we found that the problematic VM contained virtual disks spread across two datastores with dissimilar blocksizes (1MB and 2MB).

The VM configuration alongside its main OS disk was stored on the datastore with a 1MB blocksize while it’s data disk (>256 GB) resided on the other datastore which was initialized with a 2MB blocksize. We came to the conclusion that this might have had something to do with the VM configuration residing on a datastore with a blocksize that was smaller than what is needed for the larger VMDK (which was on a datastore with an ample blocksize). Manually snapshotting this VM apparently fails however different behavior was experienced when the commands are executed from a script.

Believing that this was a corner case, we decided that it was best practice to keep all VMFS volume block sizes consistent. This was to be remediated at a later time.

Today we noticed a blog post http://www.yellow-bricks.com/2009/08/24/vsphere-vm-snapshots-and-block-size/ from Duncan Epping regarding the snapshot issue. This may not be a corner case as we thought so we wanted to share this finding with everyone.

If you have a similar configuration from above, it is guaranteed that the VM will crash if you run a script that tries to take a snapshot of the described VM and then subsequently exports the VMDK using vmkfstools.

Here is a video displaying the symptoms decribed from above:
http://engineering.ucsb.edu/~duonglt/vmware/crashVM

Output from script execution on VM: Quentin
[root@himalaya ~]# ./crashVM.sh Quentin /vmfs/volumes/dlgCore-NFS-bigboi.VM-Backups/Quentin-clone.vmdk
thinking, give me a few ...
The power state of VM: "Quentin" is On
Extracted VmId and locating VM configured datastore (which should live on a smaller VMFS block size)
Located VMDK: "/vmfs/volumes/himalaya-local-SAS.Savvio/Quentin/Quentin.vmdk"
Trying to create snapshot ... (this should fail)
Create Snapshot:
Trying to vmkfstools copy "/vmfs/volumes/himalaya-local-SAS.Savvio/Quentin/Quentin.vmdk" (this should REALLY fail! right?)
Destination disk format: VMFS zeroedthick
Cloning disk '/vmfs/volumes/himalaya-local-SAS.Savvio/Quentin/Quentin.vmdk'...
Clone: 9% done.

Download crashVM.sh script

Development Server For Sale!!

Our previous development server used to develop ghetto scripts is for sale! Check it out in our auctions:
http://engineering.ucsb.edu/~duonglt/forsale

All proceeds are reinvested 100% into R&D. If you are attending VMworld 2009, we can arrange to hand deliver any hardware that you purchase.


Go back to the top

Scripts for ESXi require SSH console access to be enabled for scripts to function properly.
Instructions on how to do this can be found at: http://www.vm-help.com/esx/esx3i/ESXi_enable_SSH.php

Additional Resources:
Wil van Antwerpen's VI Toolkit
Dave Mishchenko's vm-help


Contact:
william2003[at]gmail[dot]com - William Lam - Twitter
duonglt[at]engr[dot]ucsb[dot]edu - Tuan Duong - Twitter