VirtualBix bidirectional clipboard between host and guest

By | December 25, 2019

After installation virtual machine in Oracle VirtualBox clipboard between host and guest machines does not work. It is necessary to do some manipulation to start Copy and Paste operation working. Below is example how organize bidirectional clipboard between Windows host and CentOS guest.
In Oracle VM VirtualBox Manager right click on your VM, select Setting, General, Advanced. Verify that Shared Clipboard is set for Bidirectional:

Select Storage, CD/DVD drive and insert VBoxGuestAdditions.iso. This file is located in C:\Program Files\Oracle\VirtualBox directory, if VirtualBox was installed into default location not in custom one:

Install Guest Additions on your guest VM. Open terminal on the guest machine, go to CD/DVD drive and start appropriate application for Guest Additions:


[root@localhost ~]# cd /media/VBOXADDITIONS_4.1.6_74713/
[root@localhost VBOXADDITIONS_4.1.6_74713]# ls
32Bit      runasroot.sh            VBoxWindowsAdditions.exe
64Bit      VBoxLinuxAdditions.run  VBoxWindowsAdditions-x86.exe
AUTORUN.INF      VBoxSolarisAdditions.pkg
autorun.sh       VBoxWindowsAdditions-amd64.exe
[root@localhost VBOXADDITIONS_4.1.6_74713]# ./VBoxLinuxAdditions.run
Verifying archive integrity… All good.
Uncompressing VirtualBox 4.1.6 Guest Additions for Linux………
VirtualBox Guest Additions installer
Removing installed version 4.1.6 of VirtualBox Guest Additions…
Removing existing VirtualBox DKMS kernel modules              [ OK ]
Removing existing VirtualBox non-DKMS kernel modules          [ OK ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module                      [ OK ]
Building the shared folder support module                     [ OK ]
Building the OpenGL support module                            [FAILED]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions                 [ OK ]
Installing the Window System drivers
Installing X.Org Server 1.10 modules                          [ OK ]
Setting up the Window System to use the Guest Additions       [ OK ]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.
Installing graphics libraries and desktop services components [ OK ]
[root@localhost VBOXADDITIONS_4.1.6_74713]#


Alternatively it is possible to do GUI installation. Insert VBoxGuestAdditions.iso from guest device menu and follow the instructions:

After selection of VBoxGuestAdditions.iso the dialog to choose launch option will appear. To start installation click OK:

Confirm execution by clicking on the Run button:

The installation takes couple of minutes with similar output as above. After completion check the status of building shared folder support module, the building status should be OK reboot the guest.

Leave a Reply

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