VirtualBox is a widely used tool that allows running several operating systems on a single computing device. While working with VirtualBox, the Drag and Drop feature is not enabled by default. Therefore, the error “VirtualBox drag and drop not working” arises when the user attempts to drag/drop between the host and remote machines.
This post will address the possible reasons and the solutions to the error:
- Reason 1: Older Version of the VirtualBox
- Solution: Install the Latest VirtualBox
- Reason 2: Guest additions are not installed
- Solution: Install the Guest Additions
- Alternate Solution: Create a Shared Folder
Reason 1: Older Version of the VirtualBox
The drag-and-drop feature is supported by VirtualBox version 5 or newer versions. This is one reason your VirtualBox version does not support drag/drop.
Solution: Remove the Current Package and Install the Latest VirtualBox
Before installing a fresh copy, ensure you have removed the old version of VirtualBox installed on the system.
Step 1: Remove the Current Installed VirtualBox
To remove the VirtualBox, use the command as per your Linux distribution:
$ sudo apt remove --purge virtualbox #For Debian/Ubuntu-Based $ sudo dnf remove --purge virtualbox #For RHEL-Based $ sudo pacman -Rcns virtualbox #For Arch-Based
Step 2: Install the Latest VirtualBox
To install the updated version of VirtualBox, it is recommended to update the packages list via the command:
$ sudo apt update #For Debian/Ubuntu-Based $ sudo yum/dnf update #For RHEL-Based $ sudo pacman -Syu #For Arch-Based
Once the packages list is updated, use the command to install VirtualBox on Linux:
$ sudo apt install virtualbox #For Debian/Ubuntu-Based $ sudo dnf install virtualbox #For RHEL-Based $ sudo pacman -S virtualbox #For Arch-Based
Reason 2: Guest additions are not installed
Guest Additions adds some extra functionality to the VirtualBox, including the drag/drop, copy/paste, screen resolution and much more. The absence of “Guest Additions” is the primary reason the drag and drop is not working.
To verify if the “Guest Additions” is installed or not, just follow the instructions:
Then, click on the “Find” option and type “guest additions information report,” and it will highlight
The guest additions version if it is installed:
The red colour of the search bar shows no matches found, which means the guest additions are not installed. If they are installed, then the below-mentioned screen will appear:
The clear figure of the version details is:
In our case, version 6.1.32 is installed on the computer.
Solution: Install the Guest Additions
To resolve the above mentioned reason, install the Guest Additions on the respective Linux distributions.
The commands to install Guest Additions are provided below:
Install Guest Additions on Debian/Ubuntu:
$ sudo apt update && sudo apt upgrade $ sudo apt install build-essential dkms linux-headers-$(uname -r)
For Arch-Based Distributions:
$ sudo pacman -Syyu $ sudo pacman -S virtualbox-guest-utils
After the successful installation, you need to stop the virtual machine and go to the “Devices” option on the menu bar and click on the “Insert Guest Additions CD image..” to mount the guest additions.
If the Guest Additions CD is already mounted, locate it via the commands:
$ ls /media/$USER/VBox* $ ls /media/cdrom*/VBox*
Now, run it via the command provided below:
$ sudo /media/$USER/VBox*/VBoxLinuxAdditions.run
Solution 3: Enable the Drag/Drop Functionality
If none of the solutions are working for you, then you have to enable the Drag and Drop functionality. For this, hit the “Devices” tab and hover over the “Drag and Drop”. Set its value to bidirectional:
For better usability, set the “Shared Clipboard” option to “Bidirectional” as well:
Alternate Solution: Create Shared Folder
If you are not interested in the VirtualBox Drag-and-Drop feature, then you can use the “Shared Folders” for transferring files from the host OS to the VirtualBox. To do so, launch the Ubuntu machine and then Select Devices > Shared Folders > Shared Folder Settings:
Then specify the “Folder Path”, and “Folder Name”, and then also specify the “Mount Point”:
Finally, press the “OK” button.
The “virtualbox drag and drop not working” error occurs if the guest additions are not installed, or the VirtualBox has version 5 or earlier. To fix this error, you need to get the latest version of VirtualBox and install the guest additions. This post has briefly explored the reasons and the solutions to VirtualBox’s drag-and-drop working issue.