- OpenVPN IPv6 and IPv4 configuration - Mon, Mar 1 2021
- 4sysops author and member competition 2020 - Fri, Jan 1 2021
- Assign an IPv6 address to an EC2 instance (dual stack) - Tue, Dec 15 2020
Install latest Guest Additions ^
Before you can work with copy and paste, you have to install the VirtualBox guest additions. Once you start the virtual machine, click the Devices menu, and then select Insert Guest Additions CD image.
Install VirtualBox Guest Additions
The Guest Additions CD image should be mapped to drive D:.
CD drive Virtual Guest Additions
To install the Guest Additions launch VBoxWindowsAdditions.exe. After you reboot the virtual machine, you can enable copy/paste on the Devices menu of the VM under Shared Clipboard. If you are testing software that you don’t trust, you might want to only enable Host To Guest. I usually enable bidirectional shared clipboard when I am working with multiple virtual machines, so I can copy and paste from VM to VM.
Enable copy and paste in VirtualBox
You also can enable copy/paste in the VM’s General settings on the Advanced Tab. The VM settings can be opened in the VirtualBox Manager or through the key combination HOST + S.
Shared clipboard in VM settings
Update Guest Additions ^
This is the theory. In practice, I found that copy/paste often isn’t working properly. One possible cause is that you are working with outdated Guest Additions. This is often the case if you updated the VirtualBox but not the Guest Additions on the VM. If you didn’t use the VM for a while and copy/paste causes problems, you should reinstall the Guest Additions.
Reboot the virtual machine ^
Sometimes, the shared clipboard works just fine for a while, and then suddenly you no longer have access to the host clipboard on the VM. This can happen for various reasons. One problem I often encounter is that, after I hibernate the host or the guest, copy/paste no longer works even though it is still enabled in the VM settings. Rebooting the VM usually solves the problem. In some cases, I also had to reboot the host.
Restart the Guest Additions Tray Application ^
If you are in the middle of a test with numerous open applications and windows, rebooting the VM can be very annoying just for making copy and paste work again. In these situations, you can just restart the VirtualBox Guest Additions Tray Application. Open Task Manager by right-clicking the taskbar on the virtual machine and then selecting Start Task Manager (CTRL+SHIFT+ESC doesn’t work in VirtualBox VMs). Search for VirtualBox Guest Additions Tray Application on the Processes tab. (Don’t confuse it with the VirtualBox Guest Additions Service.) Right-click the process and select Open file location. Next, you can end the Guest Additions Tray Application task.
Restart VirtualBox Guest Additions Tray Application
Now, locate VBoxTray.exe in File Explorer and double-click the file to restart the Tray Application.
VBoxTray.exe in File Explorer
If you often have problems with copy/paste operations in VirtualBox, restarting the Tray Application through the Task Manager is perhaps a bit cumbersome. As an alternative, you can restart the Tray Application with the little PowerShell script below.
Stop-Process -Name VBoxTray