Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


3.10.4 Add virtual server (virtual disk)

Function

This service template creates a virtual disk in a Hyper-V environment and then adds that virtual disk to a virtual server.

This service template requires the following servers:

- Hyper-V server

A server on which Hyper-V is installed

- Virtual server

A virtual server managed by Hyper-V

The following is an overview of the processing:

(1) The task obtains the status of the virtual server.

(2) 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 executes the User-Response Wait plug-in to check whether the virtual server is to be shut down.

If you select "Shutdown" from the GUI 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 terminates abnormally without performing any operations on the virtual server.

If you select "Cancel" or the response-wait processing times out, the task terminates abnormally without performing any operations on the virtual server.

(3) The task creates a virtual disk file in the Hyper-V environment.

The task can create dynamic (variable-size) or fixed (fixed-size) virtual disks. It cannot create differential virtual disks or pass-through (physical) disks.

If you specify the property hyperv.vHardDiskFolderPath, a new virtual disk file is created in the folder path specified by the property. If you do not specify this property, a new virtual disk is saved in the default virtual-disk storage folder set on the Hyper-V server.

If you specify a path that includes non-existent folders, those folders are automatically created.

(4) The task connects the virtual disk to the virtual server.

You can add virtual disks to a SCSI controller but not to an IDE controller.

The method for connecting a virtual disk to a SCSI controller varies depending on whether the SCSI controller ID number (the property hyperv.scsiControllerNumber) and SCSI controller location number (the property hyperv.scsiLocationNumber) are specified.

- If neither the SCSI controller ID number nor SCSI controller location number is specified

The Hyper-V server automatically connects the virtual disk to an available SCSI controller.

- If only the SCSI controller ID number is specified

The Hyper-V server automatically connects the virtual disk to any location (0 to 63) of the specified SCSI controller.

- If only the SCSI controller location number is specified

The Hyper-V server automatically connects the virtual disk to the specified SCSI controller location of an available SCSI controller (0 to 3).

- If both the SCSI controller ID number and SCSI controller location number are specified

The virtual disk is connected to the specified location of the specified SCSI controller.

Prerequisites

For the most recent information about the prerequisite products for the system, prerequisite products for the system executing the service templates, and the supported OSs for the prerequisite products for the system executing the service templates, see the Release Notes.

Prerequisite product for the system:

JP1/Automatic Operation 12-00 or later

Prerequisite products in the system executing the service template:

(1) Prerequisite product for the Hyper-V server

- Windows Server 2016 Hyper-V

Supported OSs for the prerequisite products in the system executing the service template:

(1) OS of the Hyper-V server

- Windows Server 2016 Standard/Datacenter

Note: Environments where Server Core/Nano Server is installed are excluded.

(2) OS of the virtual server

- Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter

- Windows Server 2016 Standard/Datacenter

Note: Environments where Server Core/Nano Server is installed are excluded.

Conditions for using the prerequisite products on the system executing the service template:

(1) The name of each virtual server on the Hyper-V server must be unique.

(2) The following service of Hyper-V Integration Services must be enabled on the target virtual server:

- Operating System Shutdown

(3) There must be an available SCSI controller on the virtual server.

Cautions

(1) This service template does not initialize the virtual disks that are added to the virtual server. If necessary, log in to the OS of the virtual server and initialize the disks.

(2) Do not concurrently execute multiple instances of this service on the same virtual server.

(3) 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 the topic about the User-Response Wait plug-in in this product manual.

(4) You cannot add any virtual disk files that have already been created on a Hyper-V server.

(5) If you select "Shutdown" from the GUI 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.

(6) If another virtual disk is already connected to the specified SCSI controller location of the specified SCSI controller, this task terminates abnormally.

(7) For second-generation virtual servers, you can add only virtual disks that are in VHDX file format. If you attempt to connect a created VHD file to a second-generation virtual server, this task terminates abnormally.

Version

03.00.00

Tags

Modify VM,Hyper-V 2016

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

Y

Virtual server information

Specify information about the virtual server to which a virtual disk is to be added.

Y

Virtual disk information

Specify information about the virtual disk to be created.

Y

Virtual disk connection information

Specify information about the SCSI controller to which the virtual disk is to be connected. Specify this information only if you want to use a specific SCSI controller.

N

User-response wait option

This option is used when user response is required after a virtual server is started. Change the settings of this option as necessary.

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 option

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 option

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 option

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 option

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 option

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 option

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 option

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 option

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.vHardDiskName

Virtual Disk File Name

Specify the file name of the virtual disk to be created. Specify "vhd" or "vhdx" as the file extension.

Input

Disabled

R

Virtual disk information

hyperv.vHardDiskFolderPath

Virtual disk storage folder path

Specify the full path to the folder that stores the created virtual disk. If you omit this specification, the virtual disk is stored in the virtual disk folder specified for the Hyper-V server.

Input

Disabled

O

Virtual disk information

hyperv.vHardDiskType

Virtual disk type

Specifies the virtual disk type. Specify one of the following: dynamic (an adjustable-size virtual disk is created) or fixed (a fixed-size virtual disk is created).

Input

Disabled

R

Virtual disk information

hyperv.capacity

Size (GB)

Specifies the size of the virtual disk, in gigabytes (GB).

Input

Disabled

R

Virtual disk information

hyperv.scsiControllerNumber

SCSI controller number

Specifies the SCSI controller number of the virtual server that adds the virtual disk. Specify the SCSI controller number as an integer from 0 in the order that the SCSI controllers were added to the virtual server (displayed in the Hyper-V Manager).

Input

Disabled

O

Virtual disk connection information

hyperv.scsiLocationNumber

SCSI controller location number

Specifies the location number of the SCSI controller of the virtual server that adds the virtual disk. Specify the SCSI controller location number as an integer for the unused locations of SCSI controllers that were added to the virtual server.

Input

Disabled

O

Virtual disk connection information

The following shows the list of the properties to be displayed in the "Task Details" window only:

Property key

Property name

Description

I/O type

Shared

hyperv.attachScsiControllerNumber

Connected SCSI controller number

Outputs the number of the SCSI controller to which the virtual disk file is connected.

Output

Disabled

hyperv.attachScsiLocationNumber

Location Number of the Connected SCSI Controller

Outputs the location number of the SCSI controller to which the virtual disk file is connected.

Output

Disabled

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.

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.vHardDiskName

A string of 255 or fewer characters. The following characters cannot be used: <, >, |, ;, &, *, ?, ", %, /, ', [, ], `, :, \

hyperv.vHardDiskFolderPath

A string of 247 or fewer characters. The string cannot end in a yen sign (\), and the following characters cannot be used: <, >, |, ;, &, *, ?, ", %, /, ', [, ], `

hyperv.vHardDiskType

Select one of the following values:

Dynamic,Fixed

hyperv.capacity

Enter an integer from 1 to 2040.

hyperv.scsiControllerNumber

Select one of the following values:

0,1,2,3

hyperv.scsiLocationNumber

Enter an integer from 0 to 63.

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

hyperv2016CheckVMState

Flow Plug-in

Checks the status of a virtual server. If the virtual server is running, this plug-in asks the user whether the virtual server is to be stopped.

--

1-2

Obtain virtual server status

Obtains the status of the specified virtual server.

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

1-3

Judge Value Plug-in

Checks whether a virtual server has stopped.

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

1-4

Flow Plug-in

Asks the user whether the virtual server is to be stopped. If the user chooses to stop it, this plug-in shuts down the virtual server.

--

1-4-1

User-Response Wait Plug-in

Asks the user whether the virtual server is to be stopped, and then waits for the user's response.

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

1-4-2

Obtain virtual server status

Obtains the status of the specified virtual server.

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

1-4-3

Judge Value Plug-in

Checks whether a virtual server has stopped.

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

1-4-4

Shut down virtual server

Shuts down a virtual server.

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

2

hyperv2016CreateVDisk

Create virtual disk

Creates a virtual disk.

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

3

hyperv2016AttachVDisk

Connect virtual disk

Connects a virtual disk to a virtual server.

If an error occurs, directly connect the created virtual disk on the Hyper-V server, or delete the virtual server. Then, remove the cause of the error, and then run the service again.