Using Proxmox in a Development Environment

dpearceFL

Well-Known Member
Jun 1, 2020
125
10
58
66
Don't know if people have considered the use of Proxmox VE as a development environment. Let me explain how I am using it. I am called on to develop installation scripts for Linux VMs. Most of these scripts make changes to the OS or install packages.

Here is my methodology:
  1. Install the OS (make sure you are using a time server). Reboot.
  2. Snapshot the VM calling it something like "BareOS"
  3. Write part 1 of your script. Try it, if it fails, revert to "BareOS". If it works, snapshot the VM as "STEP1_works"
  4. Write part 2 of your script. Try it, if it fails, revert to "STEP1_works. If it works, snapshot the VM as "STEP2_works"
  5. Write part 3 of your script. Try it, if it fails, revert to "STEP2_works". If it works, snapshot the VM as "STEP3_works"
  6. Once you script works, snapshot the VM as "Done".
  7. Put your script into Source Control.
  8. Delete you snapshots.
Using such a methodology, I have saved many hours by not reinstalling the OS, making the same changes over and over again.

BONUS: When you snapshot a VM in Proxmox VE, it also saves the time and date it was snapshotted. So if you revert a snapshot, the VM will come back with the old time. Think time travel back to the past. I usually start my scripts doing the following:
Bash:
systemctl restart chronyd
hwclock -s
sleep 5

Hope this helps someone.
 
That would be good, except I can't use Docker, Podman or Kubernetes for my usual work.