Transfer Files Between Windows and VirtualBox
To transfer files between a Windows host and a VirtualBox virtual machine, use the built-in Shared Folders feature, drag-and-drop, or a shared clipboard. This article covers all three methods, plus USB drives and network sharing, so you can pick the one that fits your setup.
Why File Transfer Is Not Automatic
VirtualBox runs a guest operating system inside a window on your host. By default, the two systems are isolated for security and stability. The guest sees its own virtual hard drive, and the host doesn’t expose your personal files to it. That isolation is useful, but it means you must explicitly enable any file sharing. VirtualBox offers several mechanisms, each with different trade-offs in speed, convenience, and security.
Method 1: Shared Folders (Best for Large Batches)
Shared folders are the most reliable way to move many files or large files. You designate a folder on your Windows host, and the guest sees it as a network drive.
- With the VM powered off, open Settings → Shared Folders.
- Click the folder-plus icon to add a new shared folder.
- Choose the host path (e.g.,
C:\Users\YourName\Shared). - Check Auto-mount and Make Permanent.
- Optionally check Read-only if you want to prevent the guest from modifying host files.
- Start the VM. In Windows guest, open File Explorer and look for the mapped drive (usually
VBOXSVRor a drive letter). In Linux guests, it appears under/media/or/mnt/.
If the folder doesn’t appear, you may need to install Guest Additions (see below). For Linux guests, you might also need to add your user to the vboxsf group: sudo usermod -aG vboxsf $USER, then log out and back in.
Method 2: Drag-and-Drop and Shared Clipboard
For quick, small transfers, enable drag-and-drop. This works both ways (host to guest and guest to host) if you set it that way.
- Go to Settings → General → Advanced.
- For Drag and Drop, select Bidirectional or Host to Guest.
- For Shared Clipboard, select Bidirectional if you also want to copy-paste text and files.
- Start the VM. Now you can drag a file from your Windows desktop into the guest window.
Drag-and-drop is convenient, but it can be flaky with very large files or certain guest OS versions. If it fails, fall back to shared folders.
Method 3: USB Drives and External Storage
You can plug a USB stick into your host and pass it through to the guest.
- With the VM running, click the USB icon in the bottom-right of the VirtualBox window.
- Select your USB device from the list. It will disconnect from the host and appear in the guest.
- Copy files as usual, then eject it from the guest before unplugging.
This requires the VirtualBox Extension Pack for USB 2.0/3.0 support. Without it, only USB 1.1 devices work. The extension pack is free but has a proprietary license.
Method 4: Network Sharing (SMB or FTP)
If your VM is set to Bridged or Host-Only networking, you can use standard network protocols.
- On the host, share a folder via Windows File Sharing (right-click → Properties → Sharing).
- In the guest, open File Explorer and type
\\host-ip\sharename(or use the hostname). - Alternatively, run an FTP server on either side and connect with a client.
This method is slower to set up but works across reboots and doesn’t rely on VirtualBox-specific features.
Guest Additions: The Missing Piece
Most transfer methods require Guest Additions – a set of drivers and utilities that improve integration. Without them, shared folders and drag-and-drop won’t work, and the screen resolution will be stuck at a low default.
- With the VM running, click Devices → Insert Guest Additions CD image.
- Inside the guest, open the CD drive and run the installer (Windows) or the
VBoxLinuxAdditions.runscript (Linux). - Reboot the guest.
Always install Guest Additions after creating a new VM – it solves most integration problems.
Common Problems and Fixes
- Shared folder is greyed out – The VM must be powered off to add a new shared folder. You can also add temporary ones from the Devices menu while running.
- Drag-and-drop does nothing – Check that Guest Additions are installed and that you set the direction correctly. Try restarting the guest.
- USB device not recognized – Install the Extension Pack, then enable USB controller in VM settings (USB 2.0 or 3.0).
- Shared folder shows as empty – In Linux guests, you may need to mount it manually:
sudo mount -t vboxsf shared_folder_name /mnt/point. - Permission denied on shared folder – Ensure the folder’s Windows permissions allow the user account the VM uses. For Linux guests, check the
vboxsfgroup membership.
Which Method Should You Use?
For most users, shared folders are the best choice: they handle large files, work in both directions, and survive reboots. Use drag-and-drop for quick one-off transfers. Use USB when you need to move files to a physical device or when the guest needs to read a drive directly. Network sharing is useful if you already have a home network or need to transfer between multiple machines.
If you only need to copy a few small files, the shared clipboard (copy-paste) can even transfer file contents, though it’s not ideal for binaries.
Frequently Asked Questions
Why can’t I drag and drop files?
Most likely Guest Additions are not installed, or the drag-and-drop setting is set to Disabled. Check both in Settings → General → Advanced. Also, some Linux guests require the xcopy package for drag-and-drop to work.
How do I share a folder permanently?
In VM Settings → Shared Folders, add the folder and check Make Permanent. It will then be available every time you start the VM. Temporary folders added from the Devices menu disappear when the VM shuts down.
Can I transfer files from the guest to the host?
Yes. Shared folders and drag-and-drop both support bidirectional transfer if you set them to Bidirectional. For USB, you would need to unplug the device and plug it back into the host after copying.
Is it safe to share a folder with a VM?
It’s safe as long as you trust the software inside the guest. A compromised guest could read or modify any shared folder. Use Read-only sharing if you don’t need the guest to write to the host. Never share your entire C:\ drive.
Why is my shared folder not showing up in Linux?
You may need to install Guest Additions and add your user to the vboxsf group. After that, the folder should auto-mount under /media/. If not, mount it manually with sudo mount -t vboxsf sharename /mnt.
Can I use a cloud drive to transfer files?
Yes, you can install Dropbox, Google Drive, or OneDrive in both the host and guest. This works but requires internet and uses your cloud storage quota. It’s a good fallback if VirtualBox features fail.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.