This is an instruction guide on how to upload files to vCenter and ESXi hosts using different methods according to what may be available on the environment.
Use the 2 first methods as preferable ones, the other methods are alternatives in case there are difficulties with these preferable methods
Depending on each environment or situations faced by users, the usage of WinSCP or the Datastore upload will not be possible, hence this article will instruct you with different possibilities
Using WinSCP to upload files to vCenter or ESXi hosts [preferable for vCenter]:
shell /usr/libexec/sftp-server Received too large (1433299822 B) SFTP packet. Max supported packet size is 1024000 B.The error is typically caused by message printed from startup script (like .profile). The message may start with "Unkn".Cannot initialize SFTP protocol. Is the host running an SFTP server?"Login.Yes to accept to save the thumbprint of the server or no to continue without saving (then has to perform that operation every time you connect to the same server)./root/ location in vCenter or in a datastore of the ESXi host./tmp/ just be aware they would be removed on a reboot of the vCenter or ESXi host.vc-support will be saved on /storage/log/Upload" or selecting the file and pressing F5Ok to confirm the upload.Yes", otherwise press "No" and review the file replacement.Uploading files to ESXi datastore using the vSphere Client [preferable for ESXi hosts]:
Datastores" tab of a specific host and click on it.Files" tab.Upload Files" or "Upload Folder" according to your requirements.The operation failed. Details...", follow the steps of Uploading files through vSphere Client you receive the following error: "The operation failed for an undetermined reason" This can resolved by clicking on the link of the ESXi host that appears on the error to open a new tab in the browser, then after accepting the certificates of that host, go back to vSphere Client and repeat the upload steps (no need to login to the host).Uploading files to ESXi datastore using the Host Client:
https://ESXi_FQDN_OR_IP/uiStorage" on the left panel.Datastore Browser"Upload".Uploading files to vCenter if WinSCP is not available:
It is required that SSH be enabled on the vCenter VAMI for this method, then you can use the SCP command on Linux or Windows PowerShell (newer versions):
On executing the SCP command for the first time to a server, it is required to accept the certificate thumbprint of that destination server: just type "yes" and press ENTER.
How to copy a file from one location to another using scp command (push from source to the destination):
scp /SOURCE_FOLDER/sourcefile.file root@HOSTNAME_OR_IP:/DESTINATION_FOLDERThis can be useful to push files from a datastore in an ESXi host to a location inside vCenter, using the steps above to upload files to a host datastore.
scp /vmfs/volumes/DATASTORE/filename.file root@VCENTER_FQDN_OR_IP:/DESTINATION-FOLDER/You can use this same method to upload or download files on ESXi host datastore if WinSCP or vSphere client or Host Client are accessible.
To Download:
scp root@HOSTNAME_OR_IP:/vmfs/volumes/DATASTORE/filename.### /DESTINATION-FOLDER/To Upload:
scp /SOURCE_FOLDER/filename.file root@VCENTER_FQDN_OR_IP:/vmfs/volumes/DATASTORE/SUBFOLDER/
For vCenter, you can mount a temporary NFS server.
NFS shares are easily created, it is possible to enable the feature on Windows or Linux with few steps, check with your operating system vendor for steps to enable NFS server with shared folder.
To mount a NFS share on vCenter:
mkdir /root/NFSmount -f nfs NFS_SERVER_FQDN_OR_IP:/NFS_SHARE_NAME /root/NFScp" command.cp /root/NFS/filename.file /root/umount /root/NFSTo mount NFS share on ESXi hosts:
You can create an ISO with the files required for the upload then attach that ISO to vCenter and ESXi hosts.
Note that to create the ISO you have to use any third party tool that has that ability.
Follow these steps to make vCenter be able to access the required files on vCenter:
mount /dev/sr0 /mnt/cdromcp /mnt/cdrom/filename.file /root/umount /mnt/cdrom
Use the steps from Mounting ISO for installing specific VIBs to mount a CD-ROM to an ESXi host.
Summarized steps:
vmkload_mod iso9660sish -e set /vmkModules/iso9660/mount $(esxcfg-mpath -b | grep "CD-ROM" | awk '{print $1}')/vmfs/volumes/mpx.vmhba64:C0:T0:L0 (or other location depending on the CDROM device in the hardware)vsish -e set /vmkModules/iso9660/umount $(esxcfg-mpath -b | grep "CD-ROM" | awk '{print $1}')vmkload_mod -u iso9660Detach the ISO from the host.
With the recommendations above, you can use combinations on getting the files uploaded, for instance:
Note: The use of WinSCP is at your own discretion. Since it is a third party tool, support for this tool is not provided by Broadcom support, and any issues or configurations related to it are the responsibility of the user.