VMware Cloud Community
cookieme
Enthusiast
Enthusiast

Copy file from local datastore to Ubuntu Server VM

I know how to download files/folders from the local datastore to a Windows VM by using the web access, but I have no idea how to do this from the command line of an Ubuntu VM. Can I use wget?

Thanks

Reply
0 Kudos
8 Replies
vmroyale
Immortal
Immortal

Hello.

Use scp:

scp user@esxhost:/tmp/filename /home/username/filename

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
cookieme
Enthusiast
Enthusiast

Hello.

Use scp:

scp user@esxhost:/tmp/filename /home/username/filename

Good Luck!

Ah this requires that I use the unsupported console to enable ssh. Out of curiosity is there another way to do it?

Thanks

Reply
0 Kudos
sjadapa
Enthusiast
Enthusiast

You can use veeam fast scp ( free tool ) to copy files from different hosts and vm.

One of the feature:

Veeam FastSCP uses SSH as a control channel to generate a one-time

username and password for each file transfer session. Veeam FastSCP

does not require putting ESXi into “unsupported” mode or compromise its

security by enabling additional services.

****If you find this or any other answer useful please consider awarding points by marking the answer CORRECT or HELPFUL ****

Jadapa RHCE, MCSA

Message was edited by: sjadapa

****If you find this or any other answer useful please consider awarding points by marking the answer CORRECT or HELPFUL **** Shankar Jadapa (RHCE, MCSA, VCP 5 ) http://linuxgurus.wordpress.com
Reply
0 Kudos
vmroyale
Immortal
Immortal

Check out the VMware vSphere CLI.

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
Reply
0 Kudos
cookieme
Enthusiast
Enthusiast

Yeah, I'm trying to install the vCLI in my Ubuntu VM so that I can do a few different things, but first I need to get the tgz into the VM. Hence, my question Smiley Wink I was thinking of using wget to download it but I can't get a direct download link from vmware.

Thanks

Reply
0 Kudos
sjadapa
Enthusiast
Enthusiast

You can also use winscp to copy the tgz file to vm

****If you find this or any other answer useful please consider awarding points by marking the answer CORRECT or HELPFUL **** Shankar Jadapa (RHCE, MCSA, VCP 5 ) http://linuxgurus.wordpress.com
Reply
0 Kudos
cookieme
Enthusiast
Enthusiast

OK, after about 2 hours I have figured it out. Using wget on the Ubuntu VM I can now download a file using:

wget --http-user=root --http-password=PASS 'http://esxi/folder/'

Maybe useful to someone else.

Reply
0 Kudos
lamw
Community Manager
Community Manager

You can also use VMware VIX to accomplish this task, take a look here for some examples: http://www.engr.ucsb.edu/~duonglt/vmware/#vmware_vix

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos