From nobody Mon Feb 9 10:33:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1674466327; cv=none; d=zohomail.com; s=zohoarc; b=lRZTb7A09Uif+LvV2G33cu9uTkrgXclpOahvySqZwNVx5MJpjSd2ec4r4Xsl6wfuiPTcBZ4n6j/wJ5Syr0/Rb4iq38YUC05e6qwEhHA5IhI2L9jgS6zhPHsRGbgMcp6HMEOsJaI2LLEkPBJKOs2s4qQ3s/7l4izso884+jHbxc8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674466327; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SqzQhUE+KuKC5V6ki1+iFKxGLv3rlTlb48zvqJRyPwo=; b=AFm2YB4e8LAx+gRBTDUB/kK6OLUvJemf7pxeDkmJxJx7KHmEtSo+O365rz5fZg7e0zZSEUMo9j9Ml0lzxljOpbhF8o2PTowwHjzbXesBoMTWn0gmmN/cokJgG83KBGFyOE+4EVy9ocDdJBYdSIr2GOLYrRB75/GVAMaBTqXTfzg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1674466327831668.083724667591; Mon, 23 Jan 2023 01:32:07 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-75-vMMgNlXAM_OBQZGYrD9nlQ-1; Mon, 23 Jan 2023 04:32:01 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 71788858F09; Mon, 23 Jan 2023 09:31:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5CB661121330; Mon, 23 Jan 2023 09:31:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3FDDC194658D; Mon, 23 Jan 2023 09:31:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 046041946589 for ; Mon, 23 Jan 2023 09:31:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E99B640C2005; Mon, 23 Jan 2023 09:31:55 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 90E8040C2004 for ; Mon, 23 Jan 2023 09:31:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674466326; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=SqzQhUE+KuKC5V6ki1+iFKxGLv3rlTlb48zvqJRyPwo=; b=Dg80eHtSWyOovH7X1br92AVpcCiwjF2saUWSUvfnWWStrqogirnGPHO9kEv+eF+2y+uTcR IxgdRUw+mk3JD58NK7pqRHkNBLsg5Ds5mAOo6vqm6ZiwCrbZFOIYrkrqFxRsmCIMSxBx3R B0D8K+oYC0YTIiNXP+zw2Zd3ANewLdo= X-MC-Unique: vMMgNlXAM_OBQZGYrD9nlQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/2] vbox: Fix starting domains Date: Mon, 23 Jan 2023 10:31:53 +0100 Message-Id: <3e6b43adc3c2a3ad2af4eb851682330039679758.1674466269.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1674466328084100004 Content-Type: text/plain; charset="utf-8"; x-default="true" When starting a VirtualBox domain, we try to guess which frontend to use. While the whole algorithm looks a bit outdated, it may happen that we tell VirtualBox to use "gui" frontend, but not which DISPLAY=3D to use. I haven't found any documentation on the algorithm we use, but if I make us fallback onto DISPLAY=3D:0 when no other configuration is found then I'm able to start my guests just fine. Signed-off-by: Michal Privoznik --- src/vbox/vbox_common.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index bd77641d39..5269f9b23f 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -2121,13 +2121,12 @@ vboxStartMachine(virDomainPtr dom, int maxDomID, IM= achine *machine, vboxIID *iid VBOX_UTF8_FREE(valueDisplayUtf8); =20 if (guiPresent) { - if (guiDisplay) { - char *displayutf8; - displayutf8 =3D g_strdup_printf("DISPLAY=3D%s", guiDisplay); - VBOX_UTF8_TO_UTF16(displayutf8, &env); - VIR_FREE(displayutf8); - VIR_FREE(guiDisplay); - } + char *displayutf8; + + displayutf8 =3D g_strdup_printf("DISPLAY=3D%s", guiDisplay ? guiDi= splay : ":0"); + VBOX_UTF8_TO_UTF16(displayutf8, &env); + VIR_FREE(displayutf8); + VIR_FREE(guiDisplay); =20 VBOX_UTF8_TO_UTF16("gui", &sessionType); } --=20 2.39.1