The VirtualBox file manager finally makes the task of copying files to or from virtual machines easy.
If you use (or used) VirtualBox as your virtual machine technology, then you've probably experienced the frustration of moving files between host and guest. As long as you know how to quickly set up Samba shares, it's not much of a problem. But having to use the Shared Folders tool can often be an exercise in futility.
So when the developers of VirtualBox released version 6.0, it came with a new feature, aptly called File Manager, that promised to make sharing files between guest and host incredibly simple.
SEE: Disaster recovery and business continuity plan (Tech Pro Research)
Believe it or not--the developers nailed it. The VirtualBox File Manager finally makes the task of copying files to or from virtual machines incredibly easy. Let me show you how it works.
What you need
The only things you need are a working instance of VirtualBox 6.0 (as this feature isn't found on releases prior to 6.0), a running host operating system, and the latest version of the Guest Additions software.
I'll demonstrate with a Linux host (Elementary OS) and guest (Ubuntu 18.04 desktop).
First, you must install the latest version of the Guest Additions software. Fortunately, VirtualBox makes this easy. Open VirtualBox, fire up your guest operating system and click Devices | Insert Guest Additions CD Image. You should be prompted to automatically run the software (by entering your sudo password). If not, you need to do the following:
- Open the file manager.
- Navigate to the Guest Additions folder (it should appear, mounted on your desktop).
- Click Run Software (Figure A).
Remember, without the latest version of the Guest Additions, the file manager will not work.
Using the file manager
Now, we can use the VirtualBox File Manager. With your guest session running, click Machine | File Manager. In the resulting window (Figure B), type a username and password in the respective text areas.
The credentials must be from a working username on the guest OS (not the host OS). Once you enter those credentials, click Create Session. This will populate the right pane with the file system from the guest OS.
At this point, you can copy files to and from the host and guest as if this were an FTP client or dual-pane file manager. Select a file (or folder) from one source, navigate to the destination folder, and click either the right-pointing arrow (to copy to the guest) or the left-pointing arrow (to copy to the host).
Do note, you can only copy files/folders into directories in which the authenticated user has permission to use. In other words, if you need to copy system files, you probably need to create a special admin user for this specific purpose. If you're guest OS is an operating system that allows root login, you can always use the root credentials (though I advise against that, for security purposes).
Note: when you close the file manager window, you will be logged out of that session (even if you leave the guest OS running). When you open the file manager the next time, you have to authenticate the user and create a new session.
A much-needed feature
This new file manager is long overdue. Anyone that works with VirtualBox on a daily basis will be thrilled to have the easy means to move files/folders back and forth between host and guest.
- VirtualBox 6.0 brings a much needed upgrade to the UI (TechRepublic)
- How to create a bash script for starting VirtualBox VMs (TechRepublic)
- How to create VirtualBox networks with the Host Network Manager (TechRepublic)
- How to enable copy and paste in VirtualBox (TechRepublic)
- VirtualBox zero-day published by disgruntled researcher (ZDNet)
- DevOps: A cheat sheet (TechRepublic)
- The 10 most important iPhone apps of all time (Download.com)
- It takes work to keep your data private online. These apps can help (CNET)
- Programming languages and developer career resources coverage (TechRepublic on Flipboard)