Skip to content
Back to skills

Vmware Linux Guest

BSecurity

Operate a Linux guest in VMware from Claude Code. Running bash through open-vm-tools with output, exit codes and sudo, keeping background jobs alive, cloud-init with VMware guestinfo or a NoCloud seed, reading and writing guestinfo from the guest, serial console and getty setup, reaching the firmware boot menu, GRUB and an initramfs or LUKS passphrase prompt over VNC, and shared folders. Use when the guest runs Ubuntu, Debian, Fedora, Mint or another Linux distribution.

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

Works with

  • claude code
  • cursor

Security analysis

B75/100
  • criticalModifies startup scripts or system services for persistence

Pro shows the line behind each finding and how to fix it

Scanned November 29, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Vmware Linux Guest?

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

Security grade badge for Vmware Linux Guest
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/dboudreau00-vmware-linux-guest/badge)](https://www.skillsdirectory.com/skills/dboudreau00-vmware-linux-guest)

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-linux-guest
description: Operate a Linux guest in VMware from Claude Code. Running bash through open-vm-tools with output, exit codes and sudo, keeping background jobs alive, cloud-init with VMware guestinfo or a NoCloud seed, reading and writing guestinfo from the guest, serial console and getty setup, reaching the firmware boot menu, GRUB and an initramfs or LUKS passphrase prompt over VNC, and shared folders. Use when the guest runs Ubuntu, Debian, Fedora, Mint or another Linux distribution.
license: MIT
compatibility: VMware Workstation, Player or Fusion with a Linux guest; measured on Ubuntu 24.04.5 (kernel 6.8, cloud-init 26.1, open-vm-tools) under Workstation 26.0.
---

# Linux guests

The tools live in the sibling skills; below, `vmctl.py` is
`python "${CLAUDE_SKILL_DIR}/../vmware-vmrun/vmctl.py"`, `vnc.py` is
`python "${CLAUDE_SKILL_DIR}/../vmware-vnc/vnc.py"` and `vmserial.py` is
`python "${CLAUDE_SKILL_DIR}/../vmware-serial-console/vmserial.py"`.

## Running commands

```bash
vmctl.py run VM.vmx -- 'uname -a; id; df -h /'
vmctl.py run VM.vmx --sudo -- 'journalctl -b -p err --no-pager | tail -20'
vmctl.py run VM.vmx --script-file provision.sh --timeout 3600 --evidence ev/
vmctl.py run VM.vmx --detach -- './long-benchmark.sh'
```

Scripts are copied to `/tmp/vmctl` with Unix line endings (a CRLF script from a
Windows host would fail with `$'\r': command not found`), run with
`runScriptInGuest /bin/bash`, and stdout plus stderr come back with the exit
code. `--sudo` runs `sudo -n bash`, which needs passwordless sudo
(`mkvm.py`'s cloud-config grants it to the lab account).

**Background jobs.** A job backgrounded inside runScriptInGuest has been seen
to die when the script returned (an Ubuntu guest, October 2026). In a November
2026 retest, a plain `nohup sleep 301 > /dev/null 2>&1 &` survived. Do not rely
on either: `--detach` starts the job with `setsid nohup`, every stream
redirected, and an exit-code file to pull later; that survived in testing.

## open-vm-tools

Guest operations need `vmtoolsd` running (`systemctl is-active open-vm-tools`).
Ubuntu cloud images include it. Elsewhere: `apt install open-vm-tools` or
`dnf install open-vm-tools`. `vmctl.py wait-tools` waits until a guest
operation succeeds; `checkToolsState` once said `running` while the VM was in
its firmware menu.

## cloud-init

- **VMware datasource**: cloud-init reads `guestinfo.userdata` and
  `guestinfo.metadata` from the `.vmx` through `vmware-rpctool` (or
  `vmtoolsd --cmd`). Encodings `base64` or `gzip+base64`. `mkvm.py` writes
  them; `mkvm.py cloud-init VM.vmx --user-data FILE` sets them on an existing VM.
- **NoCloud**: a volume labelled `cidata` (ISO 9660 or vfat) holding
  `user-data` and `meta-data` (which must contain `instance-id`).
  `mkmedia.py seed seed.iso --user-data FILE`.
- cloud-init configures a machine once per `instance-id`. To rerun it, change
  the instance-id or run `sudo cloud-init clean --logs` and reboot.
- `cleanup-guestinfo: [userdata, vendordata]` in the metadata blanks the
  guestinfo copies after reading. Verified: a guest user then read `---`.
- The last lines on the serial console name the datasource:
  `Cloud-init v. 26.1 ... finished at ... Datasource DataSourceVMware [seed=guestinfo]`.

## guestinfo from the guest

```bash
vmware-rpctool "info-get guestinfo.stage"          # value the host set with vmctl.py var set
vmware-rpctool "info-set guestinfo.result ok"      # host reads it with vmctl.py var get
```

Any guest user can read guestinfo values. Keep secrets out of them.

## Consoles

- Ubuntu cloud images put `console=tty1 console=ttyS0` on the kernel command
  line, so the kernel, systemd and cloud-init write to the serial log and a
  getty listens on ttyS0.
- `/dev/console` is the **last** `console=`; userspace prompts (a LUKS
  passphrase request from the initramfs) go there and not to the others.
- A getty on a second port for a pipe console:
  `systemctl enable --now serial-getty@ttyS1.service`, then
  `vmserial.py console PIPE --line '' --expect login: ...`
  (see vmware-serial-console; verified).
- A text console over VNC: `vnc.py --vmx VM.vmx key Control_L+Alt_L+F2` for
  virtual console 2 on a desktop system.

## Before the OS: firmware, GRUB, initramfs

- **EFI boot menu**: right after power-on or a reset,
  `vnc.py --vmx VM.vmx key Escape --repeat 40 --gap 0.1` opened VMware's EFI
  Boot Manager; pick an entry with `key Down Return`.
- **GRUB**: when the menu is hidden (cloud images), tap `Escape` (EFI) or hold
  `Shift` (BIOS) during the GRUB stage; at the menu, `e` edits the entry,
  arrows move, `Control_L+x` boots the edited entry.
- **LUKS passphrase**: screenshot until the prompt is visible, then
  `vnc.py --vmx VM.vmx type --file passphrase.txt --enter`, then
  `wait-change` to confirm the guest reacted. A dropped character looks exactly
  like a wrong passphrase, which is why typing is paced.
- **Emergency shell**: append `systemd.unit=emergency.target` (or
  `init=/bin/bash` as a last resort) to the kernel line in GRUB.

## Shared folders

`vmctl.py share enable VM.vmx` and
`vmctl.py share add VM.vmx name /host/path --readonly`, then in the guest:
`sudo mkdir -p /mnt/hgfs && sudo vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other`
(verified on Ubuntu 24.04: the share appeared as `/mnt/hgfs/name`).
`vmx.py isolate` turns shared folders off.

## Logging in at the console over VNC

```bash
vnc.py --vmx VM.vmx type lab --enter
vnc.py --vmx VM.vmx type --file guest-password.txt --enter
vnc.py --vmx VM.vmx wait-stable --quiet 2 --region 0,0,1280,600
```

Verified at Ubuntu's tty1, where `wait-stable` settled with the cursor inside
the region. If something on screen animates (a spinner, a blinking cursor in
some consoles), narrow `wait-stable` and `wait-change` to a region without it.

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.