The KubeVirt plugin can be used with HashiCorp Packer to create KubeVirt images.
Packer is a tool for creating identical machine images from a single source template.
To get started, see the Packer installation guide.
- Packer
- Kubernetes with KubeVirt installed
- HCL Templating – Use HashiCorp Configuration Language (HCL2) for defining infrastructure as code.
- ISO Installation – Build VM golden images from ISO using the
kubevirt-isobuilder. - ISO Media Files – Embed additional files, or content rendered by the template, into the installation process (e.g.
ks.cfgorunattend.xml). - Boot Command – Automate the VM boot process using a set of commands (via a VNC connection).
- Integrated SSH/WinRM Access – Allows VM provisioning and customization via SSH or WinRM.
kubevirt-iso- This builder starts from a ISO file and builds virtual machine image on a KubeVirt cluster.
Packer supports automatic installation of the Packer plugins.
To install this plugin, copy and paste this code into your Packer configuration:
packer {
required_plugins {
kubevirt = {
source = "github.com/hashicorp/kubevirt"
version = ">= 1.0.1"
}
}
}And now run packer init command. The plugin will be installed automatically.
Download the latest release from the Releases page and then install the plugin:
$ packer plugins install --path packer-plugin-kubevirt github.com/hashicorp/kubevirtClone the repository and build the plugin from the root directory:
$ go build -ldflags="-X github.com/hashicorp/packer-plugin-kubevirt/version.Version=1.0.1" -o packer-plugin-kubevirtThen install the compiled plugin:
$ packer plugins install --path packer-plugin-kubevirt github.com/hashicorp/kubevirtRefer to the usage guidance in the examples of this plugin.
Individuals, including external contributors, who participate in this repository and related project activities may have personal information associated with their GitHub profiles, contributions, and repository activity processed for security, compliance, audit, vulnerability management, and related governance purposes.
For more information about how personal information may be collected, used, shared, retained, and the rights available to individuals, please review the IBM Privacy Statement.
