Problem:
updating my image creation process to hashicorp packer. I’ve built a new test golden image for my lab environment. I’ve validated the image is sane and booted it on a my laptop using qemu
I’ve uploaded the image to two different libvirt kvm hypervisors one running EL9 and one running EL10 to reduce chance of a problem being with the host.
The two hypervisors are successfully intergrated into foreman and can be used to kickstart/preseeed guests without issue.
I upload the new packer image (in this test case an ubuntu 24.04 image) to both the KVM hypervisors local file system ( /mnt/osimages/$image_name) - SELinux has been set to permissive to debug.
I use ‘create new image’ in the web interface fill in the parameters for the image (user/pass/OS/image path) and click ‘submit’ button.
The web interfaces errors could not be found in $KVM_HOSTNAME(the hostname changes between the 2 test systems)
on both the KVM hosts the image is copied complete, and has permissions that are accessible.
on each of the KVM hosts, I see foreman successfully connect using the foreman account to interact with the libvirtd process
Oct 27 12:16:39 anton systemd-logind[1009]: New session 12 of user foreman.
Oct 27 12:16:39 anton systemd[1]: Created slice user-1005.slice - User Slice of UID 1005.
Oct 27 12:16:39 anton systemd[1]: Starting user-runtime-dir@1005.service - User Runtime Directory /run/user/1005...
Oct 27 12:16:39 anton systemd[1]: Finished user-runtime-dir@1005.service - User Runtime Directory /run/user/1005.
I also see successful connection in the secure log on both hosts.
Oct 27 12:21:18 anton sshd-session[73925]: Accepted publickey for foreman from 10.11.216.4 port 40444 ssh2: RSA SHA256:kN+OODtJxlD/lEhfLc57qEQjlU7u8rgKEP17PsWtHRM
Oct 27 12:21:18 anton (systemd)[73930]: pam_unix(systemd-user:session): session opened for user foreman(uid=1005) by foreman(uid=0)
On the Foreman host in the production log, I see the failure
2025-10-27T12:21:49 [I|app|594cb191] Started POST “/compute_resources/6-ANTON%20KVM/images” for 10.11.216.109 at 2025-10-27 12:21:49 +0000
2025-10-27T12:21:49 [I|app|594cb191] Processing by ImagesController#create as HTML
2025-10-27T12:21:49 [I|app|594cb191] Parameters: {“authenticity_token”=>“[FILTERED]”, “image”=>{“name”=>“ubuntu”, “compute_resource_id”=>“6”, “operatingsystem_id”=>“2”, “architecture_id”=>“1”, “username”=>“ubuntu”, “password”=>“[FILTERED]”, “user_data”=>“0”, “uuid”=>“/mnt/osimages/packer-ubuntu2404”}, “commit”=>“Submit”, “compute_resource_id”=>“6-ANTON KVM”}
2025-10-27T12:21:49 [E|app|594cb191] Failed to save: UUID could not be found in ANTON KVM
This is the same error across the two kvm hosts (I can add in a 3rd it needed, but I’m confident it’s not a host problem)
I’m unclear why it’s complaining about the UUID from this logging.
Expected outcome:
Foreman import the the image for use with the image based provisioning system
Foreman and Proxy versions:
3.16
Foreman and Proxy plugin versions:
|foreman-tasks|11.0.5|
|foreman_ansible|17.0.2|
|foreman_dhcp_browser|0.1.2|
|foreman_kubevirt|0.4.1|
|foreman_puppet|9.0.0|
|foreman_remote_execution|Foreman Remote Execution team|16.2.3|
|foreman_templates|10.0.10|
|foreman_webhooks|4.0.2|
Distribution and version:
Rocky Linux 9.6 x86_64
Other relevant data: