How can I make and delete a snapshot of the command line in ESXi 4?

How can I make and delete a snapshot of the command line in ESXi 4?  ghettoVCB4i does, but I need unusual behaviour for two virtual machines.  I need to be able to save only one of the two virtual drives, not both.  So I can't use this script here.  I need to write a script that will:

1 copy off the .vmx

2 make a snapshot of a virtual computer running

3 use the vmkfstools command to clone the vmdk in the backup location

4 remove the snapshot.

The snapshot is the part that I do not know how.  I do not see a flash drive in vmkfstools and I do not understand the snapshot code in ghettoVCB4i.

Thank you!

vmkfstools is a tool for working with VMDK, has nothing to do with stereotypes. In the Busybox unsupported console, the only tool that you can use for some of the management of the virtual computer is vim-cmd , which is about a wrapper for VMware vimsh, take a look at our site for more information: http://engr.ucsb.edu/~duonglt/vmware/#vmware_vimsh

Basically, you're going to do something like the following:

vim-cmd "vmsvc/snapshot.create XXXX FIRST_SNAPSHOT MY_FIRST_SNAPSHOT_1"

where XXXX is VmId to the virtual machine that is retrieved from vmsvc/getallvms, then you are going to deliver the snapshot.remove

Here are some other useful commands dealing with snapshots:

Vim - cmd vmsvc/snapshot.removeall \[VmId]

[[[vim - cmd vmsvc/snapshot.remove \[VmId\] \[removeChildren\] \[snapshotLevel\] \[snapshotIndex\]

Vim - cmd vmsvc/snapshot.get \[VmId\]

ghettoVCB4i uses vimsh to do these things as well.

=========================================================================

William Lam

VMware vExpert 2009

Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

repository scripts vGhetto

VMware Code Central - Scripts/code samples for developers and administrators

http://Twitter.com/lamw

If you find this information useful, please give points to "correct" or "useful".

Tags: VMware

Similar Questions

Maybe you are looking for

  • Customization of the header State ATML

    I need to add a few lines to the report header table USE, as is explained in the following article to the file 'horizontal.xsl': http://zone.ni.com/reference/en-XX/help/370052H-01/tssuppref/infotopics/custom_uutreport_header/ This works very well for

  • Vista home prem 32 has 4 GB Mem.,

    My Vista home prem 32 a 4 GB Mem, but windows uses only 1.27 GB forcing excessive paging & slowdown system way down... How can I fix it?

  • is it possible to save foglight in vmware vcenter? -foglight company

    Is it possible to save foglight in vcenter?  It's pretty simple in standard foglight.  Simply check a box.  I can't find any similar arrangement in the foglight company.  Links to the User Guide errror all out as well.

  • Sale blackBerry Z10 Z10 shipping information

    Does anyone know when will start Digital River Z10 ordered shipping on sale Black Friday? I ordered one in Nov 30 and received an email confirmation (without tracking information). I also paid for the shipping of 2 days and my account was deducted. H

  • trayapp error

    I am getting a trayapp error message, someone can tell me why or how can I fix?