From nobody Mon May 13 23:13:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1608117664; cv=none; d=zohomail.com; s=zohoarc; b=nnvPJ8l53u6dVKRGD0mmIpBo9RhfVlu+E/4t6lYs5qJZjOn0kW2k4TARljsDxuMrgOYcaFwNqvXZ3meUicmEl3M0xJXP8Wo1spMLko9D/SrbMybAz1+tsdQd/xF6a4Wa8Tx8suEJH3W4SsakOZLmP2eLp5WTcCZCT1eUJuuRAk0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608117664; 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=fpxsjlwiRbWdZZzXB79elRn8DbYgTJTW6E/vku4AQhI=; b=HpNVAuHmPpNR0SMSQFtKOHRoLp9YYdXf6UMJZ4uqei0xeo2ITEBEX982FNtt6mW+L/7NhyplxPF4wHdZXSECA5Sh9ffLdrKGsGMIF0Z+qI8/rgppQAbnvESVfjh+4lPrOgnXfy4io41cCzMF7t37VRwyD0r340Jl4hm1VRNabY0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1608117664544244.5657944750143; Wed, 16 Dec 2020 03:21:04 -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-14-IVrRZ_RCOpmpL7v1r86owg-1; Wed, 16 Dec 2020 06:19:45 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BFC2E803621; Wed, 16 Dec 2020 11:19:39 +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 AEC8F10013C1; Wed, 16 Dec 2020 11:19:38 +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 5F0AA180954D; Wed, 16 Dec 2020 11:19:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0BGBJYpm025209 for ; Wed, 16 Dec 2020 06:19:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3B83D72167; Wed, 16 Dec 2020 11:19:34 +0000 (UTC) Received: from carol.localdomain (ovpn-117-30.ams2.redhat.com [10.36.117.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0CF8E72168 for ; Wed, 16 Dec 2020 11:19:30 +0000 (UTC) Received: from carol.redhat.com (carol.k8r.cz [127.0.0.1]) by carol.localdomain (Postfix) with ESMTP id E9B2EC212D0 for ; Wed, 16 Dec 2020 12:19:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608117663; 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=fpxsjlwiRbWdZZzXB79elRn8DbYgTJTW6E/vku4AQhI=; b=WJEPjRrq9Jqbwks4zyTKyfASDwNxUYFKEdNe1Ds1HFxCiJ0TuTUd23snwDVWYaKr1NU+LW CZB+HTfKCH6wHbtgv5lrzMki5nr5HwrdpO7QWDPEgSMIk0HAFfm+04lMH5V1J7v+xxDoXn 9/mQuS5MNIJbzqKrjdblm9qZ0mFkmXE= X-MC-Unique: IVrRZ_RCOpmpL7v1r86owg-1 From: Martin Kletzander To: libvir-list@redhat.com Subject: [libvirt PATCH 1/3] qemu: Fix possible segfault when migrating disks Date: Wed, 16 Dec 2020 12:19:26 +0100 Message-Id: <5db1fc56022642e610c911efd28f3a931279e917.1608117564.git.mkletzan@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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.84 on 10.5.11.22 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" Users can provide URI without a schema. https://bugzilla.redhat.com/show_bug.cgi?id=3D1638889 Signed-off-by: Martin Kletzander Reviewed-by: Michal Privoznik --- src/qemu/qemu_migration.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index fcb33d0364a1..90b0ec95e35a 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -408,6 +408,11 @@ qemuMigrationDstStartNBDServer(virQEMUDriverPtr driver, if (!uri) return -1; =20 + if (!uri->scheme) { + virReportError(VIR_ERR_INVALID_ARG, _("No URI scheme specified= : %s"), nbdURI); + return -1; + } + if (STREQ(uri->scheme, "tcp")) { server.transport =3D VIR_STORAGE_NET_HOST_TRANS_TCP; if (!uri->server || STREQ(uri->server, "")) { --=20 2.29.2 From nobody Mon May 13 23:13:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1608117673; cv=none; d=zohomail.com; s=zohoarc; b=cxY3Sv+6FRSj1SUaDasQoT262AC/D5cqVFWy7yqLAC6NI4QGywcchJh+LRdkAwW2vWvZ1cJzLzv3iUFTxZJZWPJ6sElc1Qvd6WNCs21lS9+cS7N2F+PV+Ntdj2gmitddA6PSeJehPS5Vz4OHdof2HIXsKj/rEMGrtt7+CllSt1k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608117673; 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=XXFRbJt2WAaYNerjHJ+CNq2zsqPZzIgP3Bx0htqMIAI=; b=fkiK+450jbAcNfDApb/KeU22pUQAi6NxKpkpEbRHtELi8ZRFSOVYSj6O5zpHUVGpOx4qzKKYs7XuNp0zH7To2/Cw+vVPFpNVNrMDfuKI660paQ0wDhy9McH3PHU1OIrDaLL8NAaC7hPzbNFQJHwDmLK0i7VL9YR87UBbTr2UDHU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1608117673439296.19382185499387; Wed, 16 Dec 2020 03:21:13 -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-393-gdBLj3MANViJwb0j4P4jdw-1; Wed, 16 Dec 2020 06:20:04 -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 51EE08144EC; Wed, 16 Dec 2020 11:19:58 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3062960C9A; Wed, 16 Dec 2020 11:19:58 +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 9141650032; Wed, 16 Dec 2020 11:19:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0BGBJY7K025218 for ; Wed, 16 Dec 2020 06:19:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 88D1C5D9E4; Wed, 16 Dec 2020 11:19:34 +0000 (UTC) Received: from carol.localdomain (ovpn-117-30.ams2.redhat.com [10.36.117.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5CC415D9E3 for ; Wed, 16 Dec 2020 11:19:30 +0000 (UTC) Received: from carol.redhat.com (carol.k8r.cz [127.0.0.1]) by carol.localdomain (Postfix) with ESMTP id EA4E0C212D3 for ; Wed, 16 Dec 2020 12:19:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608117672; 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=XXFRbJt2WAaYNerjHJ+CNq2zsqPZzIgP3Bx0htqMIAI=; b=bY9HaFv9Z+fVbILVrGRp/rr/K+wzQDhal4Dzm6XnJVRZ+/zLbQ8iTsWGrEw5fOqEVp5rlU sm4k2cZpaNzWrbNWb6WZgznXauzkYD7Ng5ouE3HcHMuBnCj4FbIF98WKW2NRF53Dcf63vz 4jMUyzNGsCqkFxdUwvNDwCgKjFaFui0= X-MC-Unique: gdBLj3MANViJwb0j4P4jdw-1 From: Martin Kletzander To: libvir-list@redhat.com Subject: [libvirt PATCH 2/3] docs: Slightly alter disks-uri description in virsh man Date: Wed, 16 Dec 2020 12:19:27 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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" It's more accurate this way. https://bugzilla.redhat.com/show_bug.cgi?id=3D1638889 Signed-off-by: Martin Kletzander Reviewed-by: Michal Privoznik --- docs/manpages/virsh.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index aa3a0095fe3d..4a1500e68628 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -3346,17 +3346,17 @@ bind to for incoming disks traffic. Currently it is= supported only by QEMU. Optional *disks-uri* can also be specified (mutually exclusive with *disks-port*) to specify what the remote hypervisor should bind/connect to= when migrating disks. This can be *tcp://address:port* to specify a listen add= ress -(which overrides *--listen-address* for the disk migration) and a port or -*unix:///path/to/socket* in case you need the disk migration to happen ove= r a -UNIX socket with that specified path. In this case you need to make sure = the -same socket path is accessible to both source and destination hypervisors = and -connecting to the socket on the source (after hypervisor creates it on the -destination) will actually connect to the destination. If you are using SE= Linux -(at least on the source host) you need to make sure the socket on the sour= ce is -accessible to libvirtd/QEMU for connection. Libvirt cannot change the con= text -of the existing socket because it is different from the file representatio= n of -the socket and the context is chosen by its creator (usually by using -*setsockcreatecon{,_raw}()* functions). +(which overrides *--migrate-uri* and *--listen-address* for the disk migra= tion) +and a port or *unix:///path/to/socket* in case you need the disk migration= to +happen over a UNIX socket with that specified path. In this case you need= to +make sure the same socket path is accessible to both source and destination +hypervisors and connecting to the socket on the source (after hypervisor c= reates +it on the destination) will actually connect to the destination. If you are +using SELinux (at least on the source host) you need to make sure the sock= et on +the source is accessible to libvirtd/QEMU for connection. Libvirt cannot = change +the context of the existing socket because it is different from the file +representation of the socket and the context is chosen by its creator (usu= ally +by using *setsockcreatecon{,_raw}()* functions). =20 =20 migrate-compcache --=20 2.29.2 From nobody Mon May 13 23:13:16 2024 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=1608117588; cv=none; d=zohomail.com; s=zohoarc; b=J+wsYw8f5pyDWSFxTNI5+3mqnfjQO57Yco/aj/vFrEStSN1F0K4YppfI+efu1AXylq5cGaP4YZaB9mRODG69c6ETUPvYwZRevj4zpA1dkGFEa8ky1PaBbkVhoq3CRLtGMZmyK/zydOoDqMUbzYnkxHdY1z+sFUaSgpskK9juo2U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608117588; 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=W0icTORtEuR0xALi3tCcTcrjsI+36PLPt0gEaReKRPQ=; b=kkQtdUud37DXGZTR4VZrsmBP3+QYtm1UnX4PuoqOlUNdw6z7HAxBldv3TLtoXfdr8kSpKjyoSLIoQ9arUCac8eXgYgDLLhZYbIc3PcBLHdxBGcyN8CKetitCb3d04HMVeUWgX8OszDiT6TMkOjqEAvPaAQMjiISi2Z0w1SQELoc= 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 1608117588234610.4868489877241; Wed, 16 Dec 2020 03:19:48 -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-14-_Md8AOheOriySdwI2PZicg-1; Wed, 16 Dec 2020 06:19:45 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C00C4803623; Wed, 16 Dec 2020 11:19:39 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B49A25D9E3; Wed, 16 Dec 2020 11:19:38 +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 6A3104BB7B; Wed, 16 Dec 2020 11:19:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0BGBJYYd025208 for ; Wed, 16 Dec 2020 06:19:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 395BB72169; Wed, 16 Dec 2020 11:19:34 +0000 (UTC) Received: from carol.localdomain (ovpn-117-30.ams2.redhat.com [10.36.117.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0CF1972167 for ; Wed, 16 Dec 2020 11:19:30 +0000 (UTC) Received: from carol.redhat.com (carol.k8r.cz [127.0.0.1]) by carol.localdomain (Postfix) with ESMTP id EAF9DC21330 for ; Wed, 16 Dec 2020 12:19:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608117587; 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=W0icTORtEuR0xALi3tCcTcrjsI+36PLPt0gEaReKRPQ=; b=eRU1sQwIiVYh39tBRd43uNdNhQ8nU1qUJcM5AjLXY4BwD0EzsVEpj8PcW4aolE4DFk6Rgf Z/6KeshTKvRsjLouZ99txs4KPfLBsOdxHYPbSYcCEERRmCsJYcfg26lp9KHbvhCrg4/giN xqbCUPa3BDwR9YM05BbGMo58ddS0KLI= X-MC-Unique: _Md8AOheOriySdwI2PZicg-1 From: Martin Kletzander To: libvir-list@redhat.com Subject: [libvirt PATCH 3/3] qemu: Extra check for NBD URI being specified Date: Wed, 16 Dec 2020 12:19:28 +0100 Message-Id: <68164892fe6f5d1b5e4fbd4fe1a02d14c1384096.1608117564.git.mkletzan@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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.14 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" It must be used when migration URI uses `unix:` transport because otherwise= we cannot just guess where to connect for disk migration. https://bugzilla.redhat.com/show_bug.cgi?id=3D1638889 Signed-off-by: Martin Kletzander Reviewed-by: Michal Privoznik --- src/qemu/qemu_driver.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 5f0fb0a55fee..9caaa0723720 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -11503,6 +11503,16 @@ qemuDomainMigratePrepare3Params(virConnectPtr dcon= n, QEMU_MIGRATION_DESTINAT= ION))) return -1; =20 + if (flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC)= || + nmigrate_disks > 0) { + if (uri_in && STRPREFIX(uri_in, "unix:") && !nbdURI) { + virReportError(VIR_ERR_INVALID_ARG, "%s", + _("NBD URI must be supplied when " + "migration URI uses UNIX transport method")); + return -1; + } + } + if (nbdURI && nbdPort) { virReportError(VIR_ERR_INVALID_ARG, "%s", _("Both port and URI requested for disk migration " @@ -11743,6 +11753,7 @@ qemuDomainMigratePerform3Params(virDomainPtr dom, &persist_xml) < 0) goto cleanup; =20 + if (nbdURI && nbdPort) { virReportError(VIR_ERR_INVALID_ARG, "%s", _("Both port and URI requested for disk migration " @@ -11766,6 +11777,16 @@ qemuDomainMigratePerform3Params(virDomainPtr dom, if (nmigrate_disks < 0) goto cleanup; =20 + if (flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC)= || + nmigrate_disks > 0) { + if (uri && STRPREFIX(uri, "unix:") && !nbdURI) { + virReportError(VIR_ERR_INVALID_ARG, "%s", + _("NBD URI must be supplied when " + "migration URI uses UNIX transport method")); + return -1; + } + } + if (!(migParams =3D qemuMigrationParamsFromFlags(params, nparams, flag= s, QEMU_MIGRATION_SOURCE))) goto cleanup; --=20 2.29.2