Save to My DOJO
You’re smack in the middle of a Windows 2016 server VM installation. Prompted to type in a product key to continue, you fire up one trusty spreadsheet containing all your product licenses. Keying in 25-digit license keys, was not exactly in your job description! After locating the correct key, you hit CTRL-C and proceed to paste it to your VM only to find that the darn thing does not work. Does this sound all too familiar?
The reason for this is that since vSphere 4.1, copying and pasting clipboard content to and from VMs has been disabled for security reasons. The main argument for this is that non-privileged users may intentionally or accidentally eavesdrop on clipboard content transfers. If you look at the latest vSphere security configuration guide, you’ll find a couple of settings in this regard.
As it turns out, we just need to enable these 2 settings by adding them to a VM’s VMX file. Doing this will enable clipboard functionality. These settings WILL NOT WORK if you don’t have VMware Tools installed which makes it imperative for the tools to be installed and properly running.
Note: There’s a third setting, isolation.tools.dnd.disable, which should allow you to drag files over to the VM console but I did not manage to make it work. If you do succeed, please let me know by dropping a comment in the box below so I can amend this post as per your procedure or findings.
Enabling clipboard copy and paste for a single VM
Step 1 – Power off the VM
Step 2 – Right-click on the VM and select Edit Settings
Step 3 – Select the VM Options tab and expand Advanced. Click on Edit Configuration next to Configuration Parameters.
Step 4 – Using the Name and Value fields at the bottom of the Configuration Parameters dialog box, add the following. Click on Add after each entry.
- Name: isolation.tools.copy.disable, Value: false
- Name: isolation.tools.paste.disable, Value: false
Step 5 – Power on the VM. You should now be able to paste and copy content from the clipboard to the VM and vice-versa.
This next video, I demonstrate what I mean by copying content to a VM’s console window.
Enabling clipboard copy and paste globally
If security induced paranoia is not your thing, the above settings can be enabled globally. This means that the settings apply to any VM hosted on ESXi hosts where the clipboard settings have been applied. To do this, we need to edit the /etc/vmware/config file and add the two settings to it. Here’s how.
Step 1 – SSH to ESXi using putty or similar.
Step 2 – Run vi /etc/vmware/config and do the following:
- Press the [Insert] key on your keyboard and, using the arrows, go to the last line and press [Enter].
-
Type in the following.
vmx.fullpath = "/bin/vmx" isolation.tools.copy.disable="FALSE" isolation.tools.paste.disable="FALSE"
Step 3 – Save the file
- Press [ESC] followed by the [:] key. Type wq and press [Enter] to commit the changes to disk.
Any VM that is created on or migrated to the ESXi host where the settings have been applied, will inherit these settings. Note, that the changes made to the config file will not persist when carrying out ESXi upgrades so you’ll need to enable them a second time.
Conclusion
The ability to transfer clipboard content to and from VMs is something many admins cannot do without especially when network restrictions may prevent you from connecting remotely to a VM. Since vSphere 4.1, VMware has disabled clipboard functionality as a security precaution to prevent content eavesdropping. Regardless, the ability to copy and paste clipboard content is undoubtedly a useful feature. In today’s post, we’ve seen how you can enable clipboard functionality for a single VM or across the board.
For the latest VMware articles, do have a look at our blog hoping you’ll find something interesting.
[the_ad id=”4738″][the_ad id=”4796″]
Not a DOJO Member yet?
Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!
53 thoughts on "Enabling clipboard copy and paste on vSphere VMs"
I also can’t get isolation.tools.dnd.disable to work. Has this feature been deprecated? Or is there another way to get this feature to work in vSphere 6.5?
The copy/paste text options work fine.
Hi,
I couldn’t get it to work either something I mentioned in the post. Not sure if it’s been deprecated or if it ever worked in the first place.
Jason
Hi Jason
nice to read again your posts and…happy new year!
It works but do you know if it is also possible to copy files and not just the content of clipboard?
Happy new year to you as well. There is indeed a setting but from what I understood, it can only be used for auditing purposes. So, short answer is that it does not work, in my case at least.
Yes Jason
I tried many times but it didn’t work and reading many other posts it seems that it is not definitely possible. It seems to be possible only within vmware workstation but never tried.
I needed just another confirmation
Thanks
Marco
I’ve had the clipboard copy and paste enabled by our network support specialists and it works fine — for text. Unfortunately, I won’t be able to copy and paste screenshots from Snag-It on my host PC to the guest server. I guess I’ll have to use FTP for that. Anyway, the ability to do text is a big help. Thanks for this very helpful article.
Glad you found the post useful!
Does the host have to be rebooted for this to take affect? I made the change and migrated a VM off of the host and back on and still cannot copy paste text.
In my previous experience, anytime the configuration is changed, it needed a power cycle to work.
Thanks, worked fine… wish I could transfer files with copy and paste but, over the network should be fine..
What priviledges are required to make this change? we have a set of dev users working on some test servers who have requested permission to make this change. We don’t want to make them administrators as there are a lot of tasks we don’t want them to be able to do so need to ad just the privileges for this.
I believe you just need the privilege to edit the VM’s configuration file. Which would be Virtual machine.Configuration.Advanced.
It is just doesn’t work. Why? VMware why for you it is very big problem to resolve that issue?
Hi Ilya,
Apparently, VMware is taking more of a security stance against copy and paste and rather have it disabled by default. I guess it could be seen as a huge vulnerability for many of their clients.