Skip to content

vatesfr/packer-plugin-xenserver

 
 

Repository files navigation

XCP-ng packer.io builder

This builder plugin extends packer.io to support building images for XCP-ng.

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-ng
  3. New feature are added on regular basics, following request made via issues or PR

Status

At the time of this writing (January 2026) the packer builder has been verified to work with XCP-ng 8.3 and we can create VMs with the templates built by this Packer plugin either through the xenorchestra terraform provider or using Xen Orchestra web UI.

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

  • 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.9.0"
      source = "github.com/vatesfr/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

Developing the builder

Dependencies

Compile the plugin

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

Documentation for Plugins directory: Official Docs

To compile the plugin, you can use this commands:

make build
make dev

make dev should output

Successfully installed plugin github.com/vatesfr/xenserver from <path>/packer-plugin-xenserver/packer-plugin-xenserver to ~/.packer.d/plugins/github.com/vatesfr/xenserver/packer-plugin-xenserver_v0.9.0-dev_x5.0_linux_amd64

Then you can use your build file like usual.

Documentation

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

Support

You can discuss any issues you have or feature requests directly on this repository, or on the forum.

About

A builder plugin for Packer.IO to support building XCP-ng images.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.3%
  • Makefile 0.7%