whats the proper way to update a vm template?

dirtbag

New Member
Feb 29, 2016
8
1
3
54
so I have a VM that I have converted to a template..
whats the correct way to "un-template" the VM so I can update it and put it back into a template again?
the only option i see that that I have on the template that seems to apply here is "clone",
so it seems that I would have to

1. clone the template to another vm.
2. boot up and update the new vm.
3. convert that new vm to a template.
4. delete my "old" template..

Is there a slicker way of doing this ?

-db
 
Ok. You should not use the templatefeature. It makes no sense for linux. The templatefeature only protect the vm from changes. This is really important for windowsguest (systpreb....) but not for linux. We do this way:

Add a vm with name like "Ubuntu 16.04 Template for XXX" Then do all changes you need. After that stop the VM. Clone the VM so often you like. Start the VM for changes so often you like. And thats it.

BTW: for windows we have alway two vm's. One for all changes and updates, and from them the clone. On the clone we do an sysprep and make an template.
 
You can also go the way down the road of kickstart and preseed. Works very well and you always install a up-to-date version of linux with your defined changes/post install scripts. Combined with PXE I can setup any linux environment with all patches (local mirrors) in under 3-10 minutes (depending on the number of packages to install).

Yes, this takes some time to setup, but the ROI is huge. It is simple to effort to go e.g. from one version of Debian to the next. This also applies to RHEL/OL.

If you want to use LXC, you can use dab to create new daily images.

But to your first question, yes your described way can be done. It's even easier if you script everything. I personally would mount the image, chroot into it and do all the stuff there. Can be done on container and kvm templates.