Skip to content
Back to skills

Vmware Create Vm

ASecurity

Create VMware Workstation VMs from scratch that install and configure themselves. Writes the disk and a .vmx that boots first time (PCIe root ports, serial log, VNC on loopback), installs Windows unattended from an ISO with an Autounattend.xml floppy and a first-logon bootstrap that installs VMware Tools, or boots a Linux cloud image configured by cloud-init through guestinfo or a NoCloud seed ISO. Also builds ISO 9660 and FAT12 floppy images with no external tools. Use when a task needs a ne...

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

Security analysis

A100/100

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

Scanned November 29, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Vmware Create Vm?

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

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

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-create-vm
description: Create VMware Workstation VMs from scratch that install and configure themselves. Writes the disk and a .vmx that boots first time (PCIe root ports, serial log, VNC on loopback), installs Windows unattended from an ISO with an Autounattend.xml floppy and a first-logon bootstrap that installs VMware Tools, or boots a Linux cloud image configured by cloud-init through guestinfo or a NoCloud seed ISO. Also builds ISO 9660 and FAT12 floppy images with no external tools. Use when a task needs a new test VM, a clean lab, an unattended OS install, a cloud-init seed, or files delivered to a guest with no network.
license: MIT
compatibility: VMware Workstation 17 or later (measured on 26.0) with vmware-vdiskmanager; Python 3.10+, no packages.
---

# Building VMs that set themselves up

Two tools, in `${CLAUDE_SKILL_DIR}`:

- `mkvm.py` builds a VM folder. Below, `mkvm.py` means
  `python "${CLAUDE_SKILL_DIR}/mkvm.py"`.
- `mkmedia.py` builds ISO 9660 + Joliet images and 1.44 MB FAT12 floppies,
  used by mkvm and on its own.

## Linux from a cloud image (fastest)

```bash
mkvm.py create C:\VMs\u24 --os ubuntu --disk-from noble-server-cloudimg-amd64.vmdk --disk-gb 30
python "${CLAUDE_SKILL_DIR}/../vmware-vmrun/vmctl.py" start C:\VMs\u24\u24.vmx
python "${CLAUDE_SKILL_DIR}/../vmware-serial-console/vmserial.py" wait C:\VMs\u24\serial.log --pattern "VMLAB CLOUD-INIT DONE" --since start --timeout 900
python "${CLAUDE_SKILL_DIR}/../vmware-vmrun/vmctl.py" wait-tools C:\VMs\u24\u24.vmx
```

- `--disk-from` takes any VMware disk, including the streamOptimized `.vmdk`
  that cloud images ship as; `vmware-vdiskmanager -r` converts it to a growable
  disk and `--disk-gb` grows it (cloud-init grows the root file system at first
  boot). A qcow2 `.img` is refused with the `qemu-img convert -O vmdk` command
  to run first (WSL has qemu-img).
- The generated `#cloud-config` creates the guest account (`--guest-user`,
  default `lab`) with passwordless sudo and the password in
  `guest-password.txt`, sets the hostname, runs `--bootstrap script.sh` as
  root if given, and writes `VMLAB CLOUD-INIT DONE <hostname>` to `/dev/ttyS0`
  when finished. `--user-data FILE` uses your own instead.
- **Delivery: guestinfo (default) or a seed.** By default the user-data goes
  in the `.vmx` as `guestinfo.userdata` (base64), which cloud-init's VMware
  datasource reads through open-vm-tools; no ISO. The metadata asks cloud-init
  to blank its guestinfo copies after reading (`cleanup-guestinfo`), and a guest
  user then reads `---` instead of the password. `--cloud-init seed-iso` (or
  `seed-floppy`) builds a NoCloud seed labelled `cidata` instead. Both were
  verified on Ubuntu 24.04: cloud-init reported
  `DataSourceVMware [seed=guestinfo]` and `DataSourceNoCloud [seed=/dev/sr0]`.
- `mkvm.py cloud-init VM.vmx --user-data FILE` sets guestinfo user-data on an
  existing VM. cloud-init applies it only when the `instance-id` is new.
- With `--nic none`, an Ubuntu cloud image waits for a network at boot:
  cloud-init finished 163 s into the first boot, against 16 s with NAT.

## Windows from an install ISO

```bash
mkvm.py create C:\VMs\w10 --os windows10 --iso Win10_x64.iso --nic none
python "${CLAUDE_SKILL_DIR}/../vmware-vmrun/vmctl.py" start C:\VMs\w10\w10.vmx
python "${CLAUDE_SKILL_DIR}/../vmware-serial-console/vmserial.py" wait C:\VMs\w10\serial.log --pattern "VMLAB BOOTSTRAP DONE" --since start --timeout 3600
python "${CLAUDE_SKILL_DIR}/../vmware-vmrun/vmctl.py" wait-tools C:\VMs\w10\w10.vmx
```

What happens: Windows Setup finds `Autounattend.xml` on `unattend.flp`, wipes
disk 0, installs image index 1 (`--image-index`, `--image-name`), creates the
local administrator (`--guest-user`, password generated), turns on autologon,
and at first logon runs `bootstrap.ps1` from `payload.iso`. The bootstrap turns
UAC off (guest operations then get a full administrator token), disables sleep,
keeps bugchecks on screen with a kernel dump, optionally enables test signing
(`--test-signing`), installs VMware Tools silently from the Tools CD, runs
`--bootstrap extra.ps1` if given, reports each step on COM1, and reboots.
Measured: a Windows 10 LTSC install went from power-on to
`VMLAB BOOTSTRAP DONE` in about 10 minutes, Tools setup exiting 3010 (success,
reboot needed).

Why a floppy: Windows Setup searches removable read/write media (a floppy)
for `Autounattend.xml` before removable read-only media (CDs), and CDs in
drive-letter order. An install ISO that carries its own `autounattend.xml`
(trimmed builds often do) beats an answer CD but never a floppy.

- **Firmware.** `--os windows10` and `windows11` default to BIOS. On EFI
  (`--firmware efi`), the install CD waits for "Press any key to boot from CD or
  DVD"; send it with `vnc.py --vmx VM.vmx key space --repeat 30 --gap 0.3`
  right after power-on.
- **Windows 11** uses VMware's Windows 10 profile and the answer file's
  `LabConfig` keys to skip Setup's TPM, Secure Boot, RAM and CPU checks,
  because Workstation adds a virtual TPM only to an encrypted VM.
  `--no-bypass-checks` drops them.
- **The answer file holds the password in plain text**, and Windows caches it
  in `C:\Windows\Panther`. Lab VMs only.
- `mkvm.py answer-file Autounattend.xml --firmware efi --password-file pw.txt`
  writes just the answer file (EFI: a 300 MB EFI system partition, a 16 MB MSR,
  then Windows, Microsoft's documented UEFI layout).

## Options worth knowing

`--memory`, `--cpus`, `--disk-gb`, `--firmware bios|efi`, `--nic
nat|hostonly|bridged|none`, `--nic-type e1000|e1000e|vmxnet3`, `--vnc-port`
(default: the first free port from 5951 not used by a sibling VM),
`--no-vnc`, `--no-serial`, `--hostname`, `--extra KEY=VALUE` (any `.vmx` key,
replacing the generated one), `--dry-run` (print the `.vmx`, write nothing).
mkvm refuses a folder that exists and is not empty, and a target inside a
protected folder. It prints the commands to start and watch the VM.

## Media without external tools

```bash
mkmedia.py seed seed.iso --user-data user-data.yaml --hostname lab1
mkmedia.py iso payload.iso --label PAYLOAD --dir ./payload --file extra/tool.exe=./tool.exe
mkmedia.py floppy unattend.flp --label UNATTEND --file Autounattend.xml=./answer.xml
mkmedia.py list seed.iso
mkmedia.py extract seed.iso user-data -
```

(`mkmedia.py` here is `python "${CLAUDE_SKILL_DIR}/mkmedia.py"`.) ISOs carry
ISO 9660 level-1 names plus Joliet long names; floppies carry FAT12 with long
names and a boot sector that runs INT 18h, so a BIOS that tries the floppy
first moves on instead of stopping at "insert a bootable disk".
`SOURCE_DATE_EPOCH` makes images byte-identical across builds. Checked against
isoinfo, xorriso, 7-Zip, blkid, fsck.fat and mtools, and a Linux loop mount.

## After building

- Attach or eject media with `vmx.py cdrom` and `vmx.py floppy` while the VM
  is off; eject the answer floppy once Windows is installed.
- Take a powered-off snapshot (`vmctl.py snapshot VM.vmx clean`) before the
  first test so every run can start from the same state.
- `vmlab.json` in the folder records what was built (no secrets).

Files in this skill

  • SKILL.md7 KB
  • mkmedia.py30.9 KB
  • mkvm.py32.6 KB
  • templates/bootstrap.ps13.3 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.