Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

Upload files to vmware ESXi datastore: Different methods

Copying files to VMware Datastores is an easy task. Here in this article, I am showing 3 different methods to upload files to VMware datastores, You can use these methods to copy offline bundle zip, VIB, VMDK or ISO files. Ifyou are using VMWare vSphere web client to upload files to datastore, make sure DNS server entry is added for esxi server in DNS server

Method 1

Login to Vmware Vsphere web client, Select Esxi server or datastore, on the Configure tab / Manage tab for esxi, Select Storage/ Datastores, right click datastore, where you want to upload files, click Browse Files from context menu. 

vmware vsphere esxi storage datastores shared disk lun disk browse files, upload files to datastore, vcenter.png

Next this shows the Files and folder inside select datastore, click upload a file to the Datastore button. This popup opens new browse file wizard, From list select the file you want to upload and click open.

vmware vsphere esxi, esxi offline bundle shared disk datastore lun storage, upload a file, zip bundle, error no disk space

Next you can monitor the progress of uploading file on selected datastore.

vmware vsphere esxi, datastore upload file, lun storage, upload progress, offline bundle upload datastore files upload, disk space error.png

SubMethod 1.1

In case if you have standalone Esxi server and no vCenter is available, connect directly to Esxi using url https://esxi002.vcloud-lab.com/ui. here you should aware of root password. Files can be copied on directly connected Esxi. As shown in the screenshot, go to storage, double click the the datastore where you want to copy files, select Datastore browser, next from the wizard upload the file, it takes time based on file size.

Reset forgotten ESXi root password on Domain joined Esxi using vSphere web client and Powercli
Reset ESXi root password using Host Profiles on vCenter server: VMWare vSphere Web client
Resolved: Reset Esxi forgotten root password using hiren bootCD step by step

vmware vsphere esxi ui, wb client, datastore browser, upload file, shared disk, powercli, powershell, manage esxi, monitor vsphere vcenter


Method 2

In the next method, File can be uploaded using winscp or any other tool which supports SCP protocol, to use winscp enable SSH service on the esxi first VMWARE SECURITY BEST PRACTICES: POWERCLI ENABLE OR DISABLE ESXI SSH. Login to the ESXi using root password or with domain account. Drag and drop the selected file to right hand side on ESXi server, All the datastores are mounted under /vmfs/volumess.

vmware vsphere esxi vcenter upload esxi offline bundle zip, winscp tool upload file.png


Method 3

This method is my favorite one of using VMware Vsphere powercli to upload files on datastore, VMWARE VSPHERE POWERCLI INSTALLATION AND CONFIGURATION STEP BY STEP. first use Connect-VIServer command to login either vCenter or Esxi server where you want to upload copy file. Once logged in successful, Run command to show valid powershell datastore drives.
Get-PSDrive -PSProvider VimDatastore

Next to list the files and folder within directory use below command, Here from GUI you can see how folder path is listed under datastores view and it consist of foldername, datacenter and datastore name.
dir vmstore:\India\Pune\Share-Disk01

POWERCLI INITIALIZE-POWERCLIENVIRONMENT.PS1 CANNOT BE LOADED BECAUSE RUNNING SCRIPTS IS DISABLED

vmware vsphere esxi, connect-viserver, get-psdrive, dir vmstore, datastore, storage upload files to esxi using powercli, copy-datastoreitem, powershell

In the directory listing I can see the files files and folder, One screenshot is from commandline and another is from vsphere web client. I have already downloaded required vib zip files under folder on my windows system C:\temp\EsxiApps. Start copying file using below command.
Copy-DatastoreItem -Item C:\Temp\EsxiApps\VIb.zip -Destination vmstore:\India\Pune\Share-Disk01

List the directory items using below command again. File should be listed and you can verify the saem from GUI.
dir vmstore:\India\Pune\Share-Disk01

vmware vsphere esxcli, copy-datastoreitem, datastore copy file powercli esxi, get-datastore, vmstore, vib file, offline bundle zip file upload to datastore, install.png

In the next command I am using same task but different way, mounting datastore drive in PowerCLI,
Get-Datastore Share-Disk01 | New-DatastoreDrive -Name DS

Drive is mounted and This command list the new mapped drive.
Get-PSDrive -PSProvider VimDatastore

Now I can directly list the files and folder from the new mapped drive.
Dir Ds:\

And use simmilar drive to copy files to destination mapped drive.
Copy-DatastoreItem -Item C:\Temp\EsxiApps\VIBfile.zip -Destination DS:\
Dir Ds:\

get-datastore, new-datastoredrive, get-psdrive psprovider vimdatatstore, dir, copy-datastoreitem, vmware vsphere vcenter esxi powercli, commandline

In the last one of the method I even used is login to NFS server or upload files to NFS drive directly and copy files. Microsoft Windows 2016 Install and configure NFS server for ESXi and Linux.

Useful Articles
VMWare Web Client: Datastore browse files upload copy failed error
VMWARE ESXI INSTALL AND CONFIGURE SOFTWARE ISCSI STORAGE ADAPTER FOR VMFS VERSION 6 DATASTORE
Unmount NFS datastores from VMware ESXi and NFS is in use

Go Back



Comment

Blog Search

Page Views

11240719

Follow me on Blogarama