Commit Graph

6 Commits

Author SHA1 Message Date
Peter Krempa
6997cf6f5d qemu: migration: Don't transfer 'allowReboot' flag
The original idea was to ensure that the destination has the same
original state of the '-no-reboot' flag to ensure identical behaviour of
the 'vidDomainModifyLifecycleAction' API.

With newer qemu's we'll be able to modify the behaviour using the
monitor so old daemons won't be able to keep up anyways.

Remove this feature as it's not very useful and will be replaced by a
proper solution.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-08-25 15:32:44 +02:00
Daniel P. Berrangé
11fcf054e6 qemu: remove default audio backend for migratable XML
When seeing a guest with a sound device, and no audio backend, we
automatically add an audio backend XML element based on the historical
QEMU driver behaviour. Unfortunately when we live migrate back to an
old libvirt, it may not understand the audio driver type we configured.
We thus need to strip the default audio backend when migrating.

Fixes https://gitlab.com/libvirt/libvirt/-/issues/179
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-07-09 13:15:13 +01:00
Daniel P. Berrangé
e88367095f qemu: populate <audio> element with default config
Currently the QEMU driver secretly sets the QEMU_AUDIO_DRV env variable

 - VNC - set to "none", unless passthrough of host env variable is set
 - SPICE - always set to "spice"
 - SDL - always passthrough host env
 - No graphics - set to "none", unless passthrough of host env variable is set

The setting of the QEMU_AUDIO_DRV env variable is done in the code which
configures graphics.

If no <audio> element is present, we now auto-populate <audio> elements
to reflect this historical default config. This avoids need to set audio
env when processing graphics.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-03-09 22:58:30 +00:00
Peter Krempa
f7eb3e233d tests: qemumigrationcookie: Add testing for block dirty bitmap migration
Test the XML infrastructure for <blockDirtyBitmaps> migration cookie
element as well as the conversion to migration parameters for QMP schema
validation.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2021-02-20 13:21:21 +01:00
Peter Krempa
20feb62ed8 qemumigrationcookiexmltest: Add synthetic test case
Add a test case attempting to exercise the most of the cookie XML
parsing/formatting infra. Note that the data is not based on any real
case.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-11-09 12:25:49 +01:00
Peter Krempa
5511bf32fe tests: Add testing of qemu migration cookie
Migration cookie transports a lot of information but there are no tests
for it.

The test supports both xml2xml testing and also testing of the
population of the migration cookie data from a domain object, although
that option is not very useful as many things are collected from running
qemu and thus can't be tested efficiently here.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-11-09 12:25:49 +01:00