Revert VM on restart

John Stilwell

New Member
Feb 11, 2016
1
0
1
43
Hello, I am new to Proxmox and I would like to setup one VM to go back to the state before to was booted. In essence every time you turn on the VM it would be starting from a fresh install.
 
I never used this on Proxmox, but on QEMU and qcow2 container in the past.

Please have a look at the -snapshot option in the kvm manpage:

-snapshot
Write to temporary files instead of disk image files. In this case, the raw disk image you use is not written back. You can however force the write back by pressing C-a s.

You have to provide the additional command via args parameter (https://pve.proxmox.com/wiki/Manual:_vm.conf) in your vm configuration file in /etc/pve/qemu-server.

This allows kiosk mode and I think is what you want.
 
Hi Tom,

I do not think this is what he wanted, because you have another type of snapshot that has to be managed manually. The snapshot feature I mentioned creates automatically a temporary difference image where all changes are written to, which is discarded at power down. It is equivalent to your solution, but does this automatically and that is what he asked for.

Best,
LnxBil