Skip to content
Back to skills

Vmware Vmx

ASecurity

Read, lint and edit VMware .vmx configuration files without breaking the VM. Replaces keys in place in any letter case, removes duplicates, keeps the file's encoding and line endings, refuses a running or protected VM, redacts secrets in output, and has presets for VNC on loopback, serial ports backed by a file or named pipe, CD-ROM images, floppy images and guest isolation. Use before changing any VM setting by hand, when VMware says "Cannot read the virtual machine configuration file", or w...

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 29, 2026
developmentpythonbashapi

Works with

  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 29, 2026

npx -y skills add dboudreau00/VMWare-VNC-Control-for-Claude --skill vmware-vmx --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Vmware Vmx?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Vmware Vmx
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dboudreau00-vmware-vmx/badge)](https://www.skillsdirectory.com/skills/dboudreau00-vmware-vmx)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: vmware-vmx
description: Read, lint and edit VMware .vmx configuration files without breaking the VM. Replaces keys in place in any letter case, removes duplicates, keeps the file's encoding and line endings, refuses a running or protected VM, redacts secrets in output, and has presets for VNC on loopback, serial ports backed by a file or named pipe, CD-ROM images, floppy images and guest isolation. Use before changing any VM setting by hand, when VMware says "Cannot read the virtual machine configuration file", or when a VM fails to power on after an edit.
license: MIT
compatibility: VMware Workstation, Player or Fusion .vmx files; Python 3.10+, no packages.
---

# Editing .vmx files

A `.vmx` is VMware's dictionary format: one `key = "value"` per line, keys
case-insensitive. Three facts make hand edits dangerous:

- **One duplicate key and VMware refuses the whole file:** *"Cannot read the
  virtual machine configuration file"*. Workstation often wrote the key you are
  about to append (`RemoteDisplay.vnc.enabled = "FALSE"`), sometimes in another
  letter case.
- **VMware rewrites the file at power-off.** An edit made while the VM runs is
  silently lost, and the `.lck` folder next to the `.vmx` says it is running.
- **Mixed line endings** (CRLF appended into an LF file) can break parsing too.

`${CLAUDE_SKILL_DIR}/vmx.py` edits in place: it replaces a key wherever it sits,
drops duplicates, keeps the encoding (the `.encoding` line, a UTF-8 BOM, or
cp1252) and the line endings, writes atomically, refuses a running VM (checked
with `vmrun list` and the `.lck` folder) or a protected one, and prints what
changed with secrets redacted. Below, `vmx.py` means
`python "${CLAUDE_SKILL_DIR}/vmx.py"`.

## Read

```bash
vmx.py show VM.vmx [--prefix ethernet0.] [--show-secrets]
vmx.py get VM.vmx guestOS
vmx.py check VM.vmx           # exit 1 when it finds an error
```

`check` reports duplicate keys, lines that are not `key = "value"`, unbalanced
or unescaped quotes, mixed line endings, a VNC password longer than 8 bytes,
VNC listening beyond loopback or without a password, an `e1000e` or `vmxnet3`
NIC without PCIe root ports, missing ISO, floppy and disk files, and a lock
folder. Run it after any hand edit and before the first power-on.

## Edit (VM powered off)

```bash
vmx.py set VM.vmx memsize=4096 numvcpus=2 [--dry-run]
vmx.py unset VM.vmx 'isolation.tools.*'
```

A trailing `*` in `unset` matches a prefix. `--dry-run` prints the change
without writing. `--force` edits despite a stale `.lck` folder left by a crash,
never a VM that `vmrun list` shows running.

Values are written quoted, with VMware's escapes: a double quote becomes `|22`,
a pipe `|7C`, a newline `|0A`. Backslashes are literal, so Windows paths and
`\\.\pipe\name` need no escaping.

## Presets

```bash
vmx.py vnc VM.vmx --port 5951 --generate-password vnc-password.txt
vmx.py vnc VM.vmx --port 5951 --password-file pw.txt [--ip 127.0.0.1]
vmx.py vnc VM.vmx --off
vmx.py serial VM.vmx --file serial.log           # first free serialN
vmx.py serial VM.vmx --pipe vmlab-com2           # \\.\pipe\vmlab-com2 on Windows, /tmp/... elsewhere
vmx.py serial VM.vmx --off [--index 1]
vmx.py cdrom VM.vmx --iso seed.iso [--slot sata0:2]
vmx.py cdrom VM.vmx --eject [--slot sata0:2]
vmx.py floppy VM.vmx --image unattend.flp
vmx.py isolate VM.vmx [--no-network]
```

- `vnc` writes `enabled`, `port`, `ip` (loopback by default) and `password`,
  removing any `RemoteDisplay.vnc.key` so only one password applies. A
  generated password is written to the file you name and never printed. It
  refuses a password VNC would truncate (more than 8 bytes).
- `serial` picks the first free port: `serialN` is `COM(N+1)` in Windows and
  `ttySN` in Linux. A pipe gets `pipe.endPoint = "server"` (VMware creates it;
  your tool or debugger connects) and `tryNoRxLoss = "TRUE"`; every port gets
  `yieldOnMsrRead = "TRUE"` so a guest polling the port does not burn a core.
- `isolate` disables copy, paste, drag and drop and shared folders, keeps VNC
  on loopback, and with `--no-network` disconnects every network adapter.
  Measured: guest operations (`vmctl.py push` and `run`) still worked with
  these keys set, so an isolated lab VM stays drivable.

## Traps

- Close the VM's tab in the Workstation window before editing: the GUI can
  hold its own copy of the settings and write it back.
- A hand-written `.vmx` with an `e1000e` NIC and no PCIe root ports
  (`pciBridge4` to `pciBridge7` as `pcieRootPort`) has crashed `vmware-vmx` at
  power-on, with vmrun saying only *"The operation was canceled"*. Use `e1000`,
  or add the bridges (`mkvm.py` always writes them).
- `RemoteDisplay.vnc.password` is stored in plain text in the `.vmx`; treat
  the file as a secret. `show` and `get` redact it unless `--show-secrets`.
- `guestinfo.*` keys in the `.vmx` are readable from inside the guest by any
  user (`vmware-rpctool "info-get guestinfo.NAME"`).

See [reference.md](reference.md) for the keys these tools set and why.

Files in this skill

  • SKILL.md4.9 KB
  • reference.md2.7 KB
  • vmx.py32.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.