A. Mikkelsen

VMware ESX scripts, commands, tools and other nice to know things that will make your virtualization days easier!!!!

How cool is this, just wat I been looking fore.


I was looking for articles about time keeping in VMware ESX and stumbled over this one.
It was writen i 2005 but after reading it it still much apply today.


The authors behind the book “VMware ESX Server 2.5 Advanced Technical Guide” has made it free for download, because they are working on a new release for ESX 3.x.

You can download it for free here.

Edit and add the following to the VMX file :

scsi1.present = “TRUE”
scsi1.virtualDev = “lsilogic”
scsi1.sharedBus = “virtual”
disk.locking = “false”
scsi1:0.present = “TRUE”
scsi1:0.fileName = “Shared.vmdk”

Notice that the SCSI target is 1:0 and not 0:1

After this you should be able share the disk between 2 VM’s.

Using vimsh

No comments

List information about a VM
vimsh -n -e “vmsvc/getallvms”

See a summary of the current host configuration
vimsh -n -e “hostsvc/hostsummary”

Enter maintence mode
vimsh -n -e /hostsvc/maintenance_mode_enter

Exit maintence mode
vimsh -n -e /hostsvc/maintenance_mode_exit

Found this article on how to dispay usefull information in the logon banner.


I love it. It’s always nice to be presented with information about your system

A. Mikkelsen

Here is at BASH script to power off all active VM’s on a host.


for vm in `vmware-cmd -l`
        name=`vmware-cmd “$vm” getconfig displayname -q`
        state=`vmware-cmd  “$vm” getstate -q`
        if [ “$state” == “on” ]
                echo “Trying to power off $name….”
                output=`vmware-cmd “$vm” stop trysoft`
            if [ $? -eq 0 ]; then
                echo “$name was powered off successfully.”

The script was posted by Alex at the VMTN forum a while back, but is now updated so i reports if the VM is powered off succesfully.

Came accross this article on how to HOT clone a VM.


Someone informed me on this very usefull add-on for Virtual Center 2.x.

VCplus           – http://www.run-virtual.com/?page_id=184

Haven’t tried it myself yet, but i will during next week.
I think that this add-on is a step in the right direction. Mayby VMware should implement this add-on in VC.

Nice job Richard …. Keep it up….

A. Mikkelsen