Hi all,
I want to provide support for a sysadmin/netadmin course at our university with ONe, and I am looking for best practices or other hints. The course has about 200 students divided into 5 to 10 on-line study groups. Students in a particular group are supposed to work at the dedicated time (scheduled weekly) together with the lecturer. Each student will use two pre-installed VMs on a dedicated L3 prefix, with in-band access over SSH (or SSH port-forwarding), provided that they do not manage to cut their network off :-), and - if necessary - out-of-band VNC access in Sunstone.
I am thinking about the following setup: create a pair of VMs for each student, put them on a shared L2 network with non-overlapping per-student L3 prefix (e.g student 1 will have 10.0.1.10/24 and 10.0.1.11/24, student 2 will have 10.0.2.10/24 and 10.0.2.11/24, and so on). Then I will create a gateway VM for this network with public IP address, SSH+LDAP authentication, and outgoing SNAT, connected to that internal L2 network with many per-student IP addresses (10.0.1.1/24, 10.0.2.1/24, and so on). The students’ VMs will have a default route to this 10.x.y.1 address from their /24 prefix.
Then to conserve the resources, I will set up periodic undeploy hard of these VMs every evening, and a rollback to the “gold standard” snapshot few minutes later. Before the lesson, students will start their VMs themselves, so the CPU and memory will not be used all the time for all 200 students.
Does the above sound feasible? Do you use ONe for academic courses in a similar way? What is your experience and best practices?
I have few problems with the above:
-
when I want to create the image for these students’ VMs with a “gold standard” snapshot, I cannot make it non-persistent, because an image with snapshots apparently cannot be made non-persistent.
-
so I instead wanted to prepare a template using a non-persistent image without snapshots, and create the snapshot only after the instantiation. I have set up in “Actions” of the template the following way:
-
one-time relative action +5 minutes: poweroff
-
one-time relative action +10 minutes: create a snapshot of the disk 0
-
periodic hourly action at Xh 30 min: undeploy hard (for production use, I will make it daily instead of hourly, of course)
-
periodic hourly action at Xh 35 min: disk-snapshot-revert of the disk 0 to the snapshot 0.
-
But when I instantiated such a template, the course of actions did not go as I expected, according to the VM log (i removed some entries from the log to make it shorter).
Fri Feb 26 13:16:25 2021 [Z0][VM][I]: New LCM state is PROLOG
Fri Feb 26 13:16:35 2021 [Z0][VM][I]: New LCM state is RUNNING
Fri Feb 26 13:16:41 2021 [Z0][VM][I]: New LCM state is SHUTDOWN_UNDEPLOY
(the above only after 6 seconds instead of 5 minutes, and undeploy instead of poweroff?)
Fri Feb 26 13:16:48 2021 [Z0][VM][I]: New state is UNDEPLOYED
(the snapshot creation of the disk 0 scheduled at +10 minutes did not get done at all, so I manually
started the VM an hour later)
Fri Feb 26 14:29:42 2021 [Z0][VM][I]: New state is ACTIVE
Fri Feb 26 14:29:51 2021 [Z0][VM][I]: New LCM state is RUNNING
Fri Feb 26 14:29:58 2021 [Z0][VM][I]: New LCM state is SHUTDOWN_POWEROFF
(why the poweroff here? it was supposed to be one-time action?)
Fri Feb 26 14:32:39 2021 [Z0][VM][I]: New state is POWEROFF
(now finally the initial snapshot is being created, why now?)
Fri Feb 26 14:32:40 2021 [Z0][VM][I]: New state is ACTIVE
Fri Feb 26 14:32:40 2021 [Z0][VM][I]: New LCM state is DISK_SNAPSHOT_POWEROFF
Fri Feb 26 14:32:42 2021 [Z0][LCM][I]: VM disk snapshot operation completed.
Fri Feb 26 14:32:42 2021 [Z0][VM][I]: New state is POWEROFF
(at :35 there is scheduled revert to the gold standard, is't it too fast at :32?)
Fri Feb 26 14:32:56 2021 [Z0][VM][I]: New LCM state is DISK_SNAPSHOT_REVERT_POWEROFF
Fri Feb 26 14:33:00 2021 [Z0][VM][I]: New LCM state is LCM_INIT
(and now its getting undeployed - why now?)
Fri Feb 26 14:33:13 2021 [Z0][VM][I]: New LCM state is EPILOG_UNDEPLOY
Fri Feb 26 14:33:18 2021 [Z0][VM][I]: New LCM state is LCM_INIT
Did I set up anything incorrectly?
Thanks!
-Yenya