Dear Community,
When I provision a LXC container in Proxmox, it is quite difficult to reset it to an initial state. I want to override the rootfs with a clean image from the template and reinitialize the basic setup Proxmox does (like install SSH keys, configure network).
The reason for this is that I am working with configuration management systems (like Ansible) and sometimes, when you try out things that don't work as expected during development, it is easier to just revert and reinstall everything from scratch than try to undo what you have done. Like with a Dockerfile that builds an image from scratch.
Now when you work with storage that does not support snapshots (I work with LVM in one case as LVM-Thin has not the performance I need because of fragmentation and zeroing) and when you have automatic backups that delete the old ones automatically, then you have no point to return most of the time. Currently I have to show the config, delete and recreate the container each time.
With VMs, it is very easy to just reinstall over the drive, just reformat the drive during installation. The configuration can be the same, I just add an IDE ISO image and boot from CD/DVD and I have not to delete and recreate the VM. But with containers, no such method exists, to just overwrite the rootfs disk.
When you have to delete and recreate the container, it takes a lot of time to click through the wizard.
A button that just recreates the container with the current config from the template would be perfect. Overwrite the container would it be.
Or is there any other possibility, like for example show the console command that is needed to create the container (which can be appended with --force flag and should do it)?
Thank you!
Addy90
When I provision a LXC container in Proxmox, it is quite difficult to reset it to an initial state. I want to override the rootfs with a clean image from the template and reinitialize the basic setup Proxmox does (like install SSH keys, configure network).
The reason for this is that I am working with configuration management systems (like Ansible) and sometimes, when you try out things that don't work as expected during development, it is easier to just revert and reinstall everything from scratch than try to undo what you have done. Like with a Dockerfile that builds an image from scratch.
Now when you work with storage that does not support snapshots (I work with LVM in one case as LVM-Thin has not the performance I need because of fragmentation and zeroing) and when you have automatic backups that delete the old ones automatically, then you have no point to return most of the time. Currently I have to show the config, delete and recreate the container each time.
With VMs, it is very easy to just reinstall over the drive, just reformat the drive during installation. The configuration can be the same, I just add an IDE ISO image and boot from CD/DVD and I have not to delete and recreate the VM. But with containers, no such method exists, to just overwrite the rootfs disk.
When you have to delete and recreate the container, it takes a lot of time to click through the wizard.
A button that just recreates the container with the current config from the template would be perfect. Overwrite the container would it be.
Or is there any other possibility, like for example show the console command that is needed to create the container (which can be appended with --force flag and should do it)?
Thank you!
Addy90