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

    Automating VM builds on XO with Redhat AAP (Ansible)

    Scheduled Pinned Locked Moved Solved Infrastructure as Code
    6 Posts 5 Posters 205 Views 5 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.
    • M Offline
      Murf
      last edited by

      Hi.
      We are migrating from vMware where we use RedHat Satellite to automate our RHEL builds.
      I dont expect there to be much of any integration between XO and Satellite, however I see quite a few posts about Terraform and Ansible.
      We currently use Redhat Ansible Automation Platform for patching and hardening, and would like to leverage it to build VMs on XO via ansible automation.
      Are there any docs or labs on how to do this please?

      B 1 Reply Last reply Reply Quote 0
      • B Offline
        bufanda @Murf
        last edited by

        @Murf There is a blog post about using XenOrchestra for a dynamic inventory.
        https://xen-orchestra.com/blog/virtops3-ansible-with-xen-orchestra/

        Creating VMs is usually a job done by terraform and not ansible. I know there is an ansible collection for VMWare which can do that but as far as I know there is no collection that is able to manage VMs and sadly Satellite's virt-who doesn't seem to have XenOrchestra support at the moment and since RedHat is pushing OpenShift I don't think it will ever come.

        But there was a wish for a colletion on the DevOps Megathread
        https://xcp-ng.org/forum/post/88993

        B 1 Reply Last reply Reply Quote 1
        • olivierlambertO olivierlambert marked this topic as a question
        • olivierlambertO olivierlambert has marked this topic as solved
        • olivierlambertO Offline
          olivierlambert Vates 🪐 Co-Founder CEO
          last edited by

          Indeed, @bufanda is right and pointing to the right direction. Thanks!

          1 Reply Last reply Reply Quote 0
          • B Offline
            bvitnik @bufanda
            last edited by bvitnik

            @bufanda said in Automating VM builds on XO with Redhat AAP (Ansible):

            ... as far as I know there is no collection that is able to manage VMs and sadly Satellite's virt-who doesn't seem to have XenOrchestra support at the moment and since RedHat is pushing OpenShift I don't think it will ever come.

            But there was a wish for a colletion on the DevOps Megathread
            https://xcp-ng.org/forum/post/88993

            There are Ansible modules for managing VMs in the comunity.general collection. They just don't do it through XO but through XenServer/XCP-ng hosts (or pool masters) directly, using XenAPI. Search for xenserver_* modules in Ansible documentation.

            1 Reply Last reply Reply Quote 0
            • M Offline
              Murf
              last edited by

              Thanks all, much appreciated

              1 Reply Last reply Reply Quote 0
              • nathanael-hN Offline
                nathanael-h Vates 🪐 DevOps Team
                last edited by

                Hello, I suggest you look also for Packer to build ready to use VM templates, with cloud-init, guest tools, and the softwares you'd need. There's a blog post for this https://xcp-ng.org/blog/2024/02/22/using-packer-with-xcp-ng/.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post