Previous Topic: dpmvc-setshares Command--Set VM Shares (Funclet)Next Topic: dpmvc-templatetovm Command--Convert Template to VM (Funclet)


dpmvc-snapshot Command--Manage Snapshots (Funclet)

The dpmvc-snapshot command lets you manage snapshots for a VM. You can create snapshots, delete one or all snapshots, or revert to a snapshot using this command.

This command has the following format:

dpmvc-snapshot 
-create 
{-datacenter_name datacentername | -vc vcenterservername}
-vm_name vmname 
-vm_snapshot_name vmsnapshotname 
[-vm_snapshot_desc description] 
[-withmemory {true|false}]
[-poweron]
dpmvc-snapshot 
-remove 
{-datacenter_name datacentername | -vc vcenterservername} 
-vm_name vmname 
[-vm_snapshot_name vmsnapshotname [-withchildren]] 
dpmvc-snapshot 
-revert 
{-datacenter_name datacentername | -vc vcenterservername} 
-vm_name vmname 
-vm_snapshot_name vmsnapshotname
-operation {create|remove|revert}

Specifies to create, remove, or revert a VM snapshot.

-datacenter_name datacentername

Specifies the data center where the VM is located.

-vc vcenterservername

Specifies the vCenter Server where the VM is located.

-vm_name vmname

Specifies the VM.

-vm_snapshot_name vmsnapshotname

Defines a name for the VM snapshot.

-vm_snapshot_desc description

(Optional) Defines a description for the VM snapshot.

-withmemory {true | false}

(Optional) Specifies that the snapshot includes memory. This parameter is invalid for -remove or -revert.

-withchildren

(Optional) Specifies that you want to remove all children of the snapshot. This parameter is invalid for -create or -revert.

-poweron

(Optional) Specifies that you want to power on the VM. This parameter is invalid for -remove or -revert.

Example: Create a VM Snapshot in a Single vCenter Server Environment

This example creates a snapshot named "Hello world" with a description of "This is my first snapshot" for the VM system named MyVM01.

dpmvc-snapshot -create -vm_snapshot_name "Hello world" -vm_snapshot_desc "First snapshot" 
-vm_name MyVM01 -datacenter_name VAS/MyCity

Example: Revert to a VM Snapshot in a Single vCenter Server Environment

This example reverts MyVM01 to the snapshot named "Hello world".

dpmvc-snapshot -revert -vm_snapshot_name "Hello world" -vm_name MyVM01 -datacenter_name VAS/MyCity

Example: Remove a VM Snapshot in a Single vCenter Server Environment

This example deletes the snapshot named "Hello world" from a VM system named MyVM01.

dpmvc-snapshot -remove -vm_snapshot_name "Hello world" -vm_name MyVM01 
-datacenter_name VAS/MyCity