5.11.40 Set virtual server resources
Function
Changes a virtual server's resource allocation (number of CPUs and memory capacity) in a VMware vSphere environment.
In VMware vCenter Server 4.1 or earlier, the number of CPUs means the number of virtual processors; in VMware vCenter Server 5.0 or later, the number of CPUs means the product of the number of virtual sockets and the number of cores per socket. In version 11-11 and earlier, the number of cores per socket is always 1, so the number of CPUs is equal to the number of virtual sockets. However, starting from version 11-12, the number of cores per socket can be changed. To change the number of cores per socket, specify "true" for the option for setting the number of cores (the VMware.setCoresOption property).
Note that, as a result of the above, the display name of the VMware.cpuNum property has been changed. In version 11-11 and earlier, the display name was "Number of CPUs". In version 11-12 and later, the display name is "Number of CPU sockets".
This plugin assumes the following servers:
• vCenter server
This is a server on which VMware vCenter Server is installed.
• vCenter control server (Execution target server)
This is a server on which VMware vSphere PowerCLI is installed.The plugin is sent to this server by JP1/AO and then is executed.
• Virtual server
This is a virtual server managed by the vCenter server and VMware vSphere ESXi (or VMware ESX Server).
Use situation
You use this plugin to change the allocation of resources for a virtual server when there is a shortage of virtual server resources.
Prerequisites
For the latest support information about [Required product in the System]/[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.
[Required product in the System]
JP1/Automatic Operation 11-10 or later
[Required products on the execution target system]
(1) Prerequisite product of vCenter Server
• VMware vCenter Server 6.5, 6.0, 5.5, 5.1, 5.0, 4.1, 4.0
(2) VMware vSphere ESXi that manages the virtual servers (or VMware ESX Server)
• VMware vSphere ESXi 6.5, 6.0, 5.5, 5.1, 5.0 or VMware ESX Server 4.1, 4.0
(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 (or VMware ESX Server)/vCenter control server that manages the virtual server.
• Windows Server 2008 R2 Standard/Enterprise/Datacenter
• Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter
• Windows Server 2016 Standard/Datacenter
• Red Hat Enterprise Linux Server 6 (32-bit x86), Red Hat Enterprise Linux Server 6 (64-bit x86_64)
• Red Hat Enterprise Linux Server 7 (64-bit x86_64)
• CentOS 6 (64-bit x86_64)
• CentOS 7 (64-bit x86_64)
[Usage conditions for required products in the execution target system]
(1) VMware vSphere ESXi (or VMware ESX Server) is managed by VMware vCenter Server.
(2) Conditions for virtual servers
• There is no duplication of the names of virtual servers under the management of the same vCenter.
• The virtual servers have been stopped.
• VMwareTools has been installed in the virtual servers.
[Required products on the execution target server]
• VMware vSphere PowerCLI 6.3 Release1, 6.0 Release3, 6.0 Release1, 5.8 Release1, 5.5 Release2, 5.5 Release1, 5.1 Release2, 5.0
• VMware PowerCLI 6.5 Release1
• VMware PowerCLI 6.5.1
The PackageManagement must be installed.
[Prerequisite product OS running in the execution target server]
• Windows Server 2008 R2 Standard/Enterprise/Datacenter
• Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter
• Windows Server 2016 Standard/Datacenter
Cautions
(1) When a value other than "true" is specified for the option for setting the number of cores (the VMware.setCoresOption property), set to 1 the number of cores per socket on the target virtual server. If the number of CPU sockets is changed for a virtual server on which the number of cores per socket has been set to a value other than 1, the following problems might occur:
- The virtual server does not start, because the number of CPUs is not a multiple of the number of cores.
- The virtual server starts, but the resources do not have the expected values.
(2) Number of CPUs and memory capacity values that can be specified differ according to the versions of the prerequisite products. Check the limits for these prerequisite products before specifying number of CPUs and memory capacity values.
Execution privilege
(1) The user who will be connecting to VMware vCenter Server must have the following permissions:
System administrator role
Version
02.12.00
Plug-in tags
Modify VM,VMware vSphere
Plug-in name displayed in the task log
vsphereChangeResource
Return code
0: Normal
12: Error (user error) Invalid property
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 |
VMware vCenter server name |
Specify the host name or IP address of the VMware vCenter server. You cannot specify an IPv6 address. |
-- |
Input |
R |
VMware.userName |
User name for VMware vCenter Server connection |
Specify the user name to use when connecting to the VMware vCenter server. |
-- |
Input |
R |
VMware.password |
Password for VMware vCenter Server connection |
Specify the password to use when connecting to the VMware vCenter server. |
-- |
Input |
R |
VMware.portNumber |
Port number for VMware vCenter Server connection |
Specify the port number to use when connecting to the VMware vCenter server (specifically, the port number of the VMware vCenter server's Web service). If you omit this property, the default value of the VMware vCenter server applies. |
443 |
Input |
O |
VMware.protocol |
Protocol for VMware vCenter Server connection |
Specify the protocol to use when connecting to the VMware vCenter server. |
https |
Input |
R |
VMware.vmName |
Virtual server name |
Specify the name of the virtual server. This name is used to represent the virtual server in VMware vCenter server. It is not used as a host name by the OS. |
-- |
Input |
R |
VMware.cpuNum |
Number of CPU sockets |
Specify the number of CPU virtual sockets to assign to the virtual server. You must specify either CPU sockets or memory size property. The product of the number of CPU sockets and the number of cores per socket is the number of CPUs on a virtual server. |
-- |
Input |
O |
VMware.setCoresOption |
Option for setting the number of cores |
When you set the number of cores per CPU sockets in a virtual server, specify "true". Unless you specify "true", the number of cores is not set. For details, see the notes in the detailed information of the service for modifying the virtual machine configuration (CPUs and memory). |
false |
Input |
O |
VMware.numCoresPerSocket |
Number of cores per socket |
Specify the number of cores per CPU sockets to assign to the virtual server, if you specify "true" for the Option for setting the number of cores property. If you specify this property, you must also specify the number of CPU sockets. The product of the number of CPU sockets and the number of cores per socket is the number of CPUs on a virtual server. |
-- |
Input |
O |
VMware.memoryMB |
Memory size (MB) |
Specify the amount of memory (in MB) to assign to the virtual server. You must specify either CPU sockets or memory size property. |
-- |
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 |