Friday, July 15, 2011

Enable Copy / Paste in ESXi 4.1 Virtual Machine : VMware vSphere Client 4.1

Enable Copy / Paste in ESXi 4.1 / vSphere 4.1 Guests - VMware Virtual Machines

vSphere 4.1 Copy/Paste options : Change of Default Behavior

This is one of those changes that was implemented "for security reasons", where an existing behavior and capability (with ESXi 4.0 / vSphere 4.0 and earlier) suddenly seems to no longer work for you: you simply want to Copy/Paste to and/or from your Guest Virtual Machine like you had been doing prior to your ESXi 4.1 upgrade, but suddenly that "feature" is no longer working.

After some digging, you will find that VMware posted a KB about this stating: "Starting with vSphere 4.1, the Copy and Paste options are, by default, disabled for security reasons.". OK, lovely... so, let us go about "fixing" it (i.e., restoring our copy/paste option for a particular virtual machine and/or turning it on by default for all our VMs).

SIDE NOTE: I wrote a blog about How to Upgrade VMware ESXi 4.0 to 4.1 recently, if you have yet to do so and want to get some experience before upgrading to ESXi 5.0 / vSphere 5.0.

VMware ESXi / vSphere 4.1 Enable Guest Copy/Paste Operations

I included a quick visual (screenshot with markups) showing you how this looks in the vSphere 4.1 client software application.

This screen shows how you modify the settings for a single virtual machine. You can see that I have just chosen to "Edit Settings..." on a (stopped) virtual machine, where I have then gone to the "Options" tab, selected "General", and clicked the "Configuration Parameters..." button, whereby the form (that I marked up above) is shown.  To add the two entries we need (as pictured: click picture to zoom in), simply click the "Add Row" button (twice in total as we do this), and add these entries (name : value pairs):

  • : false
  • : false
Then click OK to exit this screen, and OK again to exit the edit-settings screen.  Power up your virtual machine, open a console window to it, and once your guest operating system is up and running, you should find that you can now copy and paste between your host and guest(s).

VMware ESXi / vSphere 4.1 Enable Guest Copy/Paste DEFAULT (for all VMs)

What do you do if you have a LOT of virtual machines to make this change for? I figure the break-even threshold for going about the "bulk enable" method as I am about to describe is probably more virtual-machines than I had (less than 10), but there is a solution for enabling copy/paste by default. NOTE: this requires gaining access to the the ESXi Server Console as "root" (if you do not know how to do this, see that link I provided above for upgrading ESXi 4.0 to ESXi 4.1 -- it will walk you through this step).

Once you have access to the server console, you need to open the /etc/vmware/config file using a text editor and add these entries to the file (which should look very familiar after the discussion above):


Save and close the file. You will see the effect of the newly enabled Copy / Paste options only after you restart or resume your virtual machine(s).

Note: According to VMware, these options (both methods described, from what I gather) do not persist after an upgrade. If you upgrade to a newer version after enabling these options, the changes are lost and you may have to re-enable them. That may be a PITA, but at least there is a way to fix the copy/paste, and that is all I care about really :)


Mike Eberhart said...

An anonymous poster stated that this "did not work" and gave no details to go with that. I assure you, this *does* work. I have ESXi 4.1 VMs all running with these changes in effect and I can copy-and-paste just fine between them (where I could not before making these changes). If you have made the changes described here and it "does not work", can you give more details? Perhaps there is another conflicting setting or perhaps you did not reboot a VM or something?

gm said...

Nice tip! It works for me.

fabio said...

Nice article. It is useful.

Anonymous said...

Remembered this from VMWare's KB article but would you believe their site was down and couldn't quite recall the setting required. Thanks for this. I suspect the person complaining about it not working was referring to full clipboard style use and couldn't copy/paste files.
I found this solution will only work for text between the guest and the vSphere client.