From nobody Sun Feb 8 19:03:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1609862136; cv=none; d=zohomail.com; s=zohoarc; b=TOWhFrjn9gXDq1qdUX9MKmnNY67Z9q2pAPxOVMdUP5DnHWRC+4LbnrHy6oQXG4FEPzq8hWUCF6LlSMzIyZw4ZRPZ+qVXMM7MuIidiO78Lt8rjWoQa4P7dbCTRfpzEFuVW8QrXnuU0BscosOowquY+JN4T5Y+bn4giKrU4MZIKfE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609862136; 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=cGZE3RyOoogGmkuVbGAn5P/MQ3OOceQfHPfE8uFHh+M=; b=Q7aNVW86yRjJD2306Q1BWeM0xhjeIriLQ/5gx7YgA7HyS8Y50CeXPNItgkLoWZdmhuHGZkG1rZLIZGI6HV6YFPUkffkSMhjtbFlJ2Qk36LKV7Tv0eSn3rw7XiPwFsm46mO7xC8IHTkI5/KG6glzIuH3ZuVs4c6hLUxaBuWWoTSQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1609862136536978.9866646727138; Tue, 5 Jan 2021 07:55:36 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-550-azJEiCsqMz6VUoJhiZMAAA-1; Tue, 05 Jan 2021 10:55:32 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D231B18C89E1; Tue, 5 Jan 2021 15:55:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B1AB860BFA; Tue, 5 Jan 2021 15:55:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7DB521809CA1; Tue, 5 Jan 2021 15:55:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 105FswdG020994 for ; Tue, 5 Jan 2021 10:54:58 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1904A1F471; Tue, 5 Jan 2021 15:54:58 +0000 (UTC) Received: from carol.localdomain (unknown [10.40.193.241]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DE0F11F46F for ; Tue, 5 Jan 2021 15:54:54 +0000 (UTC) Received: from carol.redhat.com (carol.k8r.cz [127.0.0.1]) by carol.localdomain (Postfix) with ESMTP id E8F92C20212 for ; Tue, 5 Jan 2021 16:54:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609862135; 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=cGZE3RyOoogGmkuVbGAn5P/MQ3OOceQfHPfE8uFHh+M=; b=KR5r8jiHwNfdPFCr4lrXIuzIhJEaJtwRL8odtrfVpcXz4UEJsnjkkbEkqytSs2ZhFoB9jv 6YeQgUWw0FOpSTQ4SekU07PGGbO4j2TNiPRx4IutTs9o5aPB6tvqYu/UHQic/k0/ZJeUJp lCjt73xnd6KP/X2F6+EyX4ZDNlwI5Xs= X-MC-Unique: azJEiCsqMz6VUoJhiZMAAA-1 From: Martin Kletzander To: libvir-list@redhat.com Subject: [libvirt PATCH v3 8/8] vmx: Treat missing cdrom-image as empty drive Date: Tue, 5 Jan 2021 16:54:47 +0100 Message-Id: <63f05c25f54c2409db775b006f0823d9e5b673a4.1609862070.git.mkletzan@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This is perfectly valid in VMWare and the VM just boots with an empty drive= . We used to just skip the whole drive before, but since we changed how we parse empty cdrom drives this results in an error. Make it behave more closer to VMWare. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1903953 Signed-off-by: Martin Kletzander --- src/vmx/vmx.c | 2 +- tests/vmx2xmltest.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index aa5d1d4eedea..56318fc8b285 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -2448,7 +2448,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptio= nPtr xmlopt, virConfPtr con } =20 virDomainDiskSetType(*def, VIR_STORAGE_TYPE_FILE); - if (ctx->parseFileName(fileName, ctx->opaque, &tmp, false) < 0) + if (ctx->parseFileName(fileName, ctx->opaque, &tmp, true) < 0) goto cleanup; virDomainDiskSetSource(*def, tmp); VIR_FREE(tmp); diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c index d622e46fd563..11739e6f3f51 100644 --- a/tests/vmx2xmltest.c +++ b/tests/vmx2xmltest.c @@ -247,8 +247,8 @@ mymain(void) DO_TEST("cdrom-ide-raw-auto-detect", "cdrom-ide-raw-auto-detect"); DO_TEST("cdrom-ide-raw-auto-detect", "cdrom-ide-raw-auto-detect"); =20 - DO_TEST_FAIL("cdrom-ide-file-missing-datastore", "cdrom-ide-empty"); - DO_TEST_FAIL("cdrom-ide-file-missing-file", "cdrom-ide-empty"); + DO_TEST("cdrom-ide-file-missing-datastore", "cdrom-ide-empty"); + DO_TEST("cdrom-ide-file-missing-file", "cdrom-ide-empty"); =20 DO_TEST_FAIL("harddisk-ide-file-missing-datastore", "harddisk-ide-file= "); DO_TEST_FAIL("harddisk-scsi-file-missing-file", "harddisk-scsi-file"); --=20 2.30.0