XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. michael132
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 4
    • Groups 0

    michael132

    @michael132

    0
    Reputation
    1
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    michael132 Unfollow Follow

    Latest posts made by michael132

    • RE: Extracting data from XO with terraformer

      @ddelnano I've been using terraform import to extract configuration data from xo.
      When I run something like terraform import xenorchestra_vm.vm1 <UUID of actual VM> it completes successfully but when I run terraform plan it reports lots of errors.
      The Missing required argument errors can be removed by adding dummy values to the resource eg (cpus = 0).
      There are also Insufficient disk blocks and Insufficient network blocks errors.
      When I examine the terraform.tfstate file, all that config is there (including the missing arguments).
      I'm at a bit of a loss to understand wehat's (not) going on here.

      posted in Infrastructure as Code
      M
      michael132
    • RE: Extracting data from XO with terraformer

      @ddelnano, what arguments do I need to pass to the 'terraform import' command?

      posted in Infrastructure as Code
      M
      michael132
    • RE: Extracting data from XO with terraformer

      Hi @ddelnano,
      many thanks for the reply.
      I don't know how our existing infrastructure compares to others but we have ~50 Hypervisors (all running 8.2.1) and ~2000 VMs.
      The VMs are running a mixture of Debian and Ubuntu and we are planning to upgrade them to a LTS version of Ubuntu.
      Most of the VMs are essentially appliances that don't hold state so we decided that it would be easier to rebuild them using terraform rather than upgrade them in situ.
      I am currently exploring options for pulling the data out of XO but I was kind of hoping that somebody might have already done the heavy lifting 😄

      posted in Infrastructure as Code
      M
      michael132
    • Extracting data from XO with terraformer

      I've recently come across the terraformer project (https://github.com/GoogleCloudPlatform/terraformer/) which supports a number of providers including xenorchestra.
      I am failing to get it to extract the metadata for a single VM to create the terraform code needed to rebuild the VM.
      As I understand it, I need to specify a resource and a filter to get the VM I want.
      When I run

      terraformer import xenorchestra list
      

      to list the supported resources, there is no mention of 'vm', just 'acl' and 'resource_set'.
      I will be extremely grateful if someone can show me how to achieve this.

      posted in Infrastructure as Code
      M
      michael132