Getty Images


An introduction to VMware KVM mode

VM management often requires multiple monitors. KVM mode lets you set hot keys to navigate between VMs and the OS, so no task -- or workflow -- is lost among application windows.

In VMware Workstation, all online VMs run in their own windows. Admins can switch between VMs with the Alt-Tab shortcut to toggle through all open windows or highlight the VM's window, just like any Windows application.

A VM can also run in full-screen mode. To change between the input for a VM in full-screen mode and the original OS requires a series of actions. When an admin runs multiple VMs, it is not straightforward to toggle between VMs in full-screen mode.

The VMware Workstation keyboard, video and mouse (KVM) mode feature simplifies switching between VMs in full-screen mode and the native OS with just one hot key. KVM mode lets admins run VMs in the background and quickly access the host OS with said hot key.

Find and run KVM mode files

KVM mode is available with the vmware-kvm.exe program located in the installation folder of VMware Workstation, named C:\Program Files (x86)\VMware\VMware Workstation.

When the executable runs without any parameters, the software displays the following options.

VMware KVM mode running vmware-kvm.exe
What vmware-kvm.exe looks like when it runs without parameters.

The command's format is to specify one of the listed options first, then state the path to the VM configuration file. When admins specify the path to a VM's VMX file, that machine automatically starts up. Additional parameters can power off, suspend or reset a VM.

Admins must create VMs through the VMware Workstation GUI. A VM has several files, such as the BIOS's NVRAM file and the virtual disk's VMDK file. The VMX file starts VMs from the command line. This plain text file contains the VM's settings and a list of virtual hardware available to the VM.

When the VM powers on via the vmware-kvm.exe command, the VM automatically starts in full-screen mode and the host OS becomes unavailable for input. Switching between the VM screen and the host OS can be done with the Pause key; admins can use the Pause key to navigate multiple VMs started in KVM mode while running in full-screen mode.

Admins can modify what hot key they use to toggle between VMs with the --preferences parameter. This parameter also helps with other display settings, such as monitor selection, so admins can avoid starting VMs on their primary display and interrupting any critical workflows.

VMware KVM mode preference parameter options
The options that admins can modify with the --preferences parameter.

Detach VMs from KVM mode

VMware KVM mode can control online VMs. It's impossible to manage or control KVM mode VMs with the VMware Workstation GUI. The VM shows up in the library and displays as active, but when admins try to work with the VM through the GUI, a message appears saying the VM is in use.

To remedy this, use the --detach parameter. This parameter disconnects the VM from KVM mode so that it can open in the VMware Workstation GUI. It's not necessary to restart the VM.

The vmware-kvm.exe command has limited features, but admins can also control and manage VMs with vmrun. This command can easily list any VMs that are running. The following image shows the vmrun list command with two VMs.

VMware KVM mode output of vmrun list command
Use vmrun to show which VMs are online.

Admins can also use vmrun to create, delete and revert VM snapshots started in KVM mode.

VMware KVM mode options to create and modify snapshots
Create a snapshot and show a list of snapshots with vmrun.

Combined with other command-line utilities, VMware Workstation KVM mode is an effective tool when admins must run VMs full-screen and desire easy control to switch between screens.

Dig Deeper on Containers and virtualization

Software Quality
App Architecture
Cloud Computing
Data Center