From nobody Sun May 5 06:44:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1575915199; cv=none; d=zohomail.com; s=zohoarc; b=MQ4NsttGrYZEDaIeUHX7ePJp03c8EiceQ0Q9FbIaSZ7QlvtOHXPx+8tp7J0+he6RznFnx96gp8mCn3p558i93HrKsCZ1LDFTX+TStfppfXsm7s+hlqQWt5sr6r0Xzc8zop1pBax1cV8dHdNiCllHolFiZZZP3RGTbQH5FKl94SI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575915199; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=PRr/WPBfRfH9VHauFr4gK/f1iVsZhviQU5Rn1QgDquY=; b=RcwPOMJJ39sve4FhHCBHfiyIsATmanGSR9PF/H1++go0TuiTYZuDG4QYkDC4DefzqD2cubnRBmgMKnCf6/evKYm3wDThstp4hSpuQOdwCpUid/7CDXpJOi+IRferD1+iijV0nWnKtdbVqLa86DbvglGMRF6GrIQMPCHY35k+m+4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1575915199891819.9408147387588; Mon, 9 Dec 2019 10:13:19 -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-331-SlXiYYqJOPe1ajFx2cSNkw-1; Mon, 09 Dec 2019 13:13:16 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 12CC9DBE6; Mon, 9 Dec 2019 18:13:09 +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 CF3BD6E3F3; Mon, 9 Dec 2019 18:13:08 +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 0BFC918033C2; Mon, 9 Dec 2019 18:13:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xB9ID6eG020017 for ; Mon, 9 Dec 2019 13:13:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id C31736E3FF; Mon, 9 Dec 2019 18:13:06 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-123-82.rdu2.redhat.com [10.10.123.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id 65CC06E3F3; Mon, 9 Dec 2019 18:13:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575915198; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=PRr/WPBfRfH9VHauFr4gK/f1iVsZhviQU5Rn1QgDquY=; b=izKbXosWEFcyNl7ZtIVuUjWMlwDR7XIErxmxRuNthIzv90dN2alhZD1a2i89mt+YuJ3P8I VDJYu9+ZacOAAGfif1uVVGjl1VinfBFga1PelTKMc3C6jYhcHNqemL1VJO4SD5z32VquTy Lsu5IEe/fGcAJc76Drg8PwAUvlM7zms= From: Cole Robinson To: libvirt-list@redhat.com Date: Mon, 9 Dec 2019 13:14:26 -0500 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Cole Robinson Subject: [libvirt] [PATCH] qemu: domain: raise an error when no emulator is found 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.13 X-MC-Unique: SlXiYYqJOPe1ajFx2cSNkw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" $ cat f | grep -e arch -e emulator hvm $ sudo virsh define f error: Failed to define domain from f error: An error occurred, but the cause is unknown After: $ sudo virsh define f error: Failed to define domain from f error: unsupported configuration: No emulator found for arch 'mipsel' Signed-off-by: Cole Robinson Reviewed-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_domain.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index a15364a71e..6f53e17b6a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4687,8 +4687,12 @@ qemuDomainDefPostParseBasic(virDomainDefPtr def, /* check for emulator and create a default one if needed */ if (!def->emulator) { if (!(def->emulator =3D virQEMUCapsGetDefaultEmulator( - driver->hostarch, def->os.arch))) + driver->hostarch, def->os.arch))) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("No emulator found for arch '%s'"), + virArchToString(def->os.arch)); return 1; + } } =20 return 0; --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list