XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Help Me Grasp Templates

    Scheduled Pinned Locked Moved Solved Xen Orchestra
    7 Posts 2 Posters 1.6k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • planedropP Offline
      planedrop Top contributor
      last edited by

      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.

      planedropP 1 Reply Last reply Reply Quote 1
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        As they don't use any resource, I suggest to regenerate them with /usr/bin/create-guest-templates

        planedropP 1 Reply Last reply Reply Quote 0
        • planedropP Offline
          planedrop Top contributor @planedrop
          last edited by

          @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.

          planedropP 1 Reply Last reply Reply Quote 0
          • olivierlambertO Offline
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            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.

            planedropP 1 Reply Last reply Reply Quote 1
            • planedropP Offline
              planedrop Top contributor @planedrop
              last edited by

              @planedrop Oh and ignore the part about deleted templates, forgot to restart XO after deleting them, that's on me.

              1 Reply Last reply Reply Quote 0
              • planedropP Offline
                planedrop Top contributor @olivierlambert
                last edited by

                @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?

                1 Reply Last reply Reply Quote 0
                • olivierlambertO Offline
                  olivierlambert Vates 🪐 Co-Founder CEO
                  last edited by

                  As they don't use any resource, I suggest to regenerate them with /usr/bin/create-guest-templates

                  planedropP 1 Reply Last reply Reply Quote 0
                  • planedropP Offline
                    planedrop Top contributor @olivierlambert
                    last edited by

                    @olivierlambert This did it, thank you so much!

                    1 Reply Last reply Reply Quote 1
                    • olivierlambertO olivierlambert marked this topic as a question on
                    • olivierlambertO olivierlambert has marked this topic as solved on
                    • First post
                      Last post