5.7.12 Delete Virtual Servers
Function
This plug-in deletes virtual servers in a Hyper-V environment. When a virtual server is deleted from the Hyper-V server, all snapshots for that virtual server are also deleted.
This plug-in requires the following servers:
- Hyper-V server (execution-target server)
A server on which Hyper-V is installed
- Virtual server
A virtual server managed by Hyper-V
If you specify "yes" for the property hyperv.vHardDiskDeletePermanently, this plug-in deletes all virtual disk files (dynamic, fixed, and differential) that are allocated to the virtual server to be deleted. This plug-in does not delete the 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, this plug-in does not delete the virtual disks that are used as the parents of those differential virtual disks.
If the property hyperv.vhdListOutputFileName is specified, this plug-in outputs a CSV file that lists the paths of the virtual disk files allocated to the virtual server to be deleted from the Hyper-V server. If differential virtual disks are allocated to the server, the virtual disks that are used as the parents of those differential virtual disks are not included in the CSV file.
The following items are output to the file in CSV (comma-separated value) format:
(a) 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 could not be confirmed.
(b) File deletion result (header name: DeleteResult)
If you specify "yes" for the property hyperv.vHardDiskDeletePermanently, this plug-in outputs the result of deleting the virtual disk files. If you specify "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.
(c) 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).
Use situation
You can use this plug-in to delete virtual servers.
Prerequisites
For the most recent information about the prerequisite products for the system, prerequisite products for the execution-target server, and the supported OSs for the prerequisite products for the execution-target server, see the Release Notes.
Prerequisite product for the system:
Job Management Partner 1/Automatic Operation 10-50 or later
Prerequisite products for the execution-target server:
(1) Prerequisite product for the Hyper-V server
- Windows Server 2012 Hyper-V, Windows Server 2012 R2 Hyper-V
(2) OS of the virtual server
- Windows Server 2008 Standard/Enterprise (x86/x64), Windows Server 2008 R2 Standard/Enterprise/Datacenter
- Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter
Note: Environments where Server Core is installed are excluded.
Supported OSs for the prerequisite products on the execution-target server:
- Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter
Note: Environments where Server Core is installed are excluded.
Conditions for using the prerequisite products on the execution-target server:
(1) The name of each virtual server on the Hyper-V server must be unique.
(2) The virtual servers must not be running.
Cautions
(1) If you previously performed an operation (such as a snapshot-related operation) 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.
(2) If you specify the name of an existing file for the property hyperv.vhdListOutputFileName, the existing file will be overwritten.
(3) If you specify a path that includes non-existent folders for the property hyperv.vhdListOutputFileName, this service automatically creates those folders. However, these folders are not automatically deleted when the file is deleted. Periodically delete these folders if they are unnecessary.
(4) If you specify the property hyperv.vhdListOutputFileName, a list of virtual disk files is output even if an error occurs during the deletion of the virtual server or virtual disk files.
(5) This plug-in does not delete the registration information of virtual servers from any services or applications of the failover cluster manager. Manually delete the registration information based on the user operational requirements.
Version
01.50.00
Category
VirtualMachine/HyperV/2012
Plug-in name displayed in the task log
hyperv2012DeleteVM
Return code
0: Normal
12: Error (Mistake by user): Invalid property
23: Error (Invalid environment): The environment requirements are not met.
27: Error (Check the task log for details of the error): Unidentified error
41: Error (An error has been detected in the component): Property not entered (An error has been detected in the component script)
Property list
The following table lists the properties:
Property key |
Property name |
Description |
Default value |
I/O type |
Required |
---|---|---|---|---|---|
plugin.destinationHost |
Host name of the execution target server |
Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported. |
-- |
Input |
R |
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 |
R |
hyperv.vHardDiskDeletePermanently |
Deletion of virtual disk file required |
To delete the virtual disk files used on the virtual server, specify "yes". If you do not want to delete these files, specify "no". |
no |
Input |
R |
hyperv.vhdListOutputFileName |
Output file name for virtual disk file list |
Specifies, as a full path, the file name for the output of the virtual disk file list. |
-- |
Input |
O |
common.returnValue |
Return value for the plugin |
The return value of this plugin stored. |
-- |
Output |
-- |