Map a Host Folder in VirtualBox Guest on Windows 11
In this article
Yes, you can map a host folder in a VirtualBox guest on Windows 11 by using the Shared Folders feature.
Mapping a host folder lets the guest operating system read and write files that reside on the host machine without needing separate network shares or external drives. This is especially useful for developers, testers, or anyone who wants a seamless workflow between the host and the virtual environment. The process requires VirtualBox to be installed on the host, the guest OS to be running, and the VirtualBox Guest Additions to be present inside the guest.
What You'll Need
- Oracle VirtualBox installed on the Windows 11 host (latest stable release is recommended).
- A virtual machine that is already created and powered on.
- VirtualBox Guest Additions ISO mounted and installed inside the guest OS.
- Administrative rights on both the host and the guest (required to create shared folders and mount them).
Step-by-Step
- Install Guest Additions in the guest.
Start the VM, then open the VirtualBox menu Devices > Insert Guest Additions CD image…. Inside the guest, run the installer (usuallyVBoxWindowsAdditions.exefor Windows guests orVBoxLinuxAdditions.runfor Linux guests). Follow the prompts and reboot the guest when the installation finishes. - Create the folder you want to share on the host.
On Windows 11, open File Explorer, navigate to the location, right‑click and choose New > Folder. Give it a clear name, for exampleSharedData. Ensure the folder permissions allow read/write for the user account that runs VirtualBox. - Define the shared folder in VirtualBox settings.
With the VM powered off, select it in the VirtualBox Manager and click Settings. Go to Shared Folders on the left pane, then click the plus icon to add a new entry. Set Folder Path to the host folder you created, give it a Folder Name (this will be the name seen inside the guest), and check Auto‑mount and Make Permanent. Click OK to save. - Start the VM and verify the mount.
When the guest boots, VirtualBox will attempt to mount the shared folder automatically. In a Windows guest, open File Explorer and look for a network drive labeled\VBoxSF\FolderNameor a drive letter under This PC. In a Linux guest, open a terminal and runls /media/sf_FolderName(the default mount point). If the folder does not appear, you can manually mount it: for Windows, usenet use X: \VBoxSF\FolderName; for Linux, runsudo mount -t vboxsf FolderName /mnt(replace/mntwith your desired mount point). - Adjust permissions if necessary.
On Windows guests, the shared folder is accessible to users that belong to thevboxsfgroup (Linux) or theAdministratorsgroup (Windows). If you encounter “Access denied”, add your user to the appropriate group or run the file manager as Administrator. On Linux, usesudo usermod -aG vboxsf $USERand then log out and back in. - Test read/write operations.
Create a test file inside the shared folder from the host, then open it from the guest. Modify the file in the guest and verify the changes appear on the host. This confirms the mapping works both ways.
Common Mistakes
Many users forget to install Guest Additions before configuring a shared folder, which results in the VBoxSF driver being unavailable. Another frequent error is using a folder path that contains special characters or spaces that are not escaped correctly; VirtualBox may reject the path silently. Forgetting to enable Auto‑mount causes the folder to exist in the VM settings but never appear inside the guest. Finally, on Linux guests, neglecting to add the user to the vboxsf group leads to permission denied errors when trying to access the mount point.
Tips
- Use short, alphanumeric folder names to avoid path‑parsing issues.
- Enable the Make Permanent option so the shared folder persists after VM restarts.
- For large data transfers, map the folder as a dedicated drive letter in Windows guests to simplify navigation.
- Keep Guest Additions up to date; each VirtualBox release may include bug fixes for the shared‑folder driver.
- If you need read‑only access, clear the Auto‑mount box and mount the folder manually with the
rooption on Linux.
Troubleshooting
Step 1 – Verify Guest Additions: Open the guest and check that the VBoxService process is running (Windows) or that the vboxsf module is loaded (Linux, run lsmod | grep vboxsf). Reinstall Guest Additions if the module is missing.
Step 2 – Check VirtualBox version compatibility: Mismatched host and guest versions can break shared folders. Ensure both the host application and the Guest Additions share the same major version number.
Step 3 – Review folder permissions: On the host, right‑click the shared folder, select Properties > Security, and confirm that the user running VirtualBox (often your Windows account) has Full Control. On the guest, verify that the user belongs to the correct group as described earlier.
Step 4 – Re‑mount manually: In a Windows guest, open Command Prompt as Administrator and run net use X: \VBoxSF\FolderName /persistent:no. In a Linux guest, create a mount point (sudo mkdir /mnt/shared) and run sudo mount -t vboxsf FolderName /mnt/shared. Observe any error messages for clues.
Step 5 – Disable and re‑enable the share: Open the VM settings, remove the shared folder entry, apply changes, then add it again. This can clear stale configuration data.
If none of the above resolves the issue, consider resetting the VM’s network adapter to NAT or Bridged mode, as some network configurations interfere with the VirtualBox internal host‑only communication used by shared folders.
Frequently Asked Questions
Can I share a folder with a Windows 11 host and a Linux guest?
Yes. The Shared Folders feature works across host and guest operating systems, provided Guest Additions are installed in the Linux guest and the user is added to the vboxsf group.
Do I need an internet connection for shared folders to work?
No. Shared folders use VirtualBox’s internal host‑only communication channel and do not require any external network connectivity.
Why does the shared folder appear as a network location instead of a drive letter?
VirtualBox mounts the folder under the \VBoxSF\ namespace by default. You can assign a drive letter manually with the net use command in a Windows guest.
Is there a size limit for files transferred through a shared folder?
VirtualBox does not impose a specific size limit, but extremely large files may be affected by host filesystem limits or available disk space.
Can I set the shared folder to read‑only?
Yes. In the Shared Folders settings, leave the Auto‑mount box unchecked and mount the folder manually with the appropriate read‑only flag (for example, mount -t vboxsf -o ro FolderName /mnt on Linux).