Depends on what language you want to use. You could do it from the Service Console using bash or perl, you can do it remotely from the remote CLI or a windows machine using the VI Toolkit for windows.
VI Toolkit for Windows powershell script to snapshot VM:
connect-viserver -server <server> -user <user> -password <pwd> New-Snapshot -Name <snapshot_name> -VM <vm_name>
connect-viserver -server <server> -user <user> -password <pwd> remove-Snapshot -snapshot <snapshot_name>
Perl Script:
Here is a thread where someone wrote a perl script to do backups
http://communities
Service Console using vimsh
create
vmware-cmd <vmx> createsnapshot <snapshotName>
revert
vmware-cmd <vmx> revertsnapshot
Sid Smith
VCP, VTSP, CCNA, CCA(Xen Server), MCTS Hyper-V & SCVMM08
http://www.dailyhypervisor.com
- Don't forget to award points for correct and helpful answers.
