3.9.3 Create Snapshot of Virtual Machine
Function
The VMware vSphere environment allows a snapshot to be used to update the status of a virtual server.
To change the status or data of a virtual server in the VMware vSphere environment, create a pre-change snapshot of the environment before doing so.
To use the change results, commit the changes and then delete the snapshot. If the change results are not used, discard the changes, and then delete the snapshot.
This service template assumes the following servers as prerequisites:
- vCenter server
Server where VMware vCenter Server is installed
- vCenter control server
Server where VMware vSphere PowerCLI is installed
- Virtual server
Virtual server managed by vCenter server or VMware vSphere ESXi
An outline of the processing is as follows:
(1) A snapshot of the virtual server is created.
(2) After creating the snapshot, the wait for the response part of the service is executed to wait for the user to complete changes to the status or data of the virtual server.
The GUI waiting for a response allows the user to select "Commit" (to use the change result) or "Roll back" (to not use the change result).
(3) The snapshot of the virtual server is deleted.
If the user selects "Commit" from the GUI waiting for a response, the changes made after creating the snapshot are committed, and the snapshot is deleted.
If the user selects "Roll back" from the GUI waiting for a response, the changes made after creating the snapshot are discarded, and the snapshot is deleted.
The maximum length of the virtual server name property (vmware.vmName) is 60 characters.
Prerequisites
For the latest support information about [Prerequisite products in the system executing the service template]/[Prerequisite product OS running in the system executing the service template], see the release notes.
In addition, the following OS and products use abbreviations. For the abbreviations of OS and products, see the "Preface".
[Prerequisite products in the system executing the service template]
(1) Prerequisite product for vCenter server
- VMware vCenter Server
(2) VMware vSphere ESXi managing the virtual server
(3) Prerequisite product for the vCenter control server
- VMware PowerCLI
[Prerequisite product OS running in the system executing the service template]
(1) Prerequisite OS for the virtual server
The following OSs are supported, based on the required products for the vCenter server and the required products for the VMware vSphere ESXi/vCenter control server that manages the virtual server.
- Windows Server
- Red Hat Enterprise Linux Server
(2) Prerequisite OS for the vCenter control server
- Windows Server
[Usage conditions for the required products for the service template execution system]
(1) The VMware vSphere ESXi is managed by VMware vCenter Server.
(2) There is no duplicate virtual server name under the same vCenter.
(3) There is no duplicate snapshot name in the same virtual server.
(4) VMware Tools is installed in the target virtual server.
(5) The pre-change power status of the target virtual server is OFF.
Cautions
(1) Do not execute this service for multiple instances of the same virtual server at the same time.
(2) Do not target any virtual servers where a raw, RDM physical mode or independent disk is set.
(3) HTML tags can be specified in the additional information property (UserResponseplugin.dialogText) in the window for entering a response. The property accepts the same tags and attributes as those available in the User-Response Wait Plugin. For more details, see the appropriate topic related to "User-Response Wait Plugin" in this product manuals.
(4) If an error occurs during the execution of this service, confirm the snapshot name from the task log and check whether the snapshot is present. If the snapshot remains, commit or discard the snapshot. Do not leave a snapshot created by this service for an extended period time. Before re-executing the server, apply or discard the snapshot and delete it. Not doing so can cause data storage capacity to be unnecessarily used.
Execution privilege
(1) The user connecting to VMware vCenter Server must have the following permissions:
System administrator role
Version
04.00.00
Tags
Snapshot VM,VMware vSphere
Property list
The following shows the list of the property groups set in the property:
Property group |
Description |
Initial display |
---|---|---|
Virtual system environment information |
Specify the VMware vCenter Server information. |
Y |
Virtual server information |
Specify the information about the virtual service for which a snapshot is to be created. |
Y |
Option that allows waiting for a user response |
This is an option that allows you to wait for a user response in order to control whether to use a snapshot as a user response. Change the option as appropriate. |
N |
The following shows the list of the properties to be displayed in the "Service Definition" window:
- (Legend)
-
R: The property must be specified.
O: The property can be omitted. However, the property might be mandatory depending on what is specified for other properties. See the Description of each property.
Property key |
Property name |
Description |
I/O type |
Shared |
Required |
Property group |
---|---|---|---|---|---|---|
vmware.targetHost |
Host name of VMware vCenter control server |
Specify the host name or IP address of the server (a server with vSphere PowerCLI installed) that will be used to control VMware vCenter. You cannot specify an IPv6 address. |
Input |
Disabled |
R |
Virtual system environment information |
vmware.vCenterServerName |
VMware vCenter server name |
Specify the host name or IP address of the VMware vCenter server. You cannot specify an IPv6 address. |
Input |
Disabled |
R |
Virtual system environment information |
vmware.userName |
User name for VMware vCenter Server connection |
Specify the user name to use when connecting to the VMware vCenter server. |
Input |
Disabled |
R |
Virtual system environment information |
vmware.password |
Password for VMware vCenter Server connection |
Specify the password to use when connecting to the VMware vCenter server. |
Input |
Disabled |
R |
Virtual system environment information |
vmware.portNumber |
Port number for VMware vCenter Server connection |
Specify the port number to use when connecting to the VMware vCenter server (specifically, the port number of the VMware vCenter server's Web service). If you omit this property, the default value of the VMware vCenter server applies. |
Input |
Disabled |
O |
Virtual system environment information |
vmware.protocol |
Protocol for VMware vCenter Server connection |
Specify the protocol to use when connecting to the VMware vCenter server. |
Input |
Disabled |
R |
Virtual system environment information |
vmware.snapshotName |
Snapshot name |
Specify the name of the snapshot. |
Input |
Disabled |
R |
Virtual server information |
UserResponsePlugin.toAddress |
TO addresses |
Specify the email addresses to enter in the TO field of notification emails sent when the service is waiting for a user response. Separate multiple addresses with commas. Example: mailA,mailB |
Input |
Disabled |
O |
Option that allows waiting for a user response |
UserResponsePlugin.ccAddress |
CC addresses |
Specify the email addresses to enter in the CC field of notification emails sent when the service is waiting for a user response. Separate multiple addresses with commas. Example: mailA,mailB |
Input |
Disabled |
O |
Option that allows waiting for a user response |
UserResponsePlugin.bccAddress |
BCC addresses |
Specify the email addresses to enter in the BCC field of notification emails sent when the service is waiting for a user response. Separate multiple addresses with commas. Example: mailA,mailB |
Input |
Disabled |
O |
Option that allows waiting for a user response |
UserResponsePlugin.mailSubject |
Subject line |
Specify the subject line of notification emails sent when the service is waiting for a user response. |
Input |
Disabled |
O |
Option that allows waiting for a user response |
UserResponsePlugin.mailBody |
Email text |
Specify the body text of notification emails sent when the service is waiting for a user response. |
Input |
Disabled |
O |
Option that allows waiting for a user response |
UserResponsePlugin.encodeType |
Encoding |
Specify the encoding of notification emails sent when the service is waiting for a user response. The encodings you can specify are us-ascii, iso-2022-jp, shift_jis, euc-jp, and utf-8. If you omit this property, utf-8 is set. |
Input |
Disabled |
O |
Option that allows waiting for a user response |
UserResponsePlugin.dialogText |
Additional dialog box text |
Enter additional text to appear in the response input dialog box, in text or HTML format. Supported HTML tags are anchor tags, bold tags, break tags, font tags, italics tags, and underline tags. |
Input |
Disabled |
O |
Option that allows waiting for a user response |
UserResponsePlugin.responseTimeOut |
Response timeout time (minutes) |
Specify how long (in minutes) the service waits for a user response before timing out. In the event of a response timeout, the service will terminate abnormally. |
Input |
Disabled |
R |
Option that allows waiting for a user response |
The following shows the list of the properties to be displayed on the "Service Definition" window and the "Submit Service" window:
Property key |
Property name |
Description |
I/O type |
Shared |
Required |
Property group |
---|---|---|---|---|---|---|
vmware.vmName |
Virtual server name |
Specify the name of the virtual server. This name is used to represent the virtual server in VMware vCenter server. It is not used as a host name by the OS. |
Input |
Disabled |
R |
Virtual server information |
The following shows the restrictions on inputs to the properties displayed in the "Service Definition" window:
Property key |
Characters that can be input |
---|---|
vmware.targetHost |
A maximum of 256 characters can be entered. Characters that can be used include alphanumeric characters, as well as . and -. |
vmware.vCenterServerName |
A maximum of 256 characters can be entered. Characters that can be used include alphanumeric characters, as well as . and -. |
vmware.userName |
A maximum of 512 characters can be entered. Characters that can be used include alphanumeric characters and symbols. It cannot include <, >, |, ;, &, ', ", *, ?, [, ], `, /, :, =, , , +, %. |
vmware.password |
A maximum of 127 characters can be entered. Characters that can be used include alphanumeric characters and symbols. It cannot include <, >, |, ;, &, ', ", *, ?, [, ], `, %. |
vmware.portNumber |
Integer between 1 and 65535 can be entered. |
vmware.protocol |
Select one of the following values: http,https |
vmware.snapshotName |
This is a character string of up to 80 alphanumeric characters. |
UserResponsePlugin.toAddress |
A maximum of 1024 characters can be entered. Characters that can be used include alphanumeric characters and symbols. |
UserResponsePlugin.ccAddress |
A maximum of 1024 characters can be entered. Characters that can be used include alphanumeric characters and symbols. |
UserResponsePlugin.bccAddress |
A maximum of 1024 characters can be entered. Characters that can be used include alphanumeric characters and symbols. |
UserResponsePlugin.mailSubject |
A character string of no more than 256 characters can be entered. |
UserResponsePlugin.mailBody |
A character string of no more than 1024 characters can be entered. |
UserResponsePlugin.encodeType |
Select one of the following values: us-ascii,iso-2022-jp,shift_jis,euc-jp,utf-8 |
UserResponsePlugin.dialogText |
A character string of no more than 512 characters can be entered. |
UserResponsePlugin.responseTimeOut |
Integer between 1 and 9999 can be entered. |
The following shows the restrictions on inputs to the property displayed on the "Service Definition" window and the "Submit Service" window:
Property key |
Characters that can be input |
---|---|
vmware.vmName |
A character string of no more than 60 characters can be entered. It cannot include <, >, |, ;, &, ', ", *, ?, [, ], `, , and %. |
Flow specification details
The following table shows the detailed specification of the flow:
Hierarchy |
Display name |
Plug-in |
||
---|---|---|---|---|
Plug-in name |
Description |
Error recovery method |
||
1 |
vsphereCreateSnapshot |
Creating a virtual server snapshot |
Creates a snapshot of a specified virtual server in the VMware vSphere environment |
Remove the cause of the error, and then execute the service again. Before taking action against the cause of the error, confirm the precautions for this service. |
2 |
vsphereCheckChangeResult |
Flow Plug-in |
Commits or discards the change made to the status or data of the virtual server. |
-- |
2-1 |
User-Response Wait Plug-in |
Checks whether to apply the changes. |
After removing the cause of the error, run the service again. When taking an action for the cause of the error, also check the notes of this service. |
|
2-2 |
Judge ReturnCode Plug-in |
Determines whether the timeout has occurred in the component waiting for a user response. |
After removing the cause of the error, run the service again. When taking an action for the cause of the error, also check the notes of this service. |
|
2-3 |
Abnormal-End Plug-in |
Makes the jobnet an error. |
After removing the cause of the error, run the service again. When taking an action for the cause of the error, also check the notes of this service. |
|
2-4 |
Judge ReturnCode Plug-in |
Determines if the return value of the component waiting for a user response is 1. |
After removing the cause of the error, run the service again. When taking an action for the cause of the error, also check the notes of this service. |
|
2-5 |
Moving a virtual server snapshot |
In the VMware vSphere environment, moves the snapshot used for the virtual server to the specified snapshot on the virtual server. |
After removing the cause of the error, run the service again. When taking an action for the cause of the error, also check the notes of this service. |
|
3 |
vsphereRemoveSnapshot |
Deletion of a virtual server snapshot |
Deletes a snapshot of a specified virtual server in the VMware vSphere environment. If the snapshot to be deleted is in use, the change to the snapshot is committed. |
Remove the cause of the error, and then execute the service again. Before taking action against the cause of the error, confirm the precautions for this service. |