5.5.46 Add virtual disk to virtual server
Function
This plugin adds a virtual disk to a virtual server in the VMware vSphere environment.
Use either of the following methods to connect the added virtual disk to an SCSI controller:
- Connect the virtual disk to an existing SCSI controller
Specify "false" for the VMware.createScsiController property (whether to add SCSI controllers) to connect the virtual disk to an existing SCSI controller.
To specify the SCSI controller to which the virtual disk will be connected, specify the SCSI controller name (VMware.attachedScsiControllerName property).
If you do not specify the SCSI controller name, the virtual disk will be connected to a random SCSI controller.
- Connect the virtual disk to a new SCSI controller
Specify "true" for the VMware.createScsiController property (whether to add SCSI controllers) to add a new SCSI controller, and then connect the virtual disk to the added SCSI controller.
In this case, specify both of the following properties:
- VMware.scsiBusSharingMode property (SCSI bus sharing)
- VMware.scsiControllerType property (SCSI controller type)
This plugin requires the following servers:
- vCenter server
The server on which VMware vCenter Server is installed
- vCenter control server (execution target server)
The server on which VMware vSphere PowerCLI is installed. The plugin is transferred to and executed on this server by JP1/AO.
- Virtual server
A virtual server managed by vCenter server and VMware vSphere ESXi
- The following describes the data store name (VMware.dataStoreName property).
Specify the name of the data store in which a virtual disk will be created.
If you create an RDM disk, specify the data store that stores mapping files.
- The following describes the virtual disk capacity (VMware.vHardDiskCapacity property).
Specify the capacity (GB) of the virtual disk to be created. You need to specify this property if the virtual disk type is Flat.
If you create an RDM disk, you do not need to specify this property.
- The following describes the virtual disk type (VMware.vHardDiskType property).
Specify RawVirtual, RawPhysical, or Flat as the type of virtual disk to be created. If you do not specify this property, the virtual disk type is set to Flat.
Specify RawVirtual to connect an RDM disk in virtual mode. Specify RawPhysical to connect an RDM disk in physical mode. Specify Flat to connect a virtual disk.
Use situation
You use this plugin to add a data disk to a virtual server, such as when you configure a new virtual server and add a disk.
Prerequisites
For the latest support information about [Required products on the execution target system]/[Required products on the execution target server]/[Prerequisite product OS running in the execution target server], see the release notes.
In addition, the following OS and products use abbreviations. For the abbreviations of OS and products, see the "Preface".
[Required products on the execution target system]
(1) Prerequisite product of vCenter Server
• VMware vCenter Server
(2) VMware vSphere ESXi that manages the virtual servers
(3) Prerequisite OS running in the virtual servers
The following OSs are supported, based on the required products for the vCenter server and the required products for the VMware vSphere ESXi/vCenter control server that manages the virtual server.
• Windows Server
• Red Hat Enterprise Linux Server
[Usage conditions for required products in the execution target system]
(1) The power to the virtual server on which the virtual disk is to be added is off.
(2) VMware vSphere ESXi is managed by VMware vCenter Server.
(3) The virtual server name is unique among the vCenter servers.
(4) VMwareTools has been installed on the target virtual server.
[Required products on the execution target server]
•VMware PowerCLI
[Prerequisite product OS running in the execution target server]
•Windows Server
Cautions
(1) Do not specify a string containing a double-quotation mark (") or single quotation mark (') for a property of this plugin.
(2) Virtual disks added to virtual servers are not initialized. If necessary, log in to the OS of the virtual server and then initialize the disk.
(3) If you specify "true" for the VMware.createScsiController property (whether to add SCSI controllers), you need to specify both the SCSI bus sharing (VMware.scsiBusSharingMode property) and the SCSI controller type (VMware.scsiControllerType property). If one of these properties is not specified, this plugin ends abnormally.
(4) If a plugin for which "true" is specified for the VMware.createScsiController property (whether to add SCSI controllers) ends abnormally with return value 27, a virtual disk might have been created and connected to a SCSI controller. In this case, remove the cause of the error according to the error message in the task log, delete the virtual disk, and then execute the plugin again. Note that if the virtual disk needs to be deleted, the KNAE06478-E message is output to the task log.
(5) Do not simultaneously execute more than one instance of this plugin for the same virtual server. If they are executed simultaneously, this plugin ends abnormally or an invalid value might be stored for the virtual disk name (VMware.createdVHardDiskName property) or SCSI controller name (VMware.connectedScsiConName property).
Execution privilege
(1) The user who will be connecting to VMware vCenter Server must have the following permissions:
Role with new or existing disk addition permissions for the target virtual server or system administrator role
Version
02.11.00
Plug-in tags
Modify VM,VMware vSphere
Plug-in name displayed in the task log
vsphereAddVDisk
Return code
0: Normal
21: Error (invalid environment) Command cannot be found (error detected in the plugin script)
23: Error (invalid environment) Required environment is invalid
27: Error (check task logs for the nature of error)
41: Error (error detected in plugin) Missing property (error detected in plugin script)
Property list
The following table lists the properties:
Property key |
Property name |
Description |
Default value |
I/O type |
Required |
---|---|---|---|---|---|
VMware.vCenterServerName |
Host name of the vCenter server |
Specify the host name or IP address of the destination vCenter server. IPv6 addresses are not supported. |
-- |
Input |
R |
VMware.userName |
User name for connecting to the VMware vCenter Server |
Specify the user name for connecting to the VMware vCenter Server. |
-- |
Input |
R |
VMware.password |
Password for connecting to the VMware vCenter Server |
Specify the password for connecting to the VMware vCenter Server. |
-- |
Input |
R |
VMware.portNumber |
Port number for connecting to the VMware vCenter server |
Specify the number of the port for connecting to VMware vCenter Server (for the VMware vCenter Server Web service). |
443 |
Input |
O |
VMware.protocol |
Protocol for connecting to the VMware vCenter server |
Specify either HTTP or HTTPS as the protocol for connecting to VMware vCenter Server. |
https |
Input |
R |
VMware.vmName |
Virtual server name |
Specify the name of the virtual server. (This is the virtual server name in VMware vCenter Server. Do not specify a host name.) |
-- |
Input |
R |
VMware.dataStoreName |
Datastore name |
Specify the name of the datastore in which a virtual hard disk will be created. |
-- |
Input |
R |
VMware.vHardDiskCapacity |
Virtual disk capacity |
Specify (in GB) the capacity of the virtual disk to be created. |
-- |
Input |
O |
VMware.vHardDiskType |
Virtual hard disk type |
Specify RawVirtual, RawPhysical, or Flat as the type of the virtual disk to be created. |
-- |
Input |
O |
VMware.deviceName |
LUN device name |
Specifies the LUN device name where the virtual disk is to be created. Specified only if RawVirtual or RawPhysical is selected as the type of the virtual disk (example: /vmfs/devices/disks/naa.XXX). |
-- |
Input |
O |
VMware.vDiskStorageFormat |
Virtual disk formatting type |
For the type of formatting of the virtual disk, specify Thin (Thin Provisioning), Thick (Thick Provisioning (Lazy Zeroed)), or EagerZeroedThick (Thick Provisioning (Eager Zeroed)). Specify this property only if the virtual disk is Flat type. |
-- |
Input |
O |
VMware.attachedScsiControllerName |
SCSI controller name |
Specifies the name of the virtual disk connection-destination SCSI controller (e.g., "SCSI controller X"). If this specification is omitted, the controller is selected at random. If "Whether to add a SCSI controller" is "true", this property is ignored. |
-- |
Input |
O |
VMware.createScsiController |
Whether to add a SCSI controller |
To assign a new SCSI controller to the virtual disk being created, specify "true". To not do so, specify "false". If you specify this property, you must also specify the SCSI bus sharing and SCSI controller type settings. |
false |
Input |
R |
VMware.scsiBusSharingMode |
SCSI bus sharing |
To not share a SCSI-connected virtual disk with virtual servers, specify "NoSharing". To share it with virtual servers on the same ESX server, specify "Virtual". To share it with virtual servers on all ESX servers, specify "Physical". |
-- |
Input |
O |
VMware.scsiControllerType |
SCSI controller type |
SCSI controller type (Device, ParaVirtual, VirtualBusLogic, VirtualLsiLogic, or VirtualLsiLogicSAS) |
-- |
Input |
O |
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 |
common.returnValue |
Return value for the plugin |
The return value of this plugin stored. |
-- |
Output |
O |
VMware.createdVHardDiskName |
Virtual disk name |
Stores the name of the new virtual disk that was added. |
-- |
Output |
O |
VMware.connectedScsiConName |
SCSI controller name |
Stores the name of the SCSI controller connected to the newly added virtual disk. |
-- |
Output |
O |