A builder plugin for Packer.IO to support building XenServer images.
Go to file
dependabot[bot] d6a302a31d
Bump golang.org/x/crypto from 0.24.0 to 0.26.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.24.0 to 0.26.0.
- [Commits](https://github.com/golang/crypto/compare/v0.24.0...v0.26.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-08 07:49:46 +00:00
.github Use packer-plugin-skaffolding goreleaser action version 2024-06-04 23:15:17 -07:00
builder/xenserver Disable exclusive VNC connection when packer in debug mode 2024-04-10 14:00:36 +02:00
docs/builders/iso Add a new setting HostSshPort 2024-01-17 06:49:43 -08:00
examples Adding a few more config items to docs; Adjusting compile script to be consistent; 2024-01-09 20:33:52 -06:00
version Ensure version package exists and matches existing linker variable on release 2024-06-04 22:46:35 -07:00
.gitignore added vendor/* to .gitignore 2021-02-23 23:54:28 +01:00
.go-version Upgrade go to 1.20 to reflect latest packer-plugins-sdk go version and unblock gomod upgrades 2024-03-05 21:35:34 -08:00
.goreleaser.yml Validate .goreleaser.yml file with 'goreleaser check' 2024-06-04 23:20:13 -07:00
GNUmakefile Add missing Makefile 2022-06-12 15:43:17 -07:00
go.mod Bump golang.org/x/crypto from 0.24.0 to 0.26.0 2024-08-08 07:49:46 +00:00
go.sum Bump golang.org/x/crypto from 0.24.0 to 0.26.0 2024-08-08 07:49:46 +00:00
LICENSE Initial plugin for building XenServer images using Packer.IO 2014-11-10 18:16:02 +00:00
main.go Use correct version package from the main package 2024-06-04 22:54:42 -07:00
README.md Upgrade go to 1.20 to reflect latest packer-plugins-sdk go version and unblock gomod upgrades 2024-03-05 21:35:34 -08: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 compiled 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.6.0"
      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.20

Compile the plugin

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

Documentation for Plugins directory: Official Docs

Linux/MacOS

go build -o packer-plugin-xenserver

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

Windows (Powershell)

go build -o packer-plugin-xenserver

mkdir "%APPDATA%\packer.d\plugins"
cp packer-plugin-xenserver  "%APPDATA%\packer.d\plugins"

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.

If you'd like to support my effort on the project, please consider buying me a coffee

"Buy Me A Coffee"