Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virt: Fix long VNC passwords in vm_libvirt_hook.py #226

Merged
merged 3 commits into from Jun 2, 2022

Conversation

mz-pdm
Copy link
Member

@mz-pdm mz-pdm commented Jun 1, 2022

Newer versions of libvirt accept VNC passwords of the maximum length 8,
because QEMU uses only the first 8 characters anyway. We have already
fixed the password length in Engine but if we migrate VMs created by
older Engines they may fail to start on the destination due to the
long VNC password.

Let’s make those VMs migratable to newer hosts by fixing the password
in the libvirt hook. We can simply remove the extra unused characters
from the password to make libvirt happy.

Bug-Url: https://bugzilla.redhat.com/2090156

Newer versions of libvirt accept VNC passwords of the maximum length 8,
because QEMU uses only the first 8 characters anyway.  We have already
fixed the password length in Engine but if we migrate VMs created by
older Engines they may fail to start on the destination due to the
long VNC password.

Let’s make those VMs migratable to newer hosts by fixing the password
in the libvirt hook.  We can simply remove the extra unused characters
from the password to make libvirt happy.

Bug-Url: https://bugzilla.redhat.com/2090156
@mz-pdm mz-pdm requested review from ahadas, liranr23 and nyoxi June 1, 2022 18:57
@mz-pdm mz-pdm self-assigned this Jun 1, 2022
@mz-pdm mz-pdm added bug Issue is a bug or fix for a bug verified Change was tested; please describe how it was tested in the PR virt labels Jun 1, 2022
@mz-pdm mz-pdm added this to the ovirt-4.5.1 milestone Jun 1, 2022
Copy link
Member

@nirs nirs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Horrible, but seems that we have no other way :-)

@mz-pdm
Copy link
Member Author

mz-pdm commented Jun 1, 2022

Horrible, but seems that we have no other way :-)

We don't -- we cannot fix all old hosts running the VMs with incompatible passwords without being able to migrate the VMs to newer hosts.

@dupondje
Copy link
Member

dupondje commented Jun 1, 2022

We can't lookup the password somewhere and reset it on upgrade?
As the passwords can be changed live

@mz-pdm
Copy link
Member Author

mz-pdm commented Jun 2, 2022

/ost

@mz-pdm
Copy link
Member Author

mz-pdm commented Jun 2, 2022

We can't lookup the password somewhere and reset it on upgrade? As the passwords can be changed live

Responded in BZ (briefly, the solution in this patch is much safer and easier).

@mz-pdm mz-pdm merged commit 3acfeab into oVirt:master Jun 2, 2022
@mz-pdm mz-pdm deleted the vnc-password-migration# branch June 2, 2022 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug or fix for a bug verified Change was tested; please describe how it was tested in the PR virt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants