Technical

Proxmox configuration validation: check /etc/pve files before you reboot

Proxmox configuration validation: check /etc/pve files before you reboot

Proxmox configuration validation is mostly manual, but there are a few built-in commands that catch the dumb stuff. A bad line in /etc/pve/qemu-server/100.conf will happily let you reboot, then the VM just won’t start. Check it before you reboot.

Pair of black Samsung USB cables neatly arranged on a vibrant yellow surface.

pvesh is the first stop

pvesh talks to the Proxmox API, and it validates configs when you create or update resources. You can use it to test a config without actually applying it. For a VM, the command looks like this:

pvesh create /nodes/pve/qemu -validate-only --vmid 100 --name test --memory 512 --net0 virtio,bridge=vmbr0

If the config is valid, it prints a JSON response with the generated config. If not, it spits out an error. It’s not perfect — it won’t catch every syntax mistake — but it catches a lot.

pmxcfs checks the cluster filesystem

All the config files live in /etc/pve, which is a FUSE mount of pmxcfs. If pmxcfs is unhappy, your configs are not being saved properly. Check it with:

journalctl -u pve-cluster -f

Look for errors about the local filesystem or sync. If you see them, fix that before touching anything else. I’ve had a full disk on the pmxcfs mount cause a VM config to be silently truncated. Not fun.

A close-up of toy figurines with a gaming console showcasing vibrant, moody lighting.

Manual checks for common mistakes

Most of the time, the problem is a typo. Here’s what I check on mine:

  • Every VM config has a vmid.conf in /etc/pve/qemu-server/ and the file name matches the VM ID.
  • Storage names in the config match what’s defined in /etc/pve/storage.cfg.
  • Network bridges in net0 actually exist on the host.
  • For LXC, the ostemplate path points to a real template in the storage.

Run pvesm status to list storage and their paths. Then grep the configs for the storage name to make sure it’s spelled right.

After a change, test a dry run

If you edit a config file directly, don’t just reboot. Use qm showcmd 100 to see the command Proxmox would run to start the VM. It parses the config and prints the QEMU command line. If there’s a syntax error, it’ll fail here instead of at boot.

For containers, pct config 100 prints the parsed config. If it looks wrong, fix it before starting.

My take

Proxmox doesn’t have a single “validate all” command. It’s a mix of pvesh, pmxcfs logs, and manual checks. Annoying, but once you know the three commands, it’s quick. I’d rather spend five minutes checking than thirty minutes figuring out why a VM won’t boot.

If you’re doing this a lot, look at the Proxmox as provider post for a way to automate some of it.

Leave a comment

Comments are reviewed before they appear. Your email is never published.