Enabling Copy and Paste in a VirtualBox Environment
In this tutorial, I'm going to walk through how you can copy and paste from a Windows machine to a VirtualBox.
Guide Tasks
  • Read Tutorial
  • Watch Guide Video
Video locked
This video is viewable to users with a Bottega Bootcamp license

I'm on Windows 10, and I'm going to be using VirtualBox with Linux Ubuntu version 16. I'm going to show you something that I found when I was working through it because many of the tutorials that I discovered didn't quite work properly. That is what I want to walk through here.

What I'm proposing to do is I want the ability if I'm on some Windows site, such as some kind of browser here, I want to be able to simply copy something in that browser and I want to paste it into my virtual machine.

I'm going to start one of these up, it doesn't really matter which one that I go with, but I'm going to start up the virtual machine and you'll see by default this may not work for you. If you're watching this video, I'm assuming that is the case.

large

Like I mentioned, many of the tutorials that I found online were missing a few steps, which is why I created this video. Let's open up the virtual machine here with Ubuntu. I'm going to show you first that this doesn't work by default.

I copied something already, so now let's just try to paste it in. You saw I copied this, and now if I go into that active virtual machine, if I try to case this it's not going to work. That's perfectly fine. That's what we're going to work through. Exactly how we can make this work.

If I right-click here you can see paste isn't activated.

large

Many of the tutorials that I've seen said to do something like this, where you exit out of the virtual machine, then inside of the settings you go here and click on advanced. Click on share to clipboard, bi-directional, drag and drop bi-directional. They said that's all you have to do, and it will work for you.

large

Let's just test out that theory right here. If this works like it has on my other systems and on my other VirtualBox snapshots, this will not actually allow us to copy and paste. There is a very important next step, that can be very tricky.

I've seen all kinds of different guides that gave different recommendations but they did not work. I'm going to open this up again, we will try to paste into the browser once again and see if that bi-directional rule worked.

Now, if I come here you can see paste still is not working. The reason for this is because we need to install guest additions.

large

The way that you can do that is close your VirtualBox and come back to settings. If you come here and click on storage. Where it says Storage, IDE, Secondary Master, click on [Optical Drive] Empty, and then click on choose disk image.

large

From there, you can see that we have this have VBoxGuestAdditions right here, so I'm going to click on this, and click open.

large

Now you can see that no longer says empty. What we've done here is we've taken the VirtualBox GuestAdditions which this gives us some additional tooling, specifically it gives us the ability to copy and paste. It enables its bi-directional copy and paste.

Now, if I click start, this is going to allow us to run that. I'm going to VirtualBox, and even though we don't actually have a CD drive in this is going to mimic that in our VirtualBox. It's going to be like we had a Linux computer here, we put in a CD, and we're going to install from that CD.

I'm going to run this, and I will say since I have not tested this out on this machine, that we might need to do some debugging here on the fly. When I originally had to get this working on a different machine, I ran into a number of bugs. We're going to see how it works.

If you come here, you can see that now we have this little disc. It's VBOXADDITIONS gets_5.16_110634. I'm going to right-click on this, and it's going to open up this directory.

large

In order to run this, just click on the top here where it says Run Software. Click on run, then it's and ask you for your password for your VirtualBox, click on authenticate, and then it's going to install.

large

This may or may not work. I have had some issues right here you can see it says failed to set up service vboxad. please check the log file and then hit return. That's going to close it out. Let's just do a quick test because I have had a few times where this actually did work, but it gave that little error message.

I'm going to reboot the system. Let's open up the terminal, you can just type reboot, and that is going restart the entire VirtualBox. We're just going to do a quick check here to make sure that that is not working.

Okay, we are back up. Let's open up the browser here really quick, go back to Windows, and just copy this. Then switch back to our VirtualBox. Click here, and you can see it's actually working.

large

That is one spot where I kept on getting stuck. I saw that little error message, and that did not give a clear indicator to say that it was working. As you can see, we do have the ability to copy and paste.

That is how I personally work through the bug. Simply clicking on the change for the bi-directional copy-paste is not enough, you also have to have the VirtualBoxAddition. Those of the guest additions that allow that to work. That is how I personally was able to get copy and paste working on this machine.