5.5.13 File transmission through the vCenter server
Function
In the VMware vSphere environment, this plug-in transmits the specified file from the execution target server to the guest OS on the virtual server through the vCenter server.
The file is sent in binary format.
The file is sent by using the following vSphere PowerCLI commandlet on the execution target server:
Copy-VMGuestFile -Source "path-to-the-file-on-the-execution-target-server-(VMware.fileOnHost-property)"
-Destination "path-to-the-file-on-the-guest-OS-(VMware.fileOnGuest-property)"
-LocalToGuest
-Force#1
-VM VirtualMachine object#2
-GuestUser "user-name-for-logging-in-to-the-guest-OS-(VMware.guestOSUserName-property)"
-GuestPassword "password-for-logging-in-to-the-guest-OS-(VMware.guestOSUserPassword-property)"
-Confirm:$false#3
#1: If the path to the file in the guest OS (VMware.fileOnGuest property) contains a folder that does not exist, the folder will be created.
#2: Object obtained from the value of the virtual server name (VMware.vmName property)
#3: This prevents the commandlet from becoming interactive.
The following servers are the prerequisites for this plug-in:
- vCenter server
Server where VMware vCenter Server is installed.
- ESX server
Server where VMware vSphere ESXi is installed.
- vCenter control server (execution target server)
Server where VMware vSphere PowerCLI is installed. Plug-ins are transferred to this server and executed by JP1/AO.
- Virtual server
Virtual server that is managed by the vCenter server and VMware vSphere ESXi.
For details about the Copy-VMGuestFile commandlet, see Cmdlet Reference in the vSphere PowerCLI Documentation.
Use situation
This plug-in is used to execute the script file for specifying the initial OS settings in an environment where the JP1/AO server cannot communicate with the virtual server managed by the vCenter server. By using this plug-in, you can have the vCenter control server send the script to the virtual server through the vCenter server.
Use this plug-in together with script execution through the vCenter server (vsphereInvokeScript plug-in) and file deletion through the vCenter server (vsphereDeleteFileOnGuest plug-in).
Prerequisites
For the most recent information about the prerequisite products on the execution-target server, supported OSs for the prerequisite products on the execution-target server, and prerequisite products on the execution-target system, see the Release Notes.
In addition, the following OS and products use abbreviations. For the abbreviations of OS and products, see the "Preface".
Prerequisite products for the execution-target server:
- VMware PowerCLI
Prerequisite products for the execution-target system:
(1) Prerequisite products for the vCenter server
- VMware vCenter Server
(2) VMware vSphere ESXi instance that manages the virtual server
(3) Prerequisite OSs for the virtual server
In a configuration that is supported by the prerequisite products for VMware vSphere ESXi and the vCenter control server that manage the prerequisite products for the vCenter server and the virtual server, the following OSs are supported:
- Windows Server
- Red Hat Enterprise Linux Server
Supported OSs for the prerequisite products for the execution-target server:
- Windows Server
Conditions for using the prerequisite products for the execution-target system:
(1) VMware vSphere ESXi must be managed on VMware vCenter Server.
(2) Conditions related to the settings on VMware vCenter Server
- Virtual servers must have a unique name.
- The VMware-related name shown below is case-sensitive in VMware. However, it is not case-sensitive in a vSphere PowerCLI instance that is executed from this plug-in.
- Virtual server name
(3) Conditions related to the virtual server
- The virtual server must be running.
- VMwareTools must be installed on the virtual server.
Cautions
(1) Do not specify a string containing a double quotation mark (") or a single quotation mark (') in a property of this plug-in.
(2) For other cautions, see the cautions about the Copy-VMGuestFile commandlet, which are provided in Cmdlet Reference in the vSphere PowerCLI Documentation.
Execution privilege
(1) Users who access VMware vCenter Server must have the following permission:
System administrator role
Version
02.50.00
Plug-in tags
Modify VM,VMware vSphere
Plug-in name displayed in the task log
vsphereSendFileToGuest
Return code
0: Normal
12: Error (Mistake by user) Invalid property
23: Error (Invalid environment) The environment requirements are not met.
27: Error (Check the error details by using the task log.) Unidentified error
41: Error (An error has been detected in the component.) Property not entered (An error has been 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 |
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.guestOSUserName |
User name for logging in to the guest OS |
Specify the user name for logging in to the guest OS. |
-- |
Input |
R |
VMware.guestOSUserPassword |
Password for logging in to the guest OS |
Specify the password for logging in to the guest OS. |
-- |
Input |
R |
VMware.fileOnHost |
Path to the file on execution target server |
Specify the full path of the file on the target server that is the transmission source. |
-- |
Input |
R |
VMware.fileOnGuest |
File path on the guest OS |
Specify the full path of the file on the guest OS that is the transmission destination. |
-- |
Input |
R |
common.returnValue |
Return value for the plugin |
The return value of this plugin stored. |
-- |
Output |
O |