@Sample(name="vm-snapshot",
description="This sample demonstrates VM snapshot operations")
public class VMSnapshot
extends ConnectedVimServiceBase
VMSnapshot This sample demonstrates VM snapshot operations Parameters: url [required] : url of the web service. username [required] : username for the authentication password [required] : password for the authentication vmname [required] : Name of the virtual machine operation [required] : operation type - [list|create|remove|revert] snapshotname [optional] : Name of the snapshot description [optional] : description of the sanpshot removechild [optional] : remove snapshot children - [1 | 0] Command Line: List VM snapshot names run.bat com.vmware.vm.VMSnapshot --url [webserviceurl] --username [username] --password [password] --vmname [vmname] --operation list Create VM snapshot run.bat com.vmware.vm.VMSnapshot --url [webserviceurl] --username [username] --password [password] --vmname [vmname] --operation create --description [Description of the snapshot] Revert VM snapshot run.bat com.vmware.vm.VMSnapshot --url [webserviceurl] --username [username] --password [password] --vmname [vmname] --operation revert --description [Snapshot Description] Remove VM snapshot run.bat com.vmware.vm.VMSnapshot --url [webserviceurl] --username [username] --password [password] --vmname [vmname] --operation remove --removechild 0
ConnectedVimServiceBase.ConnectionExceptionPROP_ME_NAME, SVC_INST_NAME| Constructor and Description |
|---|
VMSnapshot() |
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
void |
setDescription(java.lang.String description) |
void |
setOperation(java.lang.String operation) |
void |
setRemovechild(java.lang.String removechild) |
void |
setSnapshotname(java.lang.String snapshotname) |
void |
setVirtualMachineName(java.lang.String virtualMachineName) |
basicConnectionFromConnection, connect, disconnect, getServiceInstanceReference, setConnection, setHostConnection@Option(name="vmname",
description="Name of the virtual machine")
public void setVirtualMachineName(java.lang.String virtualMachineName)
@Option(name="operation",
description="operation type - [list|create|remove|revert]")
public void setOperation(java.lang.String operation)
@Option(name="snapshotname",
required=false,
description="Name of the snapshot")
public void setSnapshotname(java.lang.String snapshotname)
@Option(name="description",
required=false,
description="description of the sanpshot")
public void setDescription(java.lang.String description)
@Option(name="removechild",
required=false,
description="remove snapshot children - [1 | 0]")
public void setRemovechild(java.lang.String removechild)
@Action
public void run()
throws com.vmware.vim25.InvalidPropertyFaultMsg,
com.vmware.vim25.TaskInProgressFaultMsg,
com.vmware.vim25.SnapshotFaultFaultMsg,
com.vmware.vim25.VmConfigFaultFaultMsg,
com.vmware.vim25.FileFaultFaultMsg,
com.vmware.vim25.InvalidStateFaultMsg,
com.vmware.vim25.InvalidCollectorVersionFaultMsg,
com.vmware.vim25.InvalidNameFaultMsg,
com.vmware.vim25.RuntimeFaultFaultMsg,
com.vmware.vim25.InsufficientResourcesFaultFaultMsg
com.vmware.vim25.InvalidPropertyFaultMsgcom.vmware.vim25.TaskInProgressFaultMsgcom.vmware.vim25.SnapshotFaultFaultMsgcom.vmware.vim25.VmConfigFaultFaultMsgcom.vmware.vim25.FileFaultFaultMsgcom.vmware.vim25.InvalidStateFaultMsgcom.vmware.vim25.InvalidCollectorVersionFaultMsgcom.vmware.vim25.InvalidNameFaultMsgcom.vmware.vim25.RuntimeFaultFaultMsgcom.vmware.vim25.InsufficientResourcesFaultFaultMsg