From nobody Sun May 19 01:43:03 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; arc=fail (BodyHash is different from the expected one) Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1566857417339792.980805950736; Mon, 26 Aug 2019 15:10:17 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 9B9F1C0272DE; Mon, 26 Aug 2019 22:10:14 +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 1C0E25F7C0; Mon, 26 Aug 2019 22:10:12 +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 3A23C4A486; Mon, 26 Aug 2019 22:10:10 +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 x7QMA8N8023087 for ; Mon, 26 Aug 2019 18:10:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9734D6060D; Mon, 26 Aug 2019 22:10:08 +0000 (UTC) Received: from mx1.redhat.com (ext-mx17.extmail.prod.ext.phx2.redhat.com [10.5.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 90F846092D for ; Mon, 26 Aug 2019 22:10:05 +0000 (UTC) Received: from m4a0039g.houston.softwaregrp.com (m4a0039g.houston.softwaregrp.com [15.124.2.85]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 133E23082E66 for ; Mon, 26 Aug 2019 22:10:03 +0000 (UTC) Received: FROM m4a0039g.houston.softwaregrp.com (15.120.17.146) BY m4a0039g.houston.softwaregrp.com WITH ESMTP FOR libvir-list@redhat.com; Mon, 26 Aug 2019 22:08:05 +0000 Received: from M9W0067.microfocus.com (2002:f79:be::f79:be) by M4W0334.microfocus.com (2002:f78:1192::f78:1192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 26 Aug 2019 22:09:35 +0000 Received: from NAM05-BY2-obe.outbound.protection.outlook.com (15.124.72.13) by M9W0067.microfocus.com (15.121.0.190) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10 via Frontend Transport; Mon, 26 Aug 2019 22:09:35 +0000 Received: from BY5PR18MB3315.namprd18.prod.outlook.com (10.255.139.204) by BY5PR18MB3393.namprd18.prod.outlook.com (10.255.136.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2199.20; Mon, 26 Aug 2019 22:09:28 +0000 Received: from BY5PR18MB3315.namprd18.prod.outlook.com ([fe80::4408:ba97:cbe0:616a]) by BY5PR18MB3315.namprd18.prod.outlook.com ([fe80::4408:ba97:cbe0:616a%6]) with mapi id 15.20.2199.021; Mon, 26 Aug 2019 22:09:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JiVaLMk1O3lgu1aOofNV7Rm/sUM72iqw6SWkjdXLmLQuP4fXdnXS5chs6He9r9EabGideaDTCIzA4nSt0UQzZq+SiL93rcsA53yqN7OoEqEs/gMbXJ2GMnAaK7BvdSmm9no7RP2R1c5fwO8GySpmW9rayYUTQwWsNtM9XvmBNnEJNT3hkHYtjvyuffKEn/4RtUI+zoACZQ8yqW8WML63mB8sCdHzh72sbodHaucmZ+CDDmPU23ebA07nkIRMbE1hEht9fgPbM7yn2L6+Ztl363Q9Ylm8ZgrxGu/qH90usrFHsn3grD1aCAXJxLS741vuJUDksPP8njA+JpbKtOIj6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d+SUAXdEweJr2HK3+GS73C6qFz3bcb/9tOMjl8pYuGY=; b=g+LwXFwhqER4E9fkn9GNTMikEFCTd8Hq92Ux3ezggo89CX9PgFLDkxqboW464qlypvvEl7nwioNo+fdRgXqD4sWN677k4tTLFLM8kss1yeerDxgGCIaLBYpgEF53qjBTfQ51OzHTTNzZeYXqrqAHzxLZ20QZxGchxk5mgt4oXIBDciKpSjczCvp/0f/66gMEeHUh3+yieb947XuTZjnhewUuch/IYbBtzaxkagFS2lv8wDgQKDsN/ZBDB9aYl6xxH37VKfywRofUuQDD+jzEroXgPg3d3f09CIfcatCv9R2JukpeAR8ZiILDmXwYAstG3sCb2gaQ4K0pPi70AQqFRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none From: Jim Fehlig To: "libvir-list@redhat.com" Thread-Topic: [PATCH] virsh: Add support for setting bandwidth in migrate Thread-Index: AQHVXFrt1ken126UBUChYKb3maVXzg== Date: Mon, 26 Aug 2019 22:09:28 +0000 Message-ID: <20190826220911.5474-1-jfehlig@suse.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MWHPR14CA0068.namprd14.prod.outlook.com (2603:10b6:300:81::30) To BY5PR18MB3315.namprd18.prod.outlook.com (2603:10b6:a03:196::12) authentication-results: spf=none (sender IP is ) smtp.mailfrom=JFEHLIG@suse.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [192.150.157.152] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ee9d4afd-a68f-4644-d3b5-08d72a721015 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600166)(711020)(4605104)(1401327)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:BY5PR18MB3393; x-ms-traffictypediagnostic: BY5PR18MB3393: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:632; x-forefront-prvs: 01415BB535 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(366004)(136003)(396003)(39860400002)(346002)(376002)(199004)(189003)(2616005)(5660300002)(14454004)(478600001)(2501003)(6436002)(6512007)(1076003)(2906002)(25786009)(5640700003)(66446008)(64756008)(66556008)(66476007)(305945005)(7736002)(3846002)(6116002)(66946007)(107886003)(4326008)(316002)(256004)(486006)(14444005)(8676002)(81156014)(81166006)(50226002)(8936002)(66066001)(36756003)(6486002)(6916009)(86362001)(102836004)(26005)(99286004)(186003)(476003)(386003)(6506007)(52116002)(2351001)(71200400001)(71190400001)(53936002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY5PR18MB3393; H:BY5PR18MB3315.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; received-spf: None (protection.outlook.com: suse.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: eMkKCfHPDLSULdrnv14KcTRdBWLAeouV9fwS3VJXi4nF61woEXJKoX3Av2D2ugxvOaWPp05wIFpwYbs34y7i+pBIUkfzJxxzALSeXNvA5AnBkCVKn1av0dxrcZiF1kN0exzvZ38CFhBWEkWm3YoDpzX8kuD75Vm2q+ycYOE37tCOEI+Fq/Fbkz3uYK97WpMB6h96m5DlnbOeJFbF4VsARZWdpHroPhOvCCRizuWww6V2N0FgyxHo97RTNnXLAx6DZQUc/6sjVbmOLWmRvKPIag8Yo76xuDlwr9xVvhYrQPozWtwkg87LB16yZEsK3oUX0lmYlMMoGD0CqyIkT1lJhDnHMj5/Vns9+SIGCv+DpThDcJ2Bv7t9G2Qs9MtNPO/6l7thKhpNgkbfMeYr7vwkE9tldpaq8PtfPUY3qKcrfjY= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: ee9d4afd-a68f-4644-d3b5-08d72a721015 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Aug 2019 22:09:28.5356 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 856b813c-16e5-49a5-85ec-6f081e13b527 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: EYD98m5oR/Vwz+N/m8Bts1lrtk+dc5beW7QXDVjP14aFYkrpeRD4KrqzzuTZ05SCSAVujv+9VVoCaaF3gt4nKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR18MB3393 X-OriginatorOrg: suse.com X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 238 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 26 Aug 2019 22:10:04 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 26 Aug 2019 22:10:04 +0000 (UTC) for IP:'15.124.2.85' DOMAIN:'m4a0039g.houston.softwaregrp.com' HELO:'m4a0039g.houston.softwaregrp.com' FROM:'JFEHLIG@suse.com' RCPT:'' X-RedHat-Spam-Score: 0.001 (RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY) 15.124.2.85 m4a0039g.houston.softwaregrp.com 15.124.2.85 m4a0039g.houston.softwaregrp.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.46 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id x7QMA8N8023087 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] virsh: Add support for setting bandwidth in migrate 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: , Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 26 Aug 2019 22:10:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Commit f15789ec added support for setting postcopy migration bandwidth to the migrate subcommand. This change does the same for standard migration. Signed-off-by: Jim Fehlig Reviewed-by: Michal Privoznik --- I used the term 'standard migration' in the commit message but 'pre-copy' in the documentation. If one is preferred or more correct I can change the other. tools/virsh-domain.c | 13 +++++++++++++ tools/virsh.pod | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index ccda71d7e0..8984c2f3b4 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -10587,6 +10587,10 @@ static const vshCmdOptDef opts_migrate[] =3D { .type =3D VSH_OT_INT, .help =3D N_("number of connections for parallel migration") }, + {.name =3D "precopy-bandwidth", + .type =3D VSH_OT_INT, + .help =3D N_("pre-copy migration bandwidth limit in MiB/s") + }, {.name =3D NULL} }; =20 @@ -10801,6 +10805,15 @@ doMigrate(void *opaque) goto save_error; } =20 + if ((rv =3D vshCommandOptULongLong(ctl, cmd, "precopy-bandwidth", &ull= Opt)) < 0) { + goto out; + } else if (rv > 0) { + if (virTypedParamsAddULLong(¶ms, &nparams, &maxparams, + VIR_MIGRATE_PARAM_BANDWIDTH, + ullOpt) < 0) + goto save_error; + } + if (vshCommandOptBool(cmd, "live")) flags |=3D VIR_MIGRATE_LIVE; if (vshCommandOptBool(cmd, "p2p")) diff --git a/tools/virsh.pod b/tools/virsh.pod index af739bec24..aa0eb16f1a 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -1927,6 +1927,7 @@ I I [I] [I]= [I] [I] [I<--persistent-xml> B] [I<--tls>] [I<--postcopy-bandwidth> B] [I<--parallel> [I<--parallel-connections> B]] +[I<--precopy-bandwidth> B] =20 Migrate domain to another host. Add I<--live> for live migration; <--p2p> for peer-2-peer migration; I<--direct> for direct migration; or I<--tunnel= led> @@ -1958,7 +1959,8 @@ B command sent from another virsh i= nstance or use I<--postcopy-after-precopy> along with I<--postcopy> to let libvirt automatically switch to post-copy after the first pass of pre-copy is fini= shed. The maximum bandwidth consumed during the post-copy phase may be limited u= sing -I<--postcopy-bandwidth>. +I<--postcopy-bandwidth>. The maximum bandwidth consumed during the pre-cop= y phase +may be limited using I<--precopy-bandwidth>. =20 I<--auto-converge> forces convergence during live migration. The initial guest CPU throttling rate can be set with I. If the --=20 2.22.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list