Help Me Grasp Templates
-
Been digging on this for a while and seems there is very little documentation on how templates work within XO/XCP-ng and I'm honestly a bit confused.
I personally want way less templates within the system so I attempted to delete most of them but some aren't letting me for some reason (if someone wants details on this let me know).
But after deleting them I can't seem to create new generic templates to use, and if I'm being honest I don't even fully understand what templates are doing.
If I create say a Win 10 VM I can select an Ubuntu template and just modify the settings to whatever I want, so what makes it an Ubuntu template?
If I create a template of my own though, based on a VM, and then try to use it, I can't modify the storage size for that VM.
Seems to me there are 2 or more types of templates and I honestly don't get what they do, so hoping someone can provide a summary.
To be extra clear, I'm no noob with XOA and XCP-ng, use both in big production environments and love them, just never fully got the template portion of things and trying to clean that up in my lab now.
-
As they don't use any resource, I suggest to regenerate them with
/usr/bin/create-guest-templates
-
@planedrop Oh and to add to this, why is it not possible to create a VM without selecting a template? Seems that should be a normal thing.
-
Hi,
Bundled template are just "empty shells" with basic "BIOS" configuration, mostly for improve the compatibility with Xen. There's some specific "keys" that will improve Windows support for Windows VMs and such things.
Also in the past, you have PV and HVM templates, helping you to avoiding thinking about "internal" choices because the template does that for you. Now everything is HVM, there's still minor things.
But it's less critical than in the past They aren't using any space, they are just "configuration" files if you like.
Also, they are mandatory, because VM creation isn't creation from thin air, but always "cloning" behind the scene (cloning the template and becoming a VM).
It's more clear if you start to convert a VM into a template: when you'll create a new VM from the template, it will be cloned, not "using" the template directly. Note: a template from a real VM is VM configuration + its disks. Not just empty shells.
-
@planedrop Oh and ignore the part about deleted templates, forgot to restart XO after deleting them, that's on me.
-
@olivierlambert Thanks, this already helps a lot!
So my next question would be, how do I get the included templates back since I deleted them all lol? I want to keep things cleaner so I'd prefer to select only a handful of them, is this possible?
-
As they don't use any resource, I suggest to regenerate them with
/usr/bin/create-guest-templates
-
@olivierlambert This did it, thank you so much!
-
-