Skip to content

docs(virtualization): guide for building a Windows golden image with Packer - #666

Open
scooby87 wants to merge 6 commits into
mainfrom
docs/windows-golden-image
Open

docs(virtualization): guide for building a Windows golden image with Packer#666
scooby87 wants to merge 6 commits into
mainfrom
docs/windows-golden-image

Conversation

@scooby87

Copy link
Copy Markdown

This adds a guide for building a Windows golden image with Packer on KubeVirt, superseding the closed #665 (its fork head branch was deleted, so it could not be reopened — this is a fresh PR from a branch pushed directly to the upstream repo).

It already addresses the three points from the #665 review: (1) it drops the non-existent cloneType vm-disk field and instead describes the CDI clone flow, noting that the clone strategy is chosen by CDI and the storage backend rather than set in the manifest, with the cdi.kubevirt.io/cloneType: copy annotation offered as a remedy when a smart-clone reports Succeeded but leaves the target empty; (2) the VMInstance example now sets instanceProfile: windows.2k22.virtio and instanceType: u1.large explicitly; (3) the plugin is the published github.com/hashicorp/kubevirt builder, declared in required_plugins and installed with packer init rather than any manual/community install.

The guide is fully generic with no client-specific content.

Alexey Artamonov added 5 commits August 21, 2026 21:25
…Packer

Add a Virtualization guide covering how to build a customized Windows
Server golden image with Packer against the KubeVirt builder, harden it,
capture the disk, and register it in Cozystack — either as a cloneable
vm-disk (copy-clone) or, for a bare URL-reachable base, via
vm-default-images. Complements the manual "Running Windows VMs" guide
and cross-links Cloneable Virtual Machines and Golden Images.

Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
Expand the Windows golden-image guide with the actual Packer usage:
installing the community KubeVirt builder plugin, a complete
windows.pkr.hcl (source + build with WinRM communicator and provisioners),
the variables file, and the role of autounattend.xml in enabling WinRM
for the build. Previously the guide only showed `packer build` without the
configuration.

Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
…ric)

Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
…ofile

- Plugin: the KubeVirt builder is the published github.com/hashicorp/kubevirt
  plugin, installed with `packer init` — drop the incorrect "community /
  install manually / cannot packer init" wording and the misattribution.
- Register: describe the CDI-based clone flow (capture a vm-image DataVolume
  in cozy-public, clone per VM via source.image.name, verify it actually has
  data) instead of a non-existent cloneType field.
- VMInstance example: set instanceProfile: windows.2k22.virtio and
  instanceType explicitly, so the VM does not fall back to the ubuntu profile.
- Fix invalid HCL in variables (comma-separated attributes) and remove the
  duplicated ISO DataVolume apply.

Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
…empty smart-clones

Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
@netlify

netlify Bot commented Aug 24, 2026

Copy link
Copy Markdown

Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit b63b492
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/6a8c7adf5f86ba00080737ee
😎 Deploy Preview https://deploy-preview-666--cozystack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 56f59c58-e5b4-4692-a911-75540edf365d


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…lume name

Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant