Problem:
Giving it another try with the image based provisioning of windows in VMware but having some issues I hope someone can give me a hint where to look.
I did vaguely follow RLabs: Provisioning Windows with Foreman on VMware from template | Andre Ramoni
Template within VMware is there.
OS is configured with only the “Windows default finish” template and a slightly changed “Windows default user data” user data template.
Within the compute resource I did configure the image to link to the OS, selected above template/image and checked the user data flag.
First error I had was the user data script “Windows default user data” having the password set to <%= host_param(‘win_password’) %> which seems to be not present (anymore) and thus erroring out with parsing error. Changing it to <%= host_param(‘root_pass’) %> might have solved that for me.
In UI during creation of the host the user data template for provisioning is properly resolved and marked green. But with Submitting the task its reporting the error and not even trying to deploy anything:
Win2k25 needs user data, but WindowsServer 2025 is not associated to any provisioning template of the kind user_data. Please associate it with a suitable template or uncheck ‘User data’ for Win2k25.
Some config snippets:
hammer os info --id 23
Id: 23
Title: WindowsServer 2025
Release name:
Family: Windows
Name: WindowsServer
Major version: 2025
Minor version:
Partition tables:
Default templates:
Windows default finish (finish)
Windows default user data Custom (user_data)
Architectures:
x86_64
Installation media:
Templates:
Linux host_init_config default (host_init_config)
Windows default finish (finish)
Windows default iPXE (iPXE)
Windows default user data (user_data)
Windows default user data Custom (user_data)
Windows peSetup.cmd (script)
Parameters:
hammer template info --id 252
Id: 252
Name: Windows default user data Custom
Type: user_data
Description:
Locked: no
Operating systems:
WindowsServer 2025
Locations:
MYLOCATION
Template Combinations:
during resolving the template via UI
2025-11-14T14:45:33 [I|app|57a6b7c7] Parameters: {“authenticity_token”=>“”, “host”=>{“name”=>“testwin”, “organization_id”=>“1”, “location_id”=>“5”, “hostgroup_id”=>“5”, “compute_profile_id”=>“4”, “content_facet_attributes”=>{“content_source_id”=>“2”,
“lifecycle_environment_id”=>“1”, “content_view_id”=>“2”}, “managed”=>“true”, “progress_report_id”=>“[FILTERED]”, “type”=>“Host::Managed”, “interfaces_attributes”=>{“0”=>{“_destroy”=>“0”, “type”=>“Nic::Managed”, “identifier”=>“”, “name”=>“testwin”, “domain_id”=>“2”, “subnet_id”=>“733”,
“ip”=>“172.27.64.123”, “ip6”=>“”, “managed”=>“0”, “primary”=>“1”, “provision”=>“1”, “execution”=>“1”, “virtual”=>“0”, “tag”=>“”, “attached_to”=>“”, “compute_attributes”=>{“type”=>“VirtualVmxnet3”, “network”=>“dvportgroup-264”}},
“new_interfaces”=>{“_destroy”=>“1”, “type”=>“Nic::Managed”, “mac”=>“”, “identifier”=>“”, “name”=>“”, “domain_id”=>“”, “subnet_id”=>“”, “ip”=>“”, “ip6”=>“”, “managed”=>“1”, “primary”=>“0”, “provision”=>“0”, “execution”=>“0”, “virtual”=>“0”,
“tag”=>“”, “attached_to”=>“”, “compute_attributes”=>{“type”=>“VirtualE1000”, “network”=>“dvportgroup-442352”}}}, “compute_attributes”=>{“cpus”=>“1”, “corespersocket”=>“1”, “memory_mb”=>“1024”, “firmware”=>“uefi”, “cluster”=>“MYLOCATION-CL9”,
“resource_pool”=>“Resources”, “path”=>“/Datencenter/MYLOCATION/vm”, “guest_id”=>“windows2022srvNext_64Guest”, “hardware_version”=>“vmx-19”, “memoryHotAddEnabled”=>“0”, “cpuHotAddEnabled”=>“0”, “add_cdrom”=>“0”,
“boot_order”=>[“network”, “disk”], “start”=>“1”, “annotation”=>“”, “virtual_tpm”=>“0”, “controllers”=>“{“controllers”:[{“type”:“ParaVirtualSCSIController”,“key”:1000}],
“volumes”:[{“thin”:true,“name”:“Hard disk”,“mode”:“persistent”,“sizeGb”:50,“controllerKey”:1000,“datastore”:“MYLOCATIONcl9vsan”,“storagePod”:null}]}”,
“image_id”=>“503681e4-9c57-878b-8cf1-b786f8b6864c”}, “architecture_id”=>“1”, “operatingsystem_id”=>“23”, “provision_method”=>“image”, “build”=>“1”, “medium_id”=>“”, “ptable_id”=>“”,
“pxe_loader”=>“PXELinux BIOS”, “disk”=>“”, “root_pass”=>“[FILTERED]”, “is_owned_by”=>“14-Users”, “enabled”=>“1”, “comment”=>“”, “overwrite”=>“false”}, “fakepassword”=>“[FILTERED]”, “provisioning”=>“image”}
2025-11-14T14:45:33 [W|app|57a6b7c7] Could not find a provider for testwin. Providers returned {“MediumProviders::Default”=>[“WindowsServer 2025 medium was not set for host ‘testwin’”,
“Invalid medium ‘’ for ‘WindowsServer 2025’”], “Katello::ManagedContentMediumProvider”=>[“Kickstart repository was not set for host ‘testwin’”]}
Actual submitting:
2025-11-14T14:46:10 [I|app|97ad4af9] Started POST “/hosts” for 10.11.9.199 at 2025-11-14 14:46:10 +0100
2025-11-14T14:46:10 [I|app|97ad4af9] Processing by HostsController#create as /
2025-11-14T14:46:10 [I|app|97ad4af9] Parameters: {“authenticity_token”=>“”, “host”=>{“name”=>“testwin”,
“organization_id”=>“1”, “location_id”=>“5”, “hostgroup_id”=>“5”, “compute_profile_id”=>“4”, “content_facet_attributes”=>{“content_source_id”=>“2”, “lifecycle_environment_id”=>“1”, “content_view_id”=>“2”}
, “managed”=>“true”, “progress_report_id”=>“[FILTERED]”, “type”=>“Host::Managed”, “interfaces_attributes”=>{“0”=>{“_destroy”=>“0”, “type”=>“Nic::Managed”, “identifier”=>“”, “name”=>“testwin”,
“domain_id”=>“2”, “subnet_id”=>“733”, “ip”=>“172.27.64.123”, “ip6”=>“”, “managed”=>“0”, “primary”=>“1”, “provision”=>“1”, “execution”=>“1”, “virtual”=>“0”, “tag”=>“”, “attached_to”=>“”,
“compute_attributes”=>{“type”=>“VirtualVmxnet3”, “network”=>“dvportgroup-264”}}}, “compute_attributes”=>{“cpus”=>“1”, “corespersocket”=>“1”, “memory_mb”=>“1024”, “firmware”=>“uefi”,
“cluster”=>“MYLOCATION-CL9”, “resource_pool”=>“Resources”, “path”=>“/Datencenter/MYLOCATION/vm”, “guest_id”=>“windows2022srvNext_64Guest”, “hardware_version”=>“vmx-19”, “memoryHotAddEnabled”=>“0”,
“cpuHotAddEnabled”=>“0”, “add_cdrom”=>“0”, “boot_order”=>[“network”, “disk”], “start”=>“1”, “annotation”=>“”, “virtual_tpm”=>“0”,
“controllers”=>“{“controllers”:[{“type”:“ParaVirtualSCSIController”,“key”:1000}],“volumes”:[{“thin”:true,“name”:“Hard disk”,“mode”:“persistent”,“sizeGb”:50,“controllerKey”:1000,
“datastore”:“MYLOCATIONcl9vsan”,“storagePod”:null}]}”, “image_id”=>“503681e4-9c57-878b-8cf1-b786f8b6864c”}, “architecture_id”=>“1”, “operatingsystem_id”=>“23”, “provision_method”=>“image”, “build”=>“1”,
“medium_id”=>“”, “ptable_id”=>“”, “pxe_loader”=>“PXELinux BIOS”, “disk”=>“”, “root_pass”=>“[FILTERED]”, “is_owned_by”=>“14-Users”, “enabled”=>“1”, “comment”=>“”, “overwrite”=>“false”}}2025-11-14T14:46:11 [I|app|97ad4af9] Rendering UserData template for testwin.fqdn.local
2025-11-14T14:46:11 [W|app|97ad4af9] Win2k25 needs user data, but WindowsServer 2025
is not associated to any provisioning template of the kind user_data. Please associate it with a suitable template or uncheck ‘User data’ for Win2k25.
2025-11-14T14:46:11 [W|app|97ad4af9] Rolling back due to a problem: [#<Orchestration::Task:0x00007f3a8b598518 @name=“Render user data template for testwin.fqdn.local”,
@id=“Render user data template for testwin.fqdn.local”, @status=“failed”, @priority=2, @action=[#<Host::Managed id: nil, name: “testwin.fqdn.local”,
last_compile: nil, last_report: nil, updated_at: nil, created_at: nil, root_pass: [FILTERED], architecture_id: 1, operatingsystem_id: 23, ptable_id: nil, medium_id: nil,
build: true, comment: “”, disk: “”, installed_at: nil, model_id: nil, hostgroup_id: 5, owner_id: 14, owner_type: “User”, enabled: true, puppet_ca_proxy_id: nil, managed:
true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: 2, puppet_proxy_id: nil, certname: nil, image_id: 4, organization_id: 1, location_id: 5, type:
“Host::Managed”, otp: nil, realm_id: nil, compute_profile_id: 4, provision_method: “image”, grub_pass: nil, global_status: 0, lookup_value_matcher: [FILTERED], pxe_loader:
“PXELinux BIOS”, initiated_at: nil, build_errors: nil, creator_id: nil>, :setUserData], @created=1763127971.066271, @timestamp=2025-11-14 13:46:11.09789408 UTC>]
2025-11-14T14:46:11 [I|app|97ad4af9] Processed 1 tasks from queue ‘Host::Managed Main’, completed 0/4
2025-11-14T14:46:11 [E|app|97ad4af9] Task ‘Render user data template for testwin.fqdn.local’ failed
2025-11-14T14:46:11 [E|app|97ad4af9] Task ‘Set up compute instance testwin.fqdn.local’ canceled
2025-11-14T14:46:11 [E|app|97ad4af9] Task ‘Query instance details for testwin.fqdn.local’ canceled
2025-11-14T14:46:11 [E|app|97ad4af9] Task ‘Power up compute instance testwin.fqdn.local’ canceled
2025-11-14T14:46:11 [E|app|97ad4af9] Failed to save: Win2k25 needs user data, but WindowsServer 2025 is not associated to any provisioning template of
the kind user_data. Please associate it with a suitable template or uncheck ‘User data’ for Win2k25.
2025-11-14T14:46:11 [I|app|97ad4af9] Rendered hosts/new.html.erb within layouts/application (Duration: 707.3ms | Allocations: 393048)
2025-11-14T14:46:11 [I|app|97ad4af9] Rendered layouts/base.html.erb (Duration: 20.4ms | Allocations: 16289)
2025-11-14T14:46:11 [I|app|97ad4af9] Rendered layout layouts/application.html.erb (Duration: 729.4ms | Allocations: 409816)
2025-11-14T14:46:11 [I|app|97ad4af9] Completed 200 OK in 1040ms (Views: 670.9ms | ActiveRecord: 90.2ms | Allocations: 457264)
To my understanding having the flag on the image with the user data active and assigning the userdata template should be the way to go. Might be something trivial which is missing but I wasnt able to figure it out yet.
Expected outcome:
it should at least try to deploy the system, pretty sure I’ll run in more issues afterwards
Foreman and Proxy versions:
3.16.1 with katello 4.18.1
Foreman and Proxy plugin versions:
Distribution and version:
RHEL 9