The general steps for using this service template are as follows:
- The task obtains the status of the virtual server.
- The task confirms that the virtual server is not running.
If the virtual server is not running, the task continues processing. In all other cases, the task runs the User-Response Wait plug-in to verify whether the virtual server is to be shut down.
If you select Shutdown from the UI of the User-Response Wait plug-in, the virtual server is shut down. If you select Shutdown for a virtual server that is not running, the task ends abnormally without making any changes on the virtual server.
If you select Cancel or the wait for a user response times out, the task ends abnormally without making any changes on the virtual server.
- The task deletes the virtual server.
The virtual server is deleted from the Hyper-V server. At this time, all snapshots for that virtual server are also deleted.
If you select "yes" from the selection list for the hyperv.vHardDiskDeletePermanently property, the task deletes all (dynamic, fixed, and differential) virtual disk files that are allocated to the virtual server that is to be deleted. The task does not delete disks or files that are allocated to pass-through (physical) disks, floppy disks, CDs or DVDs. If differential virtual disks are allocated to the virtual server, the task does not delete the virtual disks that are used as the parents of those differential virtual disks.
If trying to delete virtual disk files on the virtual server fails, the file deletion processing stops, and the task ends abnormally.
- The task outputs a list of virtual disk files on the virtual server.
If you specify the hyperv.vhdListOutputFileNameRemote and hyperv.vhdListOutputFileNameLocal properties, the task outputs a CSV file that lists the paths of the virtual disk files allocated to the virtual server that is to be deleted from the Hyper-V server. The task then transfers the CSV file to the local PC and deletes the CSV file from the remote PC. If differential virtual disks are allocated to the virtual server, the virtual disks that are used as the parents of those differential virtual disks are not included in the CSV file.
If you only specify the hyperv.vhdListOutputFileNameRemote property, the task outputs a CSV file that lists the paths of the virtual disk files, but does not transfer the CSV file to the local PC.
The following items are output to the file in CSV (comma-separated value) format:
- Whether virtual disk files exist (header name: Existence)
Depending on whether virtual disk files are allocated to the virtual server when the server is deleted, one of the following values is output:
- Found: Existence of virtual disk files was confirmed.
- NotFound: Virtual disk files were set up, but their existence were not confirmed.
- File deletion result (header name: DeleteResult)
If you select "yes" from the selection list for the hyperv.vHardDiskDeletePermanently property, the task outputs the result of deleting the virtual disk files. If you select "no", "Skipped" is output. For the deletion result, one of the following values is output:
- Completed: File deletion finished successfully.
- Failed: File deletion failed.
- Skipped: File deletion was not performed.
- File path (header name: FilePath)
The paths of the virtual disk files set for the Hyper-V server are output, regardless of the values in (a) and (b).
- Whether virtual disk files exist (header name: Existence)
Service Definition and Submit Service Properties
The following table lists the properties shown in the Service Definition window for the service template.
Property key | Property name | Description |
---|---|---|
hyperv.targetHost R | Hyper-V server host name | Specifies the host name or IP address of the Hyper-V server. IPv6 addresses are not supported. |
UserResponsePlugin.toAddress O | 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. For example: mailA,mailB |
UserResponsePlugin.ccAddress O | 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. For example: mailA,mailB |
UserResponsePlugin.bccAddress O | 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. For example: mailA,mailB |
UserResponsePlugin.mailSubject O | Subject line | Specify the subject line of notification emails sent when the service is waiting for a user response. |
UserResponsePlugin.mailBody O | Email text | Specify the body text of notification emails sent when the service is waiting for a user response. |
UserResponsePlugin.encodeType O | 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. |
UserResponsePlugin.dialogText O | Domain user name | Specify the user name for the domain that the virtual server belongs to. This item must be specified if DOMAIN is selected as the type of entity that you want the virtual server to belong to. |
UserResponsePlugin.responseTimeOut R | 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 end abnormally. |
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. R: Required |
The following table lists the properties shown in the Service Definition and the Submit Service windows:
Property key | Property name | Description |
---|---|---|
hyperv.vmName R | 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.) |
hyperv.vHardDiskDeletePermanently R | Deletion of virtual disk file required | Specifies whether to delete virtual disk file used for the virtual server. |
hyperv.vhdListOutputFileNameRemote O | 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. |
hyperv.vhdListOutputFileNameLocal O | Output file name (local) | Specifies the name of the file (in full-path format) that contains the list of virtual disk files to be saved to the local server. |
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. R: Required |
Prerequisites
- The name of each virtual server on the Hyper-V server must be unique.
- The Operating System Shutdown service of Hyper-V Integration Services must be enabled on the target virtual server.
Server requirements
- Hyper-V server
A server on which Hyper-V is installed.
- Virtual server
A virtual server managed by Hyper-V.
Usage guidelines
- Do not concurrently run multiple instances of this service on the same virtual server.
- If you previously performed a task (such as a snapshot-related procedure) to make the path of a virtual disk file invisible in the virtual server settings, this service will not delete that virtual disk file. In such a case, manually delete the virtual disk file.
- You can specify HTML tags for the property UserResponseplugin.dialogText. The specifiable tags and attributes are the same as those for the User-Response Wait plug-in. For details, see "User-Response Wait Plug-in" in the Hitachi Ops Center Automator Service Builder User Guide.
- If you specify an existing file for the hyperv.vhdListOutputFileNameRemote or the hyperv.vhdListOutputFileNameLocal properties, the existing file is overwritten. In addition, the file on the remote PC will be deleted, so make sure the specified file name is correct.
- If you specify a path that includes non-existent folders for the hyperv.vhdListOutputFileNameRemote property, those folders are automatically created but not automatically deleted. Periodically delete these folders if they are unnecessary.
- If you specify the hyperv.vhdListOutputFileNameRemote property, a file is output to the remote PC even if the hyperv.vhdListOutputFileNameLocal property is not specified or if an error occurs during the deletion of the virtual server or virtual disk file. Because this service does not delete the output file, manually delete the file if it is unnecessary.
- This service does not delete the registration information of virtual servers from any services and applications of the failover cluster manager. Manually delete the registration information based on the user operational requirements.
- If you select "Shutdown" from the UI of the User-Response Wait plug-in, the OS of the virtual server is forcibly shut down. Data in files that are being edited on the virtual server will not be saved.