VirtualBox is installed on Windows via Chocolatey as part of this project (install_virtualbox: true in group_vars/windows.yaml).
- Open VirtualBox and click New.
- Enter a name, select the OS type and version.
- Allocate RAM and CPU cores (4096 MB and 4 CPUs recommended).
- Create a VDI virtual disk.
- Before starting the VM, open Settings:
- Display → Screen → Video Memory: 128 MB, enable 3D Acceleration
- General → Advanced → Shared Clipboard: Bidirectional
- General → Advanced → Drag and Drop: Bidirectional
Guest Additions provide clipboard sharing, folder sharing, display scaling, and better mouse integration.
Arch Linux:
sudo pacman -S virtualbox-guest-utils
sudo systemctl enable --now vboxserviceUbuntu/Debian:
sudo apt update
sudo apt install virtualbox-guest-utils virtualbox-guest-x11Fedora:
sudo dnf install virtualbox-guest-additions
sudo systemctl enable --now vboxserviceAlternatively, use the ISO method for any Linux distro: in VirtualBox menu go to Devices → Insert Guest Additions CD Image, then inside the guest run:
sudo /media/cdrom/VBoxLinuxAdditions.run
- In the VirtualBox menu, click Devices → Insert Guest Additions CD Image.
- Inside the Windows guest, open File Explorer and run
VBoxWindowsAdditions.exefrom the mounted CD. - Complete the installer and reboot the guest.
Clipboard is enabled via the VirtualBox Settings → General → Advanced → Shared Clipboard: Bidirectional setting (set this before starting the VM).
Linux guest — if clipboard is not working after reboot:
Start the clipboard client manually:
VBoxClient --clipboardTo make it start automatically, add to ~/.bashrc or your desktop autostart:
VBoxClient --clipboard &With vboxservice enabled (Arch, Fedora), the clipboard client starts automatically. The manual command above is only needed on distros that install virtualbox-guest-x11 without a systemd service.
- In VirtualBox VM settings, go to Shared Folders and click Add.
- Set:
- Folder Path:
C:\Users\<username>\Documents\VM-Share(create the folder first if it does not exist) - Folder Name:
VM-Share - Auto-mount: checked
- Make Permanent: checked
- Folder Path:
- Click OK and start the VM.
-
Create the mount point inside the guest (replace
<username>with your actual username):mkdir -p ~/Documents/VM-Share -
Test the mount manually to confirm it works:
sudo mount -t vboxsf VM-Share ~/Documents/VM-Share -
To make the mount permanent, add this line to
/etc/fstabinside the guest (replace<username>with your actual username):VM-Share /home/<username>/Documents/VM-Share vboxsf defaults,uid=1000,gid=1000,dmode=0755,fmode=0755 0 0 -
Apply:
sudo systemctl daemon-reload sudo mount -a
The
uidandgidvalues map the shared folder to your Linux user. Runidinside the guest to confirm your UID and GID if they differ from 1000.