[libvirt] [PATCH] qemu_command: don't modify heads for graphics device

Martin Kletzander mkletzan at redhat.com
Sat Aug 13 13:29:11 UTC 2016

On Fri, Aug 12, 2016 at 05:27:28PM +0200, Pavel Hrdina wrote:
>Setting heads to 0 in case that *max_outputs* is not supported while building
>command line doesn't have any real effect.  It only removes *heads* attribute
>from live XML, but after restarting libvirt the default value is restored.

So that the XML reflects how the guest was started instead of
arbitrarily showing some number that wasn't used for the guest
initialization at all.

Moreover the zero will be sent in the migratable XML when migrating to
another host, hence keeping the setting disabled (so that some screens
that are running already will not be removed).  At least that's what I
had in mind, maybe the behaviour changed in the meantime.

>Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> src/qemu/qemu_command.c | 2 --
> 1 file changed, 2 deletions(-)
>diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
>index 55df23d..06f5091 100644
>--- a/src/qemu/qemu_command.c
>+++ b/src/qemu/qemu_command.c
>@@ -4298,8 +4298,6 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
>              virQEMUCapsGet(qemuCaps, QEMU_CAPS_QXL_MAX_OUTPUTS))) {
>             if (video->heads)
>                 virBufferAsprintf(&buf, ",max_outputs=%u", video->heads);
>-        } else {
>-            video->heads = 0;
>         }
>     } else if (video->vram &&
>         ((video->type == VIR_DOMAIN_VIDEO_TYPE_VGA &&
>libvir-list mailing list
>libvir-list at redhat.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160813/83eb3c48/attachment-0001.sig>

More information about the libvir-list mailing list