VM creation is broken with libvirt >= 8.0.0 due to VNC password length
since libvirt >= 8.0.0  (RHEL 8.6, RHEL9, and probably others), the VNC password must be limited to 8 chars.
Foreman uses 16 a char password and VM creation breaks:
"Failed to create a compute xxxx (Libvirt) instance xxxx: Error saving the server: Call to virDomainDefineXML failed: unsupported configuration: VNC password is 16 characters long, only 8 permitted"
The solution, for now, was to reduce SecureRandom.hex(8) to SecureRandom.hex(4) in random_password() , which is called by the libvirt model . But that's probably not the best way :)
Updated by Robert Frank over 1 year ago
- Found in Releases 3.3.0 added
I think the best approach is to pass the required length to the random_password function using the current 8 as the default value.
Then libvirt.rb can call random_password(4) without reducing the security of other providers.
I've create a patch . Let me know if you want me to create a PR.