Project

General

Profile

Actions

Bug #35035

closed

VM creation is broken with libvirt >= 8.0.0 due to VNC password length

Added by Guilherme M. Schroeder over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Compute resources - libvirt
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

since libvirt >= 8.0.0 [1] (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() [2], which is called by the libvirt model [3]. But that's probably not the best way :)

[1] https://github.com/libvirt/libvirt/commit/27c1d06b5bd68bdce55efff0a50a15a30cb2a96b
[2] https://github.com/theforeman/foreman/blob/develop/app/models/compute_resource.rb#L429
[3] https://github.com/theforeman/foreman/blob/develop/app/models/compute_resources/foreman/model/libvirt.rb#L176


Related issues 1 (1 open0 closed)

Related to Foreman - Bug #35024: Foreman Libvirt Plugin requesting +8 chars for remote console VNC PasswordNewActions
Actions

Also available in: Atom PDF