How to Copy Files Between VirtualBox and Host PC
In this article
You can copy files between a VirtualBox guest and your host computer in two reliable ways: set up a Shared Folder (best for ongoing two-way access) or use drag and drop and the shared clipboard after installing Guest Additions. Shared Folders work on almost every guest OS; drag and drop is convenient but only supported on some guest types, so treat it as a bonus rather than the main method. The steps below assume VirtualBox 6.x or 7.x on a Windows host with a Windows or Linux guest. Menu labels can differ slightly by version, host OS and guest OS.
What You'll Need
- VirtualBox installed on the host, with the guest VM shut down or at least saved before changing settings.
- The VirtualBox Extension Pack is not required for Shared Folders, but Guest Additions must be installed inside the guest for drag and drop, shared clipboard and seamless mouse integration.
- A folder on the host you are willing to share (create one, e.g. C:\VMShare, rather than sharing your whole user profile).
- Administrator rights inside the guest to install Guest Additions and mount folders.
Step-by-Step
- Shut down the guest. From the VM window choose Machine > Shut down (or the ACPI shutdown option) so settings can be applied cleanly.
- Open the VM settings. In the VirtualBox Manager, select the VM and click Settings (or right-click > Settings).
- Create a shared folder. Go to Shared Folders, click the add-folder icon, choose the host folder you want to share, tick Auto-mount, and optionally tick Make Permanent. Note the Folder Name you give it.
- Start the guest and install Guest Additions. With the VM running, use Devices > Insert Guest Additions CD image, then run the installer inside the guest (on Windows, open the CD drive and run VBoxWindowsAdditions.exe; on Linux, run the autorun.sh script from the mounted disc with sudo). Reboot the guest when prompted.
- Access the shared folder. On Windows guests it usually appears under This PC as a network location named after the folder. On Linux guests, mount it manually if auto-mount did not work:
sudo mount -t vboxsf FolderName /mnt/shareafter creating /mnt/share. - Copy files both ways. Drag files into or out of the shared folder in the guest's file manager, or copy them on the host side. Changes appear on both sides immediately.
- Optional: enable drag and drop and clipboard. With the VM running, go to Devices > Drag and Drop and choose Bidirectional, then Devices > Shared Clipboard and choose Bidirectional. Test with a small text file first.
Common Mistakes
- Trying to set up Shared Folders while the VM is running — the settings are greyed out until it is shut down.
- Skipping Guest Additions and then wondering why drag and drop or the clipboard does nothing.
- Sharing an entire drive or user folder instead of a dedicated folder, which exposes more of the host than intended.
- Forgetting the exact Folder Name when mounting on Linux; it is case-sensitive.
- Expecting drag and drop to work on every guest OS — support varies, and Shared Folders is the dependable fallback.
Tips
- Use a dedicated share folder with a short, simple name and no spaces to avoid mount errors on Linux.
- Keep Guest Additions updated after VirtualBox upgrades, since mismatched versions can break shared folders.
- For one-off transfers, a USB drive attached to the guest (Devices > USB) or a temporary network share also works.
- On Windows guests, if the shared folder does not appear, open \\VBOXSVR\ in File Explorer's address bar.
Troubleshooting
Shared folder is missing in the guest. Confirm Auto-mount was ticked and Guest Additions is installed and current. Restart the guest, then check again. On Linux, mount manually with the command above and check dmesg for errors.
Permission denied on Linux. Add your user to the vboxsf group (sudo usermod -aG vboxsf $USER), then log out and back in.
Drag and drop or clipboard not working. Verify Guest Additions, set both Devices menus to Bidirectional, and restart the guest. Some guest OSes simply do not support drag and drop; use Shared Folders instead.
Guest Additions installer fails. On Linux, install kernel headers and build tools first, then rerun the installer. On Windows, run the installer as administrator.
Frequently Asked Questions
Do I need the Extension Pack for file sharing?
No. Shared Folders and Guest Additions cover file copying. The Extension Pack adds USB 2.0/3.0 and other features, not shared folders.
Can I copy files without Guest Additions?
Yes, but clumsily: use a network share, a USB drive passed through to the guest, or an ISO image. Shared Folders needs Guest Additions.
Is drag and drop available on all guest systems?
No. Support is limited and varies by guest OS and VirtualBox version. Shared Folders is the reliable method.
Why is my shared folder read-only?
Check the shared folder settings in the VM and make sure Read-only is unticked. On Linux, also check file ownership inside the guest.
Can I share a folder while the VM is running?
You can add it, but it may not mount until the guest restarts. Shutting down first avoids surprises.