VirtualBox Guest Additions and Shared Folders
With respect to clipboard sharing:
- Bidirectional clipboard sharing is currently enabled by default in Whonix ™ VirtualBox VMs.  There are security reasons to disable clipboard sharing, for example to prevent the accidental copying of something (non-)anonymous and pasting it in its (non-)anonymous counterpart such as a browser, which would lead to identity correlation.
- For Whonix-Gateway ™, unidirectional clipboard sharing from the host to Whonix-Gateway ™ is allowed. This is not insecure, because Whonix-Gateway ™ is not supposed to be used as a workstation. No internet-facing client application are in use there, meaning whatever "leaked" to Whonix-Gateway ™ stays there because users do not run browsers or similar applications.
Shared folders are also discouraged because it weakens isolation between the guest and the host. Providing a mechanism to access files of the host system from within the guest system via a specially defined path necessarily enlarges the attack surface and provides a potential pathway for malicious actors to compromise the host.   
To change the clipboard sharing setting:
- Power off the virtual machine. 
- Navigate to
VirtualBox machine settings→
- Set the preferred configuration:
Guest to Host,
Host to Guestor
- Power on the virtual machine again.
To learn more, see: VirtualBox Manual - Chapter 3. Configuring Virtual Machines [archive].
If you are using a Whonix-Custom-Workstation ™ additional steps are required. Please click on expand on the right.
Two options exist: automatic mounting or manual mounting. The automatic mounting method is described below. For additional information on shared folders refer to the VirtualBox manual [archive]. Any additional questions are unspecific to Whonix and should be addressed as per the Free Support Principle.
- Install VirtualBox guest additions inside the VM. 
- Add the user that will utilize shared folders from inside the VM to group
sudo addgroup user vboxsf
- A reboot is required to make group changes take effect.
- Follow the instructions above.
VirtualBox Guest Additions
In Whonix ™, VirtualBox guest additions are installed by default. 
To avoid any issues with the guest additions, users are highly recommended to:
- Use the Recommended VirtualBox Version for use with Whonix ™.
- Leave installation of the recommended version of VirtualBox guest additions to Whonix ™ as dcoumented and to avoid manual installation. This documentation will be updated as required. Check back later in case you have issues.
VirtualBox guest additions from package
virtualbox-guest-additions-iso installation helper by Whonix ™ developers (
vbox-guest-installer [archive]) will keep guest additions updated when Whonix ™ is updated.
Earlier Whonix ™ versions, used to install package
virtualbox-guest-x11 by default. This currently will not work and is discouraged. (technical details)
VirtualBox Guest Additions CD
It Whonix ™ it is therefore unnecessary and discouraged to install guest additions from a VirtualBox CD. Do
. Doing so could lead to version conflicts of the VirtualBox host version versus the VirtualBox guest additions version such as black screen, screen resolution bug, broken host to VM copy/paste and similar. 
Insert Guest Additions CD image...
If you are using other operating systems (custom workstation), using VirtualBox Guest Additions CD is OK. In that case, issues should be resolved as per Free Support Principle because it would be unrelated to Whonix ™.
VirtualBox Guest Additions Security
General concerns have been raised about the security of VirtualBox, for example see the article The VirtualBox Kernel Driver Is Tainted Crap [archive] . However, this refers to the kernel driver (on the host), not guest additions. For opposite viewpoints, see here [archive] and here [archive].
It is possible to achieve similar functionality without installing guest additions:
- For file exchange with Whonix ™, see: File Transfer and File Sharing.
- To achieve a higher screen resolution, see: Higher Screen Resolution without VirtualBox Guest Additions.
- To achieve mouse integration, it is possible to set a USB tablet in VirtualBox settings. This is recommended against because it requires adding a USB controller to VirtualBox. (
Right-click on Virtual Machine→
Enable absolute pointing device)
This is discouraged and should not be required. However, if you wish to uninstall VirtualBox guest additions as installed by
vbox-guest-installer by Whonix ™ developers, follow the steps below.
- Purge package
virtualbox-guest-additions-iso. This will result in
vbox-guest-installerby Whonix ™ developers in future doing effectively nothing.
sudo apt purge virtualbox-guest-additions-iso
- Remove VirtualBox guest additions (previously installed by Whonix ™ from
virtualbox-guest-additions-iso. Run VirtualBox guest additions uninstaller by VirtualBox developers.
To help debug issues, inspect the following logs and services.
sudo systemctl status vboxadd
sudo systemctl status vboxadd-service.service
ls -la /opt/VBoxGuestAdditions-*/init/
No issues yet.
If the following message appears during a kernel upgrade, it is a non-issue.
/etc/kernel/postinst.d/vboxadd: VirtualBox Guest Additions: Building the modules for kernel 5.6.0-0.bpo.2-amd64. Failed to rename process, ignoring: Operation not permitted update-initramfs terminated by signal TERM.
- VirtualBox Guest Additions Installation Technical Details
- VirtualBox Guest Additions ISO Freedom vs Non-Freedom
- Host -> Whonix-Gateway clipboard sharing enable by default? [archive]
- https://forums.whonix.org/t/security-risks-of-virtualbox-shared-folders/10119 [archive]
- To learn more about VirtualBox shared folders, see: VirtualBox Manual - Chapter 4. Guest Additions [archive].
- Admittedly, this recommendation does not have a strong rationale. Disabling additional features in other virtualizers or general applications will similarly lead to less code paths being utilized and arguably increasing security. VirtualBox software is not special in this regard.
- Because otherwise you cannot change VirtualBox VM settings.
- Using /lib/systemd/system/mnt-shared-vbox.service [archive].
- If the option is unavailable, upgrade VirtualBox.
/home/user/sharedcan be chosen. The VirtualBox default means that folder would be owned by owner
This is specific to the VirtualBox version; newer versions do not have this option anymore.
Make Permanentif this setting should persist after restart of the virtual machine. Otherwise this setting will be temporary.
- This step is required. Quote VirtualBox Manual - Chapter 4. Guest Additions [archive]:
With the shared folders feature of Oracle VM VirtualBox, you can access files of your host system from within the guest system. This is similar to how you would use network shares in Windows networks, except that shared folders do not require networking, only the Guest Additions.
- Installation of VirtualBox guest additions from CD might also cause issues. [archive]
- http://www.webcitation.org/6HqJVN0br [archive]
- https://www.whonix.org/w/index.php?title=Ga&action=edit [archive]
This is a wiki. Want to improve this page? Help is welcome and volunteer contributions are happily considered! Read, understand and agree to Conditions for Contributions to Whonix ™, then Edit! Edits are held for moderation. Policy of Whonix Website and Whonix Chat and Policy On Nonfreedom Software applies.
Copyright (C) 2012 - 2020 ENCRYPTED SUPPORT LP. Whonix ™ is a trademark. Whonix ™ is a licensee [archive] of the Open Invention Network [archive]. Unless otherwise noted, the content of this page is copyrighted and licensed under the same Freedom Software license as Whonix ™ itself. (Why?)