Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


3.6.1 Delete a virtual server

Function

This service template deletes a virtual server in the Hyper-V environment.

The assumptions about the server in this service template are shown below.

- Hyper-V server

This is the server where Hyper-V is installed.

- Virtual server

This is a virtual server managed by Hyper-V.

An overview of the processing is as follows.

(1) The state of the virtual server is obtained.

(2) A check is performed that the virtual server is in the stopping complete state.

If the virtual server is in the startup complete or stopping complete state, the process is continued, but in other states (startup in progress, stopping in progress, paused, or acquiring snapshot), the task is abnormally terminated without performing any operations on the virtual server.

If the virtual server state is not startup complete, the User-Response Wait Plugin is executed to check whether shutdown has been performed.

If "Shutdown" was selected in the user response wait GUI, the virtual server is shut down.

If "Cancel" was selected, or a timeout occurred in the response wait, the task is abnormally terminated without performing any operation on the virtual server.

When the virtual server OS is shut down, a wait is performed for the number of seconds specified in the hyperv.checkVmStateDisabledInterval property, and the operation for checking the virtual server state is repeated for the count specified in the hyperv.checkVmStateDisabledCount property. Adjust the values of each property based on your usage environment.

(3) The virtual server is deleted.

The virtual server is deleted from the Hyper-V server. When the virtual server is deleted, the snapshot is also deleted.

If "yes" was selected in the hyperv.vHardDiskDeletePermanently property, all virtual disk files (adjustable size/fixed size/differential) assigned to the selected virtual server will be deleted. Disks and files assigned to the pass-through (physical) disks, floppy disks, and CD/DVDs and other sources are not deleted. If a virtual disk (differential) is assigned, the virtual disk used as the parent (base) of the virtual disk (differential) is not deleted.

If deleting of the virtual disk files on the virtual server failed, the file deletion process is aborted, and the task is abnormally terminated.

(4) A list of the virtual disk files of the virtual server is output.

If the hyperv.vhdListOutputFileNameRemote property and hyperv.vhdListOutputFileNameLocal property were specified, a list of paths of the virtual disk files assigned to the virtual server that will be deleted from the Hyper-V server is output in CSV format, the file is transferred to a local disk, and the remote file is deleted. If a virtual disk (differential) is assigned, the virtual disk used as the parent of the virtual disk (differential) is not included.

If the hyperv.vhdListOutputFileNameRemote property only is specified, a list of paths of the virtual disk files is output in CSV format, but the file is not transferred to a local disk.

The items in the output CSV file are shown below.

The items are separated by commas in the output file.

(a) Existence of virtual disk files (Header name: Existence)

This outputs whether the assigned virtual disk files exist when executing deletion of a virtual server. The values of the items are shown below.

Found: Existence of file was confirmed.

NotFound: A file was set, but it could not be found.

(b) File deletion result (Header name: DeleteResult)

If "yes" was selected in the hyperv.vHardDiskDeletePermanently property, the deletion execution result for the virtual disk files is output. If "no" was selected, "Skipped" is output. The values of the items are shown below.

Completed: File deletion was successful.

Failed: File deletion failed.

Skipped: File deletion was not performed.

(c) File path (Header name: FilePath)

Regardless of the content of (a) and (b), the path is output for the virtual disk files that were set in the Hyper-V server.

Prerequisites

For the latest support information about [Required product in the System]/[Prerequisite products in the system executing the service template]/[Prerequisite product OS running in the system executing the service template], see the release notes.

[Required product in the System]

Job Management Partner 1/Automatic Operation 12-00 or later

[Prerequisite products in the system executing the service template]

(1)Prerequisite product of Hyper-V Server

- Windows Server 2008 R2 Hyper-V

[Prerequisite product OS running in the system executing the service template]

(1) Prerequisite OS of Hyper-V Server

- Windows Server 2008 R2 Standard/Enterprise/Datacenter

This does not apply to Server Core installation environments.

(2) Prerequisite OS of the virtual server

- Windows Server 2008 R2 Standard/Enterprise/Datacenter

This does not apply to Server Core installation environments.

[Usage conditions of prerequisite products in the system executing the service template]

(1) The virtual server name must be unique within the Hyper-V server.

(2) The following Hyper-V Integration Service must be enabled in the target virtual server.

- Operating system shutdown

(3) The virtual server must be in a completely stopped state.

Cautions

(1) Do not execute multiple instances of this service simultaneously for the same virtual server.

(2) If an operation (such as a snapshot operation) was performed where the path of the virtual disk file cannot be referenced from the virtual server setting information, the virtual disk files are not deleted. In this case, delete them manually.

(3) If an HTML tag is specified for the UserResponseplugin.dialogText property, the tag and attribute that can be specified are identical to those for the User-Response Wait Plugin. For details, see the topics explained in "User-Response Wait Plugin" in this product manual.

(4) If a file that is set for the hyperv.vhdListOutputFileNameRemote property or hyperv.vhdListOutputFileNameLocal property already exists, the existing file is overwritten. Also, the files on the remote side are deleted. For this reason, carefully check that there are no mistakes in the specified file name.

(5) If a folder with the path specified at the hyperv.vhdListOutputFileNameRemote property does not exist, the folder is created. The created folder remains and is not deleted. Delete unused folders on a regular basis.

(6) The file is output to the remote location even if an error occurs when deleting the virtual server or virtual disk files if the hyperv.vhdListOutputFileNameRemote property was specified, or if the hyperv.vhdListOutputFileNameLocal property is not specified. The file that was output remains and is not deleted. For this reason, delete any unused files.

(7) This service does not delete the registration information of the virtual server from the service and application of the failover cluster manager. Delete manually based on user operation.

(8) If "Shutdown" was selected in the user response wait GUI, the virtual server OS is forced to shut down. File data that was being edited in the virtual server is not saved.

Version

03.00.00

Tags

Delete VM,Hyper-V 2008

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 Hyper-V server information.

Y

Virtual server information

Specify the information of the virtual server that will be deleted.

Y

User response wait options

This is the option for user responses when the virtual server is running. Make any changes as needed.

N

Options at execution

This is the property for virtual server state confirmation. Make any changes as needed.

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

hyperv.targetHost

Hyper-V server host name

Specifies the host name or IP address of the Hyper-V server. IPv6 addresses are not supported.

Input

Disabled

R

Virtual system environment 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

User response wait options

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

User response wait options

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

User response wait options

UserResponsePlugin.mailSubject

Subject line

Specify the subject line of notification emails sent when the service is waiting for a user response.

Input

Disabled

O

User response wait options

UserResponsePlugin.mailBody

Email text

Specify the body text of notification emails sent when the service is waiting for a user response.

Input

Disabled

O

User response wait options

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

User response wait options

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

User response wait options

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

User response wait options

hyperv.checkVmStateDisabledCount

Virtual server status (stopping complete) check count

Specifies the number of times to check whether virtual server stopping is complete. This value combined with the check interval for the virtual server status (stopping complete) determines the maximum wait time.

Input

Disabled

R

Options at execution

hyperv.checkVmStateDisabledInterval

Virtual server status (stopping complete) check interval

Specifies the interval in seconds between checks for whether virtual server stopping is complete.

Input

Disabled

R

Options at execution

hyperv.checkJobShutdownCount

Job monitoring count (InitiateShutdown method)

This property adjusts the job monitoring count for monitoring requests to Hyper-V for processing (InitiateShutdown method). You do not need to change the value of this property.

Input

Disabled

R

Options at execution

hyperv.checkJobShutdownInterval

Monitor interval (InitiateShutdown method)

This property adjusts the job monitoring interval for monitoring requests to Hyper-V for processing (InitiateShutdown method). You do not need to change the value of this property.

Input

Disabled

R

Options at execution

hyperv.checkJobDelVMCount

Job monitoring count (DestroyVirtualSystem method)

This property adjusts the job monitoring count for monitoring requests to Hyper-V for processing (DestroyVirtualSystem method). You do not need to change the value of this property.

Input

Disabled

R

Options at execution

hyperv.checkJobDelVMInterval

Job monitoring interval (DestroyVirtualSystem method)

This property adjusts the job monitoring interval for monitoring requests to Hyper-V for processing (DestroyVirtualSystem method). You do not need to change the value of this property.

Input

Disabled

R

Options at execution

hyperv.checkJobDelSnapshotCount

Job monitoring count (RemoveVirtualSystemSnapshotTree method)

This property adjusts the job monitoring count for monitoring requests to Hyper-V for processing (RemoveVirtualSystemSnapshotTree method). You do not need to change the value of this property.

Input

Disabled

R

Options at execution

hyperv.checkJobDelSnapshotInterval

Monitor interval (RemoveVirtualSystemSnapshotTree method)

This property adjusts the job monitoring interval for monitoring requests to Hyper-V for processing (RemoveVirtualSystemSnapshotTree method). You do not need to change the value of this property.

Input

Disabled

R

Options at execution

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

hyperv.vmName

Virtual server name

Specifies the name of the virtual server. (This is the name of the virtual server as it is displayed in Hyper-V. This is not the host name in the OS.)

Input

Disabled

R

Virtual server information

hyperv.vHardDiskDeletePermanently

Deletion of virtual disk file required

Specifies whether to delete virtual disk file used for the virtual server.

Input

Disabled

R

Virtual server information

hyperv.vhdListOutputFileNameRemote

Output file name (remote)

Specifies, as a full path, the temporary file name for when the virtual disk file list used by the virtual server is output to the Hyper-V server.

Input

Disabled

O

Virtual server information

hyperv.vhdListOutputFileNameLocal

Output file name (local)

Specifies, as a full path, the file name of the local server that obtains the virtual disk file list.

Input

Disabled

O

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

hyperv.targetHost

Enter up to 256 halfwidth alphanumeric characters. You can also use periods (.) and hyphens (-).

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.

hyperv.checkVmStateDisabledCount

Enter an integer from 1 to 2147483647.

hyperv.checkVmStateDisabledInterval

Enter an integer from 1 to 60.

hyperv.checkJobShutdownCount

Enter an integer from 1 to 2147483647.

hyperv.checkJobShutdownInterval

Enter an integer from 1 to 60.

hyperv.checkJobDelVMCount

Enter an integer from 1 to 2147483647.

hyperv.checkJobDelVMInterval

Enter an integer from 1 to 60.

hyperv.checkJobDelSnapshotCount

Enter an integer from 1 to 2147483647.

hyperv.checkJobDelSnapshotInterval

Enter an integer from 1 to 60.

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

hyperv.vmName

Enter a character string of up to 100 characters. The character string must not start with a space, end with a space or period (.), or contain the following characters: < > | ; & ' " * ? [ ] ` , % \ / :

hyperv.vHardDiskDeletePermanently

Select one of the following values:

yes,no

hyperv.vhdListOutputFileNameRemote

Enter a character string of up to 256 characters. The character string must not end with a backslash (\) or contain the following characters: < > | ; & * ? " % / ' [ ] `

hyperv.vhdListOutputFileNameLocal

Enter no more than 256 characters. Do not include the following characters: < > | ; & * ? " % or a trailing \ or /

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

hypervGetVMState

Obtain the virtual server status

Obtains the virtual server state in the Hyper-V environment.

Check the virtual server state.

2

hypervCheckVMState

Flow Plug-in

Checks the virtual server state, and if startup is completed, confirmation is sent to the user.

--

2-3

Compatible Plug-in

Determines if the virtual server is in the "Start completed" state.

After removing the cause of the error, run the service again.

2-4

Flow Plug-in

Shuts down the virtual server.

--

2-4-1

User-Response Wait Plug-in

Checks if the virtual server is to be shut down.

After removing the cause of the error, run the service again.

2-4-2

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.

2-4-3

Abnormal-End Plug-in

Makes the jobnet an error.

After removing the cause of the error, run the service again.

2-4-4

Shut down a virtual server

Shuts down a virtual server in the Hyper-V environment.

After removing the cause of the error, run the service again.

3

DeleteVM

Flow Plug-in

Deletes a virtual server

--

3-1

Delete a virtual server

Deletes a virtual server in the Hyper-V environment.

If the virtual server is not deleted, remove the cause of the error and then execute the service again.

When the virtual server is deleted, check if the virtual disk file exists, or when the virtual disk file list has been output, refer to the file with the Hyper-V server, and manually delete the virtual disk file as needed.

4

outputFileTransfer

Flow Plug-in

Transfers the virtual disk file list.

--

4-3

Compatible Plug-in

Checks if the output file name (remote) of the virtual disk file list is specified.

If the virtual disk file list has been output, the list remains on the Hyper-V server. Delete it manually.

4-4

Flow Plug-in

Transfers the virtual disk file list.

--

4-4-3

Compatible Plug-in

Checks if the output file name (local) of the virtual disk file list is specified.

The virtual disk file list remains on the Hyper-V server. Delete it manually.

4-4-4

Flow Plug-in

Transfers the virtual disk file list.

--

4-4-4-1

File-Forwarding Plug-in

Transfers the remote temporary file to an output file specified locally.

The virtual disk file list remains on the Hyper-V server. Delete it manually.

4-4-4-2

Delete file

Deletes the remote temporary file.

The virtual disk file list remains on the Hyper-V server. Delete it manually.