Skip to content

How to set up and configure environment to build images for Hyper-V ? #223

@yuravk

Description

@yuravk

It will be good to know how to set up and configure environment to build cloud images for Hyper-V. As it is complex task which include different components like Windows system with Hyper-V and WSL with "interconnection" between them.

My try results with no success to build the image.

The environment runs Windows Server 2025 Datacenter (build 26100.2894) as VMware VM.

The following roles and components are installed:

  1. Hyper-V 10.0.26100.1882
  2. packer version 1.12.0 [go1.22.9 windows amd64]
  3. WSL version 2.4.10.0 with:
  • AlmaLinux 9.5
  • ansible package version 7.7.0

Building of hyperv-iso.almalinux-9 with packer on Windows PowerShell results:

Error: Failed preparing provisioner-block "ansible" ""

  on almalinux-9-vagrant.pkr.hcl line 230:
  (source code not available)

1 error(s) occurred:

* Error running "ansible-playbook --version": exec: "ansible-playbook":
executable file not found in %PATH%

I believe there is a kind of misconfiguration on the environment.
Having a detailed instruction for that will be very helpful.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions