5.4.3 Shut down a virtual server
Function
This component forcibly shuts down the OS of the virtual server in the Hyper-V environment.
The following servers are required for this component:
- Hyper-V server (Execution target server)
This is the server where Hyper-V is installed.
- Virtual server
This is a virtual server managed by Hyper-V.
When the OS of the virtual server 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 status is repeated for the count specified in the hyperv.checkVmStateDisabledCount property. Adjust the values of each property based on your usage environment.
When the component terminates normally, "3" is stored in the hyperv.vmState property.
For details on the relationship between the value to be stored and the virtual server status, see "List of statuses of virtual servers managed by Hyper-V" in the JP1/AO manual.
Use situation
This can be used to shut down the OS of the virtual server.
The flow of the shut-down processing is as follows: the virtual server status is obtained with the hypervGetVMState component and is determined, and then this component is executed.
Prerequisites
For the latest support information about [Required product in the System]/[Required products on the execution target server]/[Prerequisite product OS running in the execution target server], see the release notes.
[Required product in the System]
JP1/Automatic Operation 11-00 or later
[Required products on the execution target server]
(1)Prerequisite product of Hyper-V Server
- Windows Server 2008 R2 Hyper-V
(2)Prerequisite OS running in the virtual servers
- Windows Server 2008 R2 Standard/Enterprise/Datacenter
This does not apply to Server Core installation environments.
[Prerequisite product OS running in the execution target server]
- Windows Server 2008 R2 Standard/Enterprise/Datacenter
This does not apply to Server Core installation environments.
[Usage conditions for required products on the execution target server]
(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 has been started.
Cautions
(1) This component performs a forced shutdown of the specified virtual server OS. When this component is used, file data that was being edited in the virtual server is not saved.
Version
02.00.00
Plug-in tags
Control VM,Hyper-V 2008
Plug-in name displayed in the task log
hypervShutdownVM
Return code
0: Normal
23: Error (Invalid environment) The environment requirements are not met.
27: Error (Check the task log for error details.)
28: Error (Invalid status change of the virtual server) A change to the virtual service status was invalid.
29: Error (The check of the virtual server status timed out.) The check of the virtual server status timed out.
30: Error (The virtual server became unavailable.) The virtual server became unavailable during processing.
41: Error (An error was detected in the component.) A property was not entered. (An error was 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.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. |
1440 |
Input |
R |
hyperv.checkVmStateDisabledInterval |
Virtual server status (stopping complete) check interval |
Specifies the interval in seconds between checks for whether virtual server stopping is complete. |
5 |
Input |
R |
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. |
1200 |
Input |
R |
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. |
3 |
Input |
R |
hyperv.vmState |
Virtual server status |
Stores the status of the virtual server. |
-- |
Output |
O |
common.returnValue |
Return value for the plugin |
The return value of this plugin stored. |
-- |
Output |
O |