A builder plugin for Packer.IO to support building XenServer images.
Go to file
2021-11-03 07:49:23 -07:00
.github/workflows Revert "Use go 1.14" 2021-04-17 14:45:01 +02:00
builder/xenserver Remove changes that will be part of another pull request 2021-11-03 07:48:02 -07:00
docs/builders/iso Removed centos-example 2021-04-22 15:33:27 +02:00
examples Removed centos-example 2021-04-22 15:33:27 +02:00
.gitignore added vendor/* to .gitignore 2021-02-23 23:54:28 +01:00
.goreleaser.yml Adjust goreleaser file to align with upstream and update docs about go1.16 upgrade 2021-03-09 21:30:51 -08:00
.travis.yml Rebase and add USE_XE option to xva export 2016-07-15 09:54:23 -07:00
go.mod Update go.mod to reflect currently supported go version 2021-03-23 23:36:50 -07:00
go.sum Clean up go.sum by running 2021-11-03 07:49:23 -07:00
LICENSE Initial plugin for building XenServer images using Packer.IO 2014-11-10 18:16:02 +00:00
main.go Remove prerelease suffix 2021-03-09 22:29:34 -08:00
packer.json Get plugin building and mostly working 2020-09-13 01:22:59 -07:00
README.md Update set up instructions to include packer init 2021-04-22 20:15:25 -07:00

XenServer packer.io builder

This builder plugin extends packer.io to support building images for XenServer.

This is a fork of the original builder since the original project was abandoned and no longer compilied with recent versions of Go or worked with Xenserver 7.6 and later.

It improves the original project in the following ways:

  1. Developed alongside the Xenorchestra terraform provider to ensure the hashicorp ecosystem is interoperable.
  2. Reimplements how the boot commands are sent over VNC to be compatible with later versions of Xenserver (Citrix hypervisor) and XCP

Status

At the time of this writing the packer builder has been verified to work with Xenserver 7.6 and can launch VMs with the packer output through the xenorchestra terraform provider.

The following list contains things that are incomplete but will be worked on soon:

  • The documentation is still in an inconsistent state with upstream
  • XVA builder is untested
  • Lots of dead code to remove from upstream

Using the builder

The packer builder can be installed via packer init as long as the packer template includes the following in it's pkr.hcl file

packer {
  required_plugins {
   xenserver= {
      version = ">= v0.3.2"
      source = "github.com/ddelnano/xenserver"
    }
  }
}

The following command will install the packer plugin using the Ubuntu example provided in this repository.

packer init examples/ubuntu/ubuntu-2004.pkr.hcl

If you are using an older version of packer or are still using json templates you will need to download the relevant release from the project's releases page and copy the binary to ~/.packer.d/plugins/packer-builder-xenserver-iso.

Developing the builder

Dependencies

  • Packer >= v1.7.1 (https://packer.io)
  • XenServer / Citrix Hypervisor > 7.6
  • Golang 1.16

Compile the plugin

Once you have installed Packer, you must compile this plugin and install the resulting binary.

$ go build -o packer-plugin-xenserver

# Add the builder to the location packer expects it to be installed in
$ mkdir -p ~/.packer.d/plugins/
$ cp builder-xenserver-iso  ~/.packer.d/plugins/packer-builder-xenserver-iso

Documentation

For complete documentation on configuration commands, see the xenserver-iso docs

Support

You can discuss any issues you have or feature requests in Discord.