84

I have a dual-screen set-up with a Windows host and a Linux virtual machine.

Windows Host: Windows 7 x64, VMware Workstation (8.0.5, most recent)
Linux VM: CentOS 6.4 x64 (most recent) + VMware Tools (most recent)

The shared clipboard feature is of great importance to me. I often copy commands from the Windows host into the Linux VM, but clipboard sharing often stops working.

A reboot of the guest does not solve the issue. A reboot of the Windows host machine does solve the issue, although it's only a temporary measure. The issue often comes back within 20-30 minutes after reboot.

Hennes
  • 64,768
  • 7
  • 111
  • 168
ujjain
  • 1,635
  • 4
  • 17
  • 26
  • 2
    Same here. Windows 7 x64 host, VMWare Workstation 9.0.2. VM Windows XP + appropriate VMWare Tools. Though, haven't found yet dependency between issue appearing, disappearing and reboots. – Andriy K Jun 14 '13 at 17:10
  • 1
    Same issue - Windows 7 x64 inside Windows 7 x64. Random. Very random. – Victor Zakharov Jan 23 '14 at 19:47
  • Since you are running a Linux VM I have to ask. Are you using the genuine VMware tools that you compile? Or are you using the OpenVM Tools? While many people have told the difference between the two is slim to none I have had very very few problems when I am using the "roll your own" VMware tools. If you are not I would recommend trying that first and see if it resolve the issue. – AtomicPorkchop Feb 04 '14 at 04:25
  • Also while slightly off topic it is worth mentioning. Are you aware that VMware Workstation 10 has been released. While it would require a paid upgrade there is a chance that a quick look at the changelog could tell you if they resolved your problem or not. Might be worth a look. – AtomicPorkchop Feb 04 '14 at 04:26
  • I can confirm the issue on Windows hosts and windows clients as well Beginning WS 7.0 all the way now to 10.0.3. During that time I have had Windows Server 2008, Windows Server 2012 as hosts, Windows XP, Windows 7, Windows 8.1, OpenSuse 12.3 as clients and have had the issue on all of them. I haven't had success with the same method all the time but usually completely uninstalling, rebooting and installing vmWare tools resolves the problem. – James Jul 15 '14 at 20:13
  • Here's what worked for me: - Stop vmware tools service - kill vmwaretoolsd.exe - run in again, as @Jafin says - start the tools service again – Yuriy Gettya Nov 05 '14 at 16:12
  • I've noticed that it stops working if I lock and unlock guest PC. Reproduces with 100% probability (v12.5.7). And only restart of guest PC solves this. – Dmitry Gusarov Aug 19 '18 at 10:35
  • Simply run `/usr/bin/vmware-user-suid-wrapper`script in your Linux-guest as normal user and the copy/paste and drag/drop will work (at least during that session). For a more general resolution see this: https://superuser.com/a/1353897/650958 – OpenITeX Aug 30 '18 at 19:21
  • In my case, I did the classing windows restart, and it worked out. Reading some responses it sounds that some service or application stop to work properly. Since that there could be multiple reasons, I don't waste time checking or creating a script to restart the problematic service that is a workaround anyhow.... – LCoelho Jan 05 '21 at 15:24
  • i had faced it for linux guest vm - and found that `open-vm-tools-desktop` package instead of `open-vm-tools` needs to be installed. it addressed it. https://docs.vmware.com/en/VMware-Tools/12.1.0/com.vmware.vsphere.vmwaretools.doc/GUID-8B6EA5B7-453B-48AA-92E5-DB7F061341D1.html – Sushil Jan 19 '23 at 07:47

18 Answers18

48

I once spent a few hours rebooting, reinstalling VMtools, etc., while the fix was really suspending and restarting VMware itself.

jtpereyda
  • 2,447
  • 3
  • 23
  • 29
Samgue
  • 481
  • 4
  • 3
31

I have the same issue but Host is Windows, guest is Windows. I force kill vmtools and rerun them and that has always made cut/paste continue to work.

taskkill /F /IM vmtoolsd.exe
"C:\Program Files\VMware\VMware Tools\vmtoolsd.exe" -n vmusr

Not sure what the command would be on centos to kill client tools.

Jafin
  • 513
  • 5
  • 11
23

This is what worked for me:

Attempt to close VMWare Workstation. You will be prompted with some options on what to do with your running guests (if any are currently running): Suspend, Power Off, Run in Background, Cancel.

Select Run in Background. Reopen VMWare Workstation.

Tyson
  • 231
  • 2
  • 2
  • this worked for me (I only have to restart VMTools from services on my guest) – Yaplex Aug 17 '15 at 15:15
  • 2
    This works for me too. I noticed that the problem occurs after I copy something from guest to host, then I can not longer copy from host to guest. This is the quickest fix, everything else has been a waste of time. – KPheasey Jun 15 '16 at 03:04
  • This is the only solution that worked for me. Win 10 (15063) host, copy from guest (Win 7) paste to another guest (Win 8.1). VMware Workstation 12.5.6. – Meeting Attender Jun 17 '17 at 16:35
  • 1
    Upvote for quickest and least disruptive solution. Suspending and restarting VMware works but this solution suggesting running in background is an easier pill to swallow for sure when you're running a lot of VMs and testing routines. – JimSTAT Dec 20 '18 at 18:58
  • This worked for me with Host Windows 10 and Guest Windows 2012. Workstation 14 Pro. – buzz3791 Apr 11 '19 at 19:39
10

If your guest is Unix-based, you can run this.

It grabs the pid of vmtoolsd, kills it, and restarts it. That will repair the copy/paste functionality:

#!/bin/bash
processString=$(ps -ef | grep '[0-9][0-9]:[0-9][0-9]:[0-9][0-9] /usr/bin/vmtoolsd -n vmusr') # get process info for vmtoolsd
tokens=( $processString ) # tokenize
kill "${tokens[1]}" # grab pid and kill it
/usr/bin/vmtoolsd -n vmusr & > /dev/null 2>&1 # restart vmtoolsd

Optionally save it as a script and put the script in your $PATH so you can run it more easily. You do not need to reboot your VM or restart VMWare.

Austin Dean
  • 241
  • 1
  • 4
  • 7
  • 4
    Thank you, this worked with VMWare Workstation Player 14, Windows 7 Enterprise host, ubuntu guest. – Dan Becker May 18 '18 at 21:00
  • You are on the right track on this. Unfortunately that's not the correct way to fix the copy/paste in VMware14/Win7-host + Ubuntu16.04/guest. In such setup two vmtoolsd processes must be running. The one you are killing with your script is the system-daemon and it is needed there for a reason. The other one is the user-space daemon (it actually makes copy/paste work). It should be started with /usr/bin/vmware-user-suid-wrapper script just after logging in and/or while the X/WindowManager is starting. See more here: https://github.com/vmware/open-vm-tools/issues/150#issuecomment-417424132 – OpenITeX Aug 30 '18 at 18:53
  • 3
    This worked with VMware 15 running Ubuntu Guest Machine – Rohit Salecha Apr 15 '20 at 14:43
  • Most probably you are missing `/etc/xdg/autostart/vmware-user.desktop` that launches `/usr/bin/vmware-user`. – Yuki Jan 15 '21 at 19:05
5

I had the same issues but with open-vm-tools (Ubuntu 14 guest, Win10 Host)

I solved it by simply restarting VMware Workstation (as mentioned previously)

Everything took just 2 sec.

What I didn't know: Your running Virtual Machine is not suspended nor stopped.

Just click File -> Exit (or the X) and choose "Run in Background" Then start VMware Workstation again, et voilà, copy&past works again!

Markus
  • 84
  • 1
  • 4
  • I can confirm that this works. Press the X, Suspend and then Start again the VM, with this you get clipboard working and the VM on the same state – Martin Muñoz Jul 10 '23 at 13:51
5

I just restart the VMware services on the host when it happens.

Try avoiding canceling the copy and paste operation. Also only perform one copy and paste operation at a time.

random
  • 14,638
  • 9
  • 54
  • 58
jkdba
  • 150
  • 1
  • 6
  • How would one "cancel" the copy & paste operation??? Do you mean that one should not copy without also pasting? And do you mean copying from guest to host or from host to guest or from within the guest only??? This advice seems a bit odd... – Jazimov Jul 30 '16 at 05:53
  • Yes also this occurs between the guest and the host.. – jkdba Aug 01 '16 at 13:20
  • Do you mean all the VMware services on the host? – munrobasher Dec 06 '16 at 19:08
  • @munrobasher I believe so it has been a little while since I have run into this issue. – jkdba Dec 07 '16 at 18:05
4

If running Windows on Windows, try using the VM over RDP. Should be more stable this way. I know this has no relevance to the original question, but some people may find it helpful, because this topic has poor coverage on the internet, with no good solution.

Victor Zakharov
  • 636
  • 3
  • 11
  • 19
2

It looks like there are a number of possibilities to cause this copy/paste dropout failure between hosts, so I'll add my fix here. (And yeah, I am aware I'm using different VMWare, different host OS, and different guest OS compared to those specified in this question, but it really seems to be a vmware tools thing, so hopefully it will help some people who land on this page like I did.) Of course you have to have VMWare Tools installed -- update them first probably -- and the guest isolation options must allow copy/paste as others have mentioned.

First my setup:

  • HOST - MacOS 10.13.4
  • GUESTS - Windows of various versions.
  • Fusion - 8.5.10

(Though, this clipboard working and then suddenly not working has been happening in previous versions of MacOS and previous updates to Fusion 8.)

My Fix: Stop the vmware tools service "VMTools," exit/kill the vmware tools tray app, restart the service, restart the vmware tools tray app.

Commands to run in Windows guests, as Administrator: (tested in powershell and CMD)

net.exe stop vmtools

taskkill /F /IM vmtoolsd.exe

net.exe start vmtools

start "" "C:\Program Files\VMware\VMware Tools\vmtoolsd.exe" "-n" "vmusr"

This is working for me... for now. Of course your mileage may vary, and if you have comments on my answer please let me know. I know the "vmtoolsd.exe" used to be called something else in previous versions. Maybe its startup parameters are the same, maybe not.

I use this in a batch file with a 1-second delay between each line. There are various ways to insert delays, and Rob van der Woude has a rather darn comprehensive list of those ways.

The same general methods may work in other guest OSes, but I don't have the details of how to do that.

I hope this helps someone!

Nate
  • 181
  • 5
2

The most general and thus the best way to make copy/paste to work in VMware (version 14 atleast) running Linux/Ubuntu Desktop guests is to add the below bash-script to your $HOME/.profile:

# VMware: make copy/paste and drag/drop to work in Ubuntu Desktop guest
# Note: this should run automatically with xdg/desktop entry, but it doesn't :(
[[ -x /usr/bin/vmware-user-suid-wrapper ]] && /usr/bin/vmware-user-suid-wrapper

After you add that in your Linux/Ubuntu $HOME folder, just log out and restart Ubuntu/Linux-guest OS, log in.. and the copy paste is working!!

The script /usr/bin/vmware-user-suid-wrapperstarts the user-space daemon of vmtoolsd and it can also be run manually

You can also check that two (2) vmtoolsd daemons should be now running in your system. Both are needed and the one with args: -n vmusr .. is the one that makes copy-paste and drag-and-drop to work. Running `ps aux | grep -v vmtoolsd | grep vmtoolsd' will show this: guru@visuxmono:~$ ps aux | grep -v grep | grep vmtoolsd root 762 10228 Ssl 21:20 0:03 /usr/bin/vmtoolsd guru 3053 34092 S 21:21 0:03 /usr/bin/vmtoolsd -n vmusr --blockFd 3

OpenITeX
  • 136
  • 5
  • When I run /usr/bin/vmware-user-suid-wrapper, I get the error "vmware-user: could not open /proc/fs/vmblock/dev" – Austin Dean Sep 05 '18 at 18:22
  • If you run the command: 'ps aux | grep -v grep | grep vmtoolsd', after logging in, what does it print? Also, are you running the vmuser command as normal user and root? – OpenITeX Nov 23 '18 at 22:15
2

It turned out open-vm-tools-desktop was not installed automatically together with open-vm-tools in my virtual Ubuntu 20.10.

sudo apt install open-vm-tools-desktop

fixed the issue immediately.

Neurotransmitter
  • 1,204
  • 16
  • 35
1

The first thing you should do is determine which way is broken because they are controlled separately. If host-to-guest clipboard doesn't work but guest-to-host does then the restart vmware.exe trick in the other answers will work. However, if it happens continually then you likely have a problem in an app other than vmware.exe.

Many years ago I wrote a program to identify Windows hooks. One hook I used to find that often causes trouble with other applications is the WH_CBT hook. As it happens, today I was using VMware Workstation and the host-to-guest clipboard just wouldn't stay working more than a few seconds after run-in-background and restart. I used my program to scan the host desktop for hooks and killed all programs that used WH_CBT hooks. After that host-to-guest started working again. Through the process of elimination I've found a 100% reproducible disconnect on host-to-guest by opening Windows Firewall on the host (wf.msc which runs from mmc.exe). It sets a WH_CBT hook:

----------------------------------------------------------------------------[b]
[Found] [HOOK 0x5AD1127B @ 0xFFFFF900C0940A90] [11:26:13 PM  3/3/2022]

Id: WH_CBT
Desktop: Default
Owner/Origin/Target: mmc.exe (PID 22120, TID 42528 @ 0xFFFFF900C1E87C10)
----------------------------------------------------------------------------[e]

My program is called GetHooks. I never officially released a 64-bit version because I couldn't get it working with Windows 10 x64, but it can be built for 64-bit from source for older versions of Windows.

devenv.exe (Visual Studio) is another program that sets CBT hooks but it usually does them properly so unless your Visual Studio hangs or something it is probably not the cause.

Unfortunately lots of programs set WH_CBT and not all of them do it properly, even Microsoft. The best advice I can give you for Windows 10 is if all of a sudden host-to-guest stops working repeatedly it may be some other program that you have open that set a hook that is actually the cause and NOT VMware. What you observe with VMware may actually be a symptom of more serious problem of a lazy hook in a different unrelated program.

Jay
  • 131
  • 3
1

Had a similar problem with Workstation 10 (W7 host, 2008R2 guest), copying from guest to host didn't work, copying from host to guest did.

Restarting vmtoolsd.exe -n vmusr on guest and vmware-tray.exe on host solved it.

user351125
  • 19
  • 2
0

I generally access a Windows guest running in VMWare on another Windows box from my own Windows workstation. I remote in using standard Windows "Remote Desktop Connection".

In this configuration having the Remote Desktop window NOT fullscreen generally enables the clipboard to work. When it is fullscreen and I switch back and forth often that is when the clipboard will fail.

Note - the VMWare window on the server box CAN be fullscreen, that doesn't seem to matter.

StayOnTarget
  • 1,178
  • 1
  • 14
  • 26
0

it's wrong in the first place to use the VMWare Workstation/Player. You just create the VMs and leave them running in the background.

And use something terminal manager like MobaXTerm, SuperPutty, Kitty This way you get much more functionality and better management.

OWADVL
  • 177
  • 1
  • 5
  • 2
    Nothing wrong in running Vmware Workstation/Player if you need the Desktop/Gui or have other use cases or usef requirements for it. – OpenITeX Nov 23 '18 at 22:17
0

The clipboard sharing feature requires that VMware Tools be installed in the your virtual machine. It also enables you to drag and drop between virtual machines and your host OS.

I would say double check to see if VMWare tools are installed. If they are, maybe remove and re-install them. If that doesn't work, you can try updating the VMware workstation. VMWare 9.0 is now available!

James Mertz
  • 26,224
  • 41
  • 111
  • 163
Damon
  • 19
0

Had the same issue with version 10.0.

First make sure Guest isolation is deactivated: VM Settings > Options > Guest Isolation both are enabled.

Try to copy and paste from external HD or removable drives, not from your system partition.

My setup: VM stored on external HD. Copy paste from internal HD (C:) doesn't work, copy and paste from external HD (E:) will work. I assume C&P is deactivated for the local system partition.

tumchaaditya
  • 3,752
  • 5
  • 39
  • 57
0

Experienced it right now on Windows 7 64bit as Host and Guest, VMWare Workstation 9. The solution on my side: The service VMware Workstation Server was set to start manually on the host. After starting this service (and configuring it to start automatically) copy and paste worked normally again between host and guest.

taffit
  • 151
  • 6
0

In my case simply restarting the VMware tools service in guest resolved this issue (drag and drop of files is working but copying of text via buffer between host and guest does not).

Mikhail
  • 1,486
  • 2
  • 21
  • 27