11
3
I am trying to copy&paste from my local Windows machine into my CentOS guest machine, running on VirtualBox. The CentOS installation is minimal (only the console).
I followed this guide, and enabled both shared clipboard and drag and drop, and rebooted. Now, when I get to the end of the article, it says
That’s it! When you log back into the guest machine, you should be able to copy text from the host machine to the guest easily. The Drag’n’Drop option lets you select a whole data file from the host to the guest or vice versa.
I am not able to copy&paste. I tried right clicking on my guest OS, expected a copy/paste dialog to open up. No dice. I can't even see a mouse arrow on my guest OS.
I tried Ctrl+V and Ctrl+Shift+V....but they didn’t work.
Ctrl+Shift+V caused a ^V
to appear on the command line, but nothing got pasted.
I was able to paste into Notepad on my Windows host machine, so I know my copy buffer (clipboard) is at least getting filled with what I want to copy on the host side of things.
The article just treats it as self-evident that there are no further instructions to be given. Did anyone run into this dilemma? What combination of keystrokes / mouse clicks do I need to copy/paste into my guest OS?
EDIT I managed to track down this forum which was talking about Guest Additions/Centos and a .iso that I would need to replace another with. I downloaded the .iso, so.... now what?
I tried going into
> devices
>> Insert Guest additions CD image
Which looked promising. But then I got hit with this error.
Unable to insert the virtual optical disk D:\virtualbox\VBoxGuestAdditions.iso into the machine Centos 7.
Would you like to try to force insetion of this disk?
Could not mount the media/drive 'D:\virtualbox/VBoxGuestAdditions.iso'
(VERR_PDM_MEDIA_LOCKED).
Clicking force unmount appears to do nothing.
But I don't even have an arrow key on the guest, much less the option to right click and select something out of a dropdown... – Zack – 2016-08-19T03:24:24.630
If you don't have a (visible) mouse pointer on your guest, maybe you should focus on fixing that first. But we can't teach you how to use VirtualBox — that's too broad a topic. If you don't know how to insert a CD ISO file into your guest's virtual CD-ROM drive, you need to read the VirtualBox documentation. – Scott – 2016-08-19T03:52:12.600
agh.... I just want to copy/paste.... ok.... – Zack – 2016-08-19T03:55:49.963
part of my trouble is I am coming from a very dev oriented background, so setting this stuff up is a major learning curve for me. A lot of the stuff in the documentation felt way over my head. – Zack – 2016-08-19T03:57:26.900
it sort of looks like, to get the mouse features, I will need to install guest additions as NZD suggested below. So back to that issue. – Zack – 2016-08-19T04:02:08.260
I doubt that. When I installed Kali Linux on a VirtualBox VM (with a Windows host), I was able to use my mouse to operate the Kali desktop/GUI — select and move windows, access menus, etc. — immediately; I didn't need to install guest additions. – Scott – 2016-08-20T00:28:51.123
@scott Yes, you can use your mouse. But without Guest Additions it's either captured by the guest or owned by the host. You have to "release" the mouse from the guest using a key combination to use it on the host again. If you have the Guest Additions installed, you mouse moves seamlessly between guest and host. – NZD – 2016-08-21T02:22:26.683
@NZD: (1) My point is that the mouse should work in the guest without guest additions. I didn’t say it would be pretty or easy. But the OP seems to be saying that he has absolutely no mouse function in the guest, and I’m saying that might be a sign of deeper problems, and that installing the guest additions might not help. (2) I’m pretty sure that I got seamless mouse operation (without using the “release” key combination) without installing guest additions. – Scott – 2016-08-21T07:55:29.290
@Scott. The "release key" is Right-Alt by default. You need it when you have a Gui-based guest and don't have the Guest Additions installed. You transfer control to the Guest by clicking in the Guest window and you get your mouse back when you press Right-Alt. See http://imgur.com/a/Ci5HM
– NZD – 2016-08-21T20:16:22.547@NZD: (1) Thanks for reading the manual to me. (2) If you look here, you’ll see that VirtualBox says that some versions of Linux work without additions. (3) I get this on my Kali VM without additions, so I guess Kali has VB mouse pointer integration built in. (4) You seem to be ignoring my point that the OP *cannot get a right-click menu on his guest AT ALL*. By your own statements, the guest should grab the mouse if the user clicks in the VM, even without additions. Therefore, I believe that he has a bigger problem.
– Scott – 2016-08-21T21:52:33.807I think you are right Scott. I am not able to get a mouse at all. It's probably going to be slow going for me while I read the manual. I'm wondering if this is a centos specific issue. I did a minimal install for centos. – Zack – 2016-08-22T04:03:41.950
@Scott @Zack Does
a minimal install for centos
mean that you don't have a GUI on your VM, but only a console? If so, then it is correct that you don't see a mouse pointer. A console system has no mouse. – NZD – 2016-08-22T05:23:38.0631@Scott AFAIK, bash has no clipboard i.e. you can't copy/paste from/to a console-only system. – NZD – 2016-08-22T05:35:29.803
1@NZD: You may have just identified Zack's actual problem. – Scott – 2016-08-22T05:46:26.960
1I do indeed have only the console.
So... go get something with a GUI and report back? The plot thickens... – Zack – 2016-08-22T17:40:14.707
1@Zack: If your objective is to copy&paste small bits of text, like commands and command outputs, then you probably need to have a GUI. To repeat what I’ve been saying another way: if you currently can’t copy&paste *within* your guest (i.e., from one CentOS program to another), then guest additions won’t help you with that. If you want to move larger chunks of data between your host and guest, and you have network connectivity, then you should be able to do things like FTP, rsync, scp, or set up shared directories. … (Cont’d) – Scott – 2016-08-22T19:16:23.173
1(Cont’d) … Or maybe guest additions will give you other options. (@NZD can probably help you with this.) But, if all you have on the guest is a console (i.e., one "window" with no borders (so not movable or resizable), not scrollable in bash (programs like
less
andvi
will support scrolling), no option of creating new windows, and no way of selecting text on the screen) then you won’t be able to do clipboard-style copy&paste. – Scott – 2016-08-22T19:16:34.870Thanks Scott. All of the above is true. I'm going to attempt another more complete install when I get home, preferably something with a GUI. I really just want to copy/paste small bits of text for now. – Zack – 2016-08-22T19:38:30.323
@Scott Use
ssh
to access the VM from the host. You can use copy and paste from yourssh
terminal (at least on Linux hosts). – NZD – 2016-08-22T22:12:40.663@NZD: Of course, a minimal install might not include an SSH server, either. – Scott – 2016-08-22T23:26:57.720
4
Possible duplicate of Virtualbox clipboard sharing
– Ivan Yurchenko – 2017-07-24T11:58:24.480Possible duplicate of Ubuntu Server VM: copy paste?
– Scott – 2019-05-08T21:34:57.603