Free tools for VMware ESXi

There are a couple of tools I use with my test ESXi hosts, which are running with free licence and are not managed by vCenter.
    1.WebUI
This nice package comes from VMware labs and allows you to acces some features of the host from web interface, which is great as there is no desktop vsphere client for Linux.
The package can be downloaded from here. The installation is pretty straightforward. After the installation you can access this UI from https://<esxhost>/ui/. Nice thing – it’s a little big faster the vsphere Web client and doesn’t use plugins.
    2.ghettoVCB
I use this tool(github) to create occasional backups and move VMs from one host to another, which is much faster than using secure copy as it uses vStorage API (VCB). All you need is to:
  • put it on your ESXi host with scp
  • unzip it (unzip tool is preinstalled on the host) to a datastore (if you unzip it to / it will be erased after reboot).
unzip ghettoVCB-master.zip -d /vmfs/volumes/datastore1
  • edit/vmfs/volumes/datastore1/ghettoVCB-master/ghettoVCB.conf
VM_BACKUP_VOLUME- the place the to put backups, usually it’s a folder on a remote datastore, mounted to the host
DISK_BACKUP_FORMAT – disk format, during the backup disk format can be changed from thin to thick and from eager zeroed to lazy zeroed.
VM_BACKUP_ROTATION_COUNT – number of backups
POWER_VM_DOWN_BEFORE_BACKUP- combined with vmware tools on a guest systems this option allows graceful shutdowm of a VM.
ENABLE_HARD_POWER_OFF – forces shutdown.
  • create vms_to_backup file and list names of necessary VMs, each on a separate line
  • run backup with
# ./ghettoVCB.sh -f ./vms_to_backup  -g ./ghettoVCB.conf
Restoration is also very simple
  • create a file vms_to_restore like this:
"/vmfs/volumes/remote_datastore/backups/folder_with_VM1/;/vmfs/volumes/datastore1;4;VM1-test"
"/vmfs/volumes/remote_datastore/backups/folder_with_VM2/;/vmfs/volumes/datastore1;4;VM2-test"
where each line specifies path to backup (the folder with vmdk file), destination on a host where the machine would run, disk format type (4 for eagerzeroedthick) and a new name.
  • run restore scipt
# ./ghettoVCB-restore.sh -c vms_to_restore
The script will clone and register the VM on the destination host. You can power it up from the client later, and client will ask you whether you moved it (uuid and MAC will stay the same) or copied (uuids and MAC would be regenerated and ruin MAC-bonded licences on your VM).
Full documentation on ghettoVCB can be found here(backup) and here(restore).

Post a Comment