Oracle’s VirtualBox allows you copy and paste from the host machine to the guest virtual machine and vice versa. Unfortunately, this feature sometimes does not work properly. In this post, I show you how to troubleshoot copy/paste operations in VirtualBox.
Avatar
Latest posts by Michael Pietroforte (see all)

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

Install VirtualBox Guest Additions

The Guest Additions CD image should be mapped to drive D:.

CD Drive Virtual Guest Additions

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

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

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

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

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
Sleep 5
Start-Process C:\Windows\system32\VBoxTray.exe

30 Comments
  1. Avatar
    steve 3 years ago

    Thanks. Normally Virtual Box tells me to install the host tools on a new installation, but for some reason it didn’t when I installed in recently.

  2. Avatar
    Kleber 2 years ago

    Here I can’t figure out how to follow the tutorial as the machine is a macOS and the CD inserted by VirtualBox is Windows files.
    Any tip?

    • Avatar Author

      I suppose if the VM runs Windows as guest OS, you need the Windows installation files. But do yourself a favor and get Parallels for your Mac. It is not expensive and is definitely worth its money.

  3. Avatar
    rahul 2 years ago

    Thank you so much.

Leave a reply

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2023

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account