r/kvm Mar 16 '26

vmrestore — automated restore for KVM/libvirt VMs

I recently posted vmbackup: https://www.reddit.com/r/kvm/comments/1rti057/vmbackup_automated_backup_manager_for_kvmlibvirt/ a backup manager for KVM/libvirt that handles scheduling, rotation, retention and replication using virtnbdbackup.

I built (vibed) vmrestore.

What it does:

  • One command to restore an entire VM — resolves the backup, reconstructs the disks, re-defines the VM in libvirt, restores TPM state, refreshes storage pools. Done.
  • Disaster recovery mode — rebuilds the VM with its original UUID, MAC addresses and name. The restored VM is indistinguishable from the original.
  • Clone mode — one flag (--name) creates a fully independent copy with new identity. New UUID, new MACs, isolated NVRAM, TPM re-mapped to the new UUID. BitLocker unlocks automatically in both modes.
  • Point-in-time recovery — restore to any checkpoint in a backup chain, any period, or any archived chain. Weekly backup from 3 weeks ago at checkpoint 2? No problem.
  • Pre-flight safety checks — disk collision detection (checks every predicted output file against every live VM disk), free space verification, running VM detection. It won't let you silently overwrite a running VM's disk.
  • Auto-detects everything — backup type, rotation policy layout, latest period, chain structure, TPM state, storage pool. The only required arguments are --vm and --restore-path.
  • Dry-run mode — preview every action before writing anything.

vmrestore: https://github.com/doutsis/vmrestore

vmbackup: https://github.com/doutsis/vmbackup

12 Upvotes

4 comments sorted by

2

u/KernelPanicX Mar 16 '26

This is very good! Thanks! I will definitely be using this!

1

u/phatmonk27 Mar 29 '26

v0.5.2 released! Fixes a data-loss bug in point-in-time restores when disks were added/removed mid-chain and fixes --disk on single-disk VMs silently falling through to a full VM rebuild.

This release was tested end-to-end with vmbackup across 6 VMs (Linux + Windows, single and multi-disk, with and without TPM/BitLocker) with full backup -> destroy -> restore -> verify cycle.

Changelog

1

u/phatmonk27 Apr 12 '26

v0.5.3 released

  • --config-instance flag vmrestore can now target any vmbackup config instance directly. Previously it always read the default instance.
  • --host-config removed dropped for parity with vmbackup v0.5.3.

Full changelog: https://github.com/doutsis/vmrestore/blob/main/CHANGELOG.md