mandatory citrix server

G

gregor

Guest
Good day, two little questions,

I have some machines my students may play on and do whatever they want but I want alle the settings etc back during the night so:

1 I know for sure that I read it somewhere, but how to you make a mandatory file, So the machine will be exact the same after a reboot. I know you should at some rule in a config file but can't find i back

2 Is there a way to stop and start an machine in a script every night at 2 o'clock.

thnx
 
Good day, two little questions,

I have some machines my students may play on and do whatever they want but I want alle the settings etc back during the night so:

1 I know for sure that I read it somewhere, but how to you make a mandatory file, So the machine will be exact the same after a reboot. I know you should at some rule in a config file but can't find i back

2 Is there a way to stop and start an machine in a script every night at 2 o'clock.

thnx


Nobody, please if anybody has an idea I would be very pleased
 
you can use base images for that. check out the man pages for qemu-img, it will tell you how to create a disk image that only saves the differences from a base image (qemu-img create -b <base image>).

you can then set up cronjobs to reboot the VMs at night... or rather create a script run by cron that does:

Code:
#!/bin/bash
qm shutdown -forcestop 1 $1
sleep 1 #for good measure
rm /path/to/your/vms/$1/vm-$1-disk-1.qcow2
qemu-img create -b /path/to/base-image /path/to/your/vms/$1/vm-$1-disk-1.qcow2
qm start $1

please note that this is the most rudimentary form of script. if you call it with a VMID, it will reboot that VM. this script needs a check if the VMID exists and other safety things like that (like... check whether the storage location is writeable and all these nice things youll want to check in a safe script)

PS: what does your question have to do with the thread subject (citrix)?
 
Last edited:
PS: what does your question have to do with the thread subject (citrix)?

Thanks for the replay, I'm going to work on that. About your question, another title would be better i guess but I thought that go back to an image was called mandatory :rolleyes:
 

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!