Our development environment has a bunch of virtual machines running different versions of our software. I want to be able to replace the Managed Image that is running on a VM, without having to destroy and recreate it.
The images are created using packer
, which provisions them with the correct software and dependencies.
Example of Current Workflow:
Machine A is running on Managed Image v2.5
, which runs software with a dependency on Tomcat 10
.
To fix a bug in v2.2
, which depends on Tomcat 9
and thus cannot run on the same VM without changing the dependencies, I have to:
- Destroy the VM
- Recreate it using the same arguments (name, size, etc) but based on
Managed Image v2.2
- Attach the network interface and disks
- Restart it
If feel like there should be an easier solution to this, where it is possible to hot-swap the images, without recreating the full virtual machines. I've looked into swapping the OS disk, but I couldn't figure out a solution that would work with Managed Images instead of VHD's.