Getting Large Files Onto Your VMware Home Lab
In a VMware home lab environment, we often need to upload large files to our VMs.
When initially setting up our lab, this will generally mean lots of large mountable .iso images for installing operating systems. We can upload these easily to a datastore and mount them directly to a VM’s virtual CD/DVD drive.
But what about non-mountable media? How can we get large .exe and archive files onto our VMware VMs? How can we transfer entire directories? And can we be more efficient with our lab storage, considering we might not have a whole lot of lab storage to spare?
Writing to ISO
The first method is only useful if you’re badly stuck. We can add any number of files to an ISO image and mount them to a VM them using the previously mentioned method.
ImgBurn is perfect for this purpose; it’s free, lightweight, and unlike other “free” burning tools doesn’t appear to have a file size limit (Power ISO for example has a 500MB limit on its free version). As you can see below, ImgBurn allows us to write files or entire folders to a disk, and save it as an ISO file:
This is not a method you would want to use too often, but useful occasionally or when you’re badly stuck.
Drag and Drop within VMRC/Workstation
I use both VMware Workstation and VMRC (VMware Remote Console) extensively at work and when studying. I hope I can be corrected on this, but I have not found any way to transfer large files from a local machine to a VM on a remote ESXi 6.x host using copy/paste or drag/drop onto a VM.
I believe this may have been possible in previous ESXi versions, and it is possible when running VMs locally within VMware Workstation, but I believe for security reasons it was dropped from ESXi at some stage. There are articles suggesting modification of a VMs advanced parameters, adding isolation.tools attributes, but I find this only allows copy/paste of text.
Direct drag/drop would absolutely be the best way to transfer files to a remote lab VM, so if anybody has had any success with this, please let me know!
RDP File Transfer
RDP has the ability to transfer files from a local drive to the remote machine you are connected to. When starting RDP, expand the “Show Options” dropdown, select “Local Resources”, and tick any drives you want access to on the remote machine.
On the remote machine, you will see these drives mounted in the file system with your local machine’s hostname next to them:
Slightly quicker and more flexible than writing to ISO, but still not a very efficient method.
Share drive accessible from LAN and Lab
My favourite method to share files with a home lab is to have a share drive that is accessible from both your home network and your lab network.
This likely involves creating some routing and rules on your lab firewall that you would never make in a real production environment. For example, I have a NAS device on my home network hosting programs, movies, photos etc. I’ve created a shared folder on that device to store any files I want access to in my lab. The device is on a segment of my home network that is shared by the outside address of my home lab’s firewall, so in a way the NAS is in an untrusted “internet” zone to my home lab. You would never expose SMB to the internet like this, but out of convenience it’s acceptable in the lab. A nice bonus of this method is that the storage is always available, unlike datastores on the home lab, which if you’re like me only runs for a few hours at a time. I’m also not consuming any storage on my home lab server disks.
SFTP
A slightly more realistic method, while still flexible and quick, is to set up an SFTP connection from the PC on your home network to an SFTP file server on your home lab. While the previous SMB method is not something that should ever be done outside of a lab, secure file transfer over SFTP from the internet to an internal server is a lot more common.
Setting up the required routing and firewall rules is good practice, especially if you lock it down as securely as possible, and using a client like WinSCP makes transfer of files from local machine to remote very quick and easy once it’s all set up.
Conclusion
Depending on your home lab design, it can be a major pain to get large files onto lab VMs. If you want to keep your home lab strictly like a “real” environment, you may be even more limited in your options, but for convenience I recommend storage accessible to both your lab and home network.
If I’ve missed any obvious method, please let me know…especially if you have drag/drop from Workstation/VMRC working!