Previous Topic: dpmvc setshares Command--Set VM SharesNext Topic: dpmvc templatetovm Command--Convert Template to VM


dpmvc snapshot Command--Manage Snapshots

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 
[-sc sc_url] 
-operation create 
-datacenter_name datacentername -vm_name vmname 
-vm_snapshot_name vmsnapshotname 
[-vm_snapshot_desc description] 
[-withmemory {yes|no}] 
[-quiesce {yes|no}][-poweron] 
[-vc_server vcservername] 
[-vc_user vcusername] 
[-vc_password vcpassword] 
[-auth_file authorizationfile] 
[-auth_comp componentID] [‑wait [timeout]] 
[-pre] 
[-post]  
[-ws_user wsuser] 
[-ws_password wspassword] 
[-prompt {yes|no}] 
[-encrypted_password {yes|no}]
[-locale iso639value]
dpmvc snapshot 
[-sc sc_url] 
-operation remove 
-datacenter_name datacentername -vm_name vmname 
[-vm_snapshot_name vmsnapshotname] 
[-vm_snapshot_id snapid] 
[-withchildren {yes|no}] 
[-vc_server vcservername] 
[-vc_user vcusername] 
[-vc_password vcpassword] 
[-auth_file authorizationfile] 
[-auth_comp componentID] [‑wait [timeout]] 
[-pre] 
[-post] 
[-ws_user wsuser] 
[-ws_password wspassword] 
[-prompt {yes|no}] 
[-encrypted_password {yes|no}]
[-locale iso639value]
dpmvc snapshot 
[-sc sc_url] 
-operation revert 
-datacenter_name datacentername -vm_name vmname 
-vm_snapshot_name vmsnapshotname 
[-vm_snapshot_id snapid] 
[-vc_server vcservername] 
[-vc_user vcusername] 
[-vc_password vcpassword] 
[-auth_file authorizationfile] 
[-auth_comp componentID] [‑wait [timeout]] 
[-pre] 
[-post] 
[-ws_user wsuser] 
[-ws_password wspassword] 
[-prompt {yes|no}] 
[-encrypted_password {yes|no}]
[-locale iso639value]
-sc sc_url

(Optional) Defines the URL for the service controller host.

Example: https://hostname:port/...

hostname

Defines the fully qualified host where the service controller is installed.

Example: localhost.ca.com

port

Defines the listening port for the service controller server.

Example: 80

-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.

-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.

-quiesce {yes|no}

(Optional) If set to yes and the virtual machine is powered on when the snapshot is taken, VMware Tools quiesce the file system in the virtual machine. This assures that a disk snapshot represents a consistent state of the guest file systems. If the virtual machine is powered off or VMware Tools are not available, the command ignores the quiesce flag.

-vm_snapshot_id snapid

(Optional) Defines the snapshot identifier.

-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.

-vc_server vcservername

Specifies the vCenter Server to access when you have multiple vCenter Servers. Optional for single vCenter Server environments.

-vc_user vcuser

(Optional) Specifies the vCenter Server user ID. It is optional depending on whether global credentials are enabled.

-vc_password vcpassword

(Optional) Specifies the password for the vCenter server user ID. When this option is omitted an encrypted password is retrieved for the user (-vc_user option) and component (-auth_comp option), if specified from either the default authorization file or a specific authorization file (-auth_file).

-auth_file authorizationfilename

(Optional) Specifies the full path name of the authorization file to use to retrieve the encrypted password. This file contains the CA Virtual Assurance administrator credentials that were generated using the dpmutil set auth command. When this option is not specified, the default authorization file is used.

-auth_comp componentID

(Optional) Specifies a component ID that you can use to group hosts and users.

-wait timeout

(Optional) Indicates whether to display the status of the job and not return until the operation completes, fails, or the timeout period is met (if you specify a timeout value). If you do not specify this option, the CLI returns without waiting for completion. If there is no response, the optional timeout value defines the timeout period in minutes. If you enter the wait option with no timeout value, the CLI uses the default wait time from the caimgconf.cfg file or defaults to 120 minutes. In addition to any positive integer, the following timeout values are also possible:

""

No timeout value.

0

Wait indefinitely.

-pre

(Optional) Specifies whether to generate an event before the operation is performed.

-post

(Optional) Specifies whether to generate an event after the operation is performed.

-ws_user wsuser

(Optional) Specifies the web service user name to connect to the VC Platform Management Module (PMM).

-ws_password wspassword

(Optional) Specifies the password for the web service user to connect to the VC Performance Management Module (PMM).

-prompt {yes|no}

(Optional) Specifies whether you are prompted for the web service user ID and password.

Default: Yes

-encrypted_password {yes|no}

(Optional) Specifies whether you want to encrypt the VC user password.

Default: Yes

-locale iso639value

(Optional) Specifies an IS0 639_3166 combination to override the default English output, for example, fr_FR for French. To use the locale of the command prompt, specify "native".

Example: Create a VM Snapshot using Global Credentials 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 using Global Credentials 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 using Global Credentials 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_snapshot_desc "First snapshot" 
-vm_name MyVM01 -datacenter_name VAS/MyCity

Example: Create a Snapshot for a VM using Global Credentials in a Multiple vCenter Server Environment

This example creates a snapshot named PayrollSnapshot on the VM system named PayrollVM.

dpmvc snapshot -create -vm_snapshot_name PayrollSnapshot -vm_snapshot_desc "First snapshot" 
-vm_name MyVM01 -datacenter_name VAS/MyCity -vc_server vc_server_1

Example: Remove a VM Snapshot using Specified Authorization File and Component ID

This example set the CPU shares for the virtual machine "MyVM01" to 1200 in the data center "DCA/MyCity."

dpmvc snapshot -remove -vm_snapshot_name "Snapshot 1" -vm_name MyVM01 
-datacenter_name VAS/MyCity -vc_server vc_server_1 -vc_user VCAdmin1 
-auth_file c:\localauth.dat -auth_comp Imaging