Tag Archives: scp

VmSphere – Copy files from datastore to guest OS

I currently have a minecraft server running on one of my virtual machines on my server. This requires me to move a decent amount of data whenever I update the mods to newer versions. Normally this is only a couple mods that I will push the Jars to dropbox and use wget to download them onto the server. This last weekend however I updated close to 50% of the mods and it was going to be easier to just copy the entire mods folder from my test server (on my desktop) then individually moving each Jar and deleting the older version. This however left me needing to move over 100 MB of data.

The VmSphere client has an easy way to upload files to the hosts datastore. Nothing hard there, push the button and choose the file. The problem I was having was figuring out how to get the file from the datastore into the VMs local filesystem. I found an easy solution of setting up SSH on the host and using scp from the guests console. Setting up SSH from the VmSphere client was easy once I knew where to look. Here is an article with how to turn on SSH and here is the article with using scp. 

TL;DR ssh is turned on in the security profiles configuration and then run scp root@hostserver:/vmfs/volumes/datastorename/path/to/files/*