Need VM to discard any changes to the disk on next boot

mcunicode

Member
Dec 5, 2020
6
0
6
50
Hi,

I am setting up a "public" gaming stations for the staffs. As a lot of staffs maybe making changes to the system, downloading files, i would need these changes to be discarded on the next boot. The system will always boot into the original image when it were first installed.

Of course, only authorised admin could can make changes to the system.

I found a software called Reboot and Restore, however, the normal user could see it and they could turn it off.

Is there a way that we could do it at the proxmox host layer?
 
I keep one VM regularly up to date and create a full clone (slow) that is turned into a template (which cannot be changed) with a self-destruct hookscript. Each time I need a disposable VM, I create a linked clone from the template (very fast) and start it. They are all removed upon shutdown automatically.
 
Is there a way of setting a action on shutdown? So the "clone" can delete itself, and reclone?
I have found an easier way. In the disk that you want to discard, set the snapshot option. It will discard once it is shutdown and start again (not reboot though )
 
That is fine. No script needed.
If you reboot, be nice, because someone will "think" there change is persisted, when in reality its not.
 
With QEMU/KVM, you can create immutable disk images that have all changes in a temporary layer that gets discarded after the VM is powered down. The parameter -snapshot should do just that.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!