Step-by-Step Guide: Enabling Copy and Paste on a VMware Virtual Machine

For security reasons, the clipboard is disabled by default in the VMware vSphere Client. This means that you cannot use copy/paste operations between the OS and your computer when you are connected to the VMware virtual machine console. This article explains how to enable clipboard copy and paste for a VMware VM.

Copy, Paste, Drag-and-Drop Features Not Working in VMware Workstation

By default, VMware Workstation allows you to use the clipboard for copy/paste operations through the Virtual Machine Management Console.

Check the following if the clipboard does not work for any reason:

  • Ensure VMware Tools are installed in the virtual machine and update them if needed.
  • Ensure that both clipboard and drag-and-drop features are active in the virtual machine settings.
  1. Open VMware Workstation –> VM –> Settings –> Options tab.
  2. Select Guest Isolation.
  3. Here, you’ll find two options:

    Enable drag and drop

    Enable copy and paste

    Enable both and save the VM settings.

  4. Initiate your Virtual Machine.

You can now make use of the clipboard to transfer files and text between your host and guest OS within a VMware Workstation virtual machine.

Alternatively, you can enable these options manually in the virtual machine’s VMX file.

isolation.tools.copy.disable = “FALSE”

isolation.tools.dnd.disable = “FALSE”

isolation.tools.paste.disable = “FALSE”

isolation.tools.hgfs.disable= “FALSE”

Enabling Clipboard Copy and Paste in VMware ESXi

Now let’s look at enabling the clipboard in the VMware vSphere Web Client or VMware ESXi Host Client (HTML5-based).

  1. For the clipboard to work in an ESXi virtual machine, VMTools must be installed in the guest OS; Linux VMs require open-vm-toolbox or open-vm-tools to be installed. Check they are installed (for Ubuntu):

  2. $ sudo service vmware-tools status

  3. Power off your virtual machine;

  4. Open the VM settings. Go to the VM Options -> Advanced -> Edit Configuration;

  5. Click Add Configuration Params and add three options:

  6. isolation.tools.copy.disable = FALSE

    isolation.tools.paste.disable = FALSE

    isolation.tools.setGUIOptions.enable  = TRUE

  7. Save the changes and power on the VM;

  8. Ensure that the clipboard now works for this VM so that you can copy and paste content via VMRC.

The VMX configuration file of the virtual machine on the datastore can also be used to enable these parameters.

  1. Connect to the ESXi host using SSH;

  2. Edit the virtual machine VMX file using vi:

  3. # vi /vmfs/volumes/volume_id/mun-srv01/mun-srv01.vmx

  4. Add the lines:

  5. isolation.tools.copy.disable="FALSE"

    isolation.tools.paste.disable="FALSE"

    isolation.tools.SetGUIOptions.enable="TRUE"

  6. Save the changes and run the VM.

You can enable the clipboard for all VMs on an ESXi host at once.

  1. First, backup the /etc/vmware/config file:
    # cp /etc/vmware/config /etc/vmware/config_bak
  2. Edit the file:
    # vi /etc/vmware/config
  3. Add the lines:
    vmx.fullpath = "/bin/vmx"

    isolation.tools.copy.disable="FALSE"

    isolation.tools.paste.disable="FALSE"

    isolation.tools.SetGUIOptions.enable="TRUE"

  4. Reboot the ESXi host.

You can also enable clipboard options using PowerShell.

  1. Install the VMware PowerCLI module on your computer;
  2. Connect to vCenter or ESXi:
    Connect-VIServer <FQDN_of_vCenter_or_ESXi_host>
  3. Enable the following options for your VM:
    $VM = Get-VM -Name mun-srv01
    New-AdvancedSetting -Entity $VM.name -Name isolation.tools.copy.disable -Value False -Confirm:$false -Force:$true
    New-AdvancedSetting -Entity $VM.name -Name isolation.tools.paste.disable -Value False -Confirm:$false -Force:$true
    New-AdvancedSetting -Entity $VM.name -Name isolation.tools.setGUIOptions.enable -Value True -Confirm:$false -Force:$true

If the clipboard doesn’t work in the HTML version of your VMware client, try to install VMRC on your computer and use it to connect to the VM.


Posted

in

by

Tags: