5.4.6 Create a virtual server
Function
This component creates a virtual server in the Hyper-V environment by duplicating an exported virtual server.
The following servers are required for this component:
- Hyper-V server (Execution target server)
This is the Windows server where Hyper-V is installed.
- Virtual server
This is a virtual server managed by Hyper-V.
- Exported virtual server
This is a virtual server exported from Hyper-V and the set of configuration files for the virtual server.
- Storage server
This is the server that stores the exported virtual server that is used as the copy source.
The exported virtual server is copied to the import target.
The import function is used to create a virtual server in the Hyper-V server.
A new unique ID is created for the new virtual server that is created.
If a folder already exists at the path specified for the import target, that folder is used.
Use situation
This component can be used to create a new virtual server in the Hyper-V environment. By executing this component together with the following component, you can initialize the OS and set up IP addresses for the virtual server.
• hypervCreateAnsFile
• hypervMountVhd
• hypervUnmountVhd
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 settings must be made in the virtual server before exporting from the Hyper-V server.
1. The administrator password must be left blank.
2. The network settings must have been deleted.
If the network adapter information of the virtual host is set, the settings below must be made blank before setting to [Obtain an IP address automatically] or [Obtain DNS server address automatically].
- IP address
- Subnet mask
- Default gateway
- Preferred DNS server
- Alternate DNS server
3. Sysprep must be used to initialize the OS information.
During the initialization process, select the following options.
From the System Cleanup Action drop down, select [Enter System Out of Box Experience (OOBE)].
Select the [Generalize] check box.
(3) If the storage server is separate from the Hyper-V server, shared settings were made from the Hyper-V server to the folder where the exported virtual server is stored.
(4) No snapshot or differential-data disk is created in the exported virtual server.
Cautions
(1) If a folder with the path specified at the import target does not exist, the folder is created.
(2) If a virtual disk file still remains in the folder of the path specified at the import target, the task is abnormally terminated. Check the folder of the path specified at the import target, and either delete the virtual disk or specify another path.
(3) This component does not register the deployed virtual server in the services and in the applications of the failover cluster manager. Manually register this information based on user operations.
Version
02.00.00
Plug-in tags
Add VM,Hyper-V 2008
Plug-in name displayed in the task log
hypervCreateVM
Return code
0: Normal
12: Error (Mistake by user) A property is invalid.
23: Error (Invalid environment) The environment requirements are not met.
27: Error (Check the task log for error details.)
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.importFolderPath |
Import target |
Specifies the path of the folder where the virtual server is stored. |
-- |
Input |
R |
hyperv.userName |
User name for connecting to storage server |
Specifies the user name for connecting to the storage server. Specify this property if the storage server is a server other than the Hyper-V server. |
-- |
Input |
O |
hyperv.password |
Password for connecting to storage server |
Specifies the password for connecting to the storage server. Specify this property if the storage server is a server other than the Hyper-V server. |
-- |
Input |
O |
hyperv.exportedVmName |
Path of exported virtual server folder |
Specifies the folder name, as a full path, of the exported virtual server that is used as the copy source of the virtual server. If the storage server is a server other than the Hyper-V server, specify the path in UNC syntax. |
-- |
Input |
R |
hyperv.checkJobStateCountGetVm |
Job monitoring count (GetVirtualSystemImportSettingData method) |
This property adjusts the job monitoring count for monitoring requests to Hyper-V for processing (GetVirtualSystemImportSettingData method). You do not need to change the value of this property. |
1200 |
Input |
R |
hyperv.checkJobStateIntervalGetVm |
Monitor interval (GetVirtualSystemImportSettingData method) |
This property adjusts the job monitoring interval for monitoring requests to Hyper-V for processing (GetVirtualSystemImportSettingData method). You do not need to change the value of this property. |
3 |
Input |
R |
hyperv.checkJobStateCountNewVm |
Job monitoring count (ImportVirtualSystemEx method) |
This property adjusts the job monitoring count for monitoring requests to Hyper-V for processing (ImportVirtualSystemEx method). You do not need to change the value of this property. |
1440 |
Input |
R |
hyperv.checkJobStateIntervalNewVm |
Monitor interval (ImportVirtualSystemEx method) |
This property adjusts the job monitoring interval for monitoring requests to Hyper-V for processing (ImportVirtualSystemEx method). You do not need to change the value of this property. |
5 |
Input |
R |
hyperv.returnVhdPath |
Virtual disk file path (for first NIC) |
Stores, as a full path, the file path of the virtual disk (first NIC) created by this component. |
-- |
Output |
O |
hyperv.returnVhdPath2 |
Virtual disk file path (for second NIC) |
Stores, as a full path, the file path of the virtual disk (second NIC) created by this component. |
-- |
Output |
O |
hyperv.returnVhdPath3 |
Virtual disk file path (for third NIC) |
Stores, as a full path, the file path of the virtual disk (third NIC) created by this component. |
-- |
Output |
O |
hyperv.returnVhdPath4 |
Virtual disk file path (for fourth NIC) |
Stores, as a full path, the file path of the virtual disk (fourth NIC) created by this component. |
-- |
Output |
O |
hyperv.returnNumOfNic |
Number of NICs |
Stores the number of NICs connected to the virtual server. |
-- |
Output |
O |
common.returnValue |
Return value for the plugin |
The return value of this plugin stored. |
-- |
Output |
O |