From nobody Sun Feb 8 22:34:51 2026 Delivered-To: importer@patchew.org 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; 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559734054; cv=none; d=zoho.com; s=zohoarc; b=U5uSEE8/BMKWSeRZEZhXsvLNXzzNGvnLubHugwyNHgNGJ1Rx3/Ntb2mA181xlgL14pXk0uMbK7wZo3rF3DeszfGJLnaNKTf8ij01UVhbrDlYJ4L6T4ozL9utDqgmYhTQd5fR+UB5QR9OXoS3Y8u+zt/ptEZXrqODxFpDlFtf184= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559734054; 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:ARC-Authentication-Results; bh=nOZ6PREu+MUN63NFVP8BROHSHAZXBoADWIgcshK7Tdc=; b=O2k9RWd1a+DIj9vDjXYBCRk7zOdPrp3f7IfMkd87b2fVDmOoDXgxPhvO1Lg35wTOvqpQUAyZm6NVXL7QdEsVngFPbGiyrTE7H7s2ud54PtOFrQRVBpPvC1Tsd8Td8f9/nbUx0zic7ixIRlenynEveiQK7QfbmoMnLGvHqdUWpUE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559734054079539.269178362672; Wed, 5 Jun 2019 04:27:34 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5B3C530C31AE; Wed, 5 Jun 2019 11:27:32 +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 343E8600CC; Wed, 5 Jun 2019 11:27:32 +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 E88AC1806B0F; Wed, 5 Jun 2019 11:27:30 +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 x55BNjHW029947 for ; Wed, 5 Jun 2019 07:23:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5606719C6A; Wed, 5 Jun 2019 11:23:45 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id D463319C65 for ; Wed, 5 Jun 2019 11:23:44 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 5 Jun 2019 13:23:39 +0200 Message-Id: <8ebb9d64ec8fde2164356bed83fa66a93aeb5ccd.1559733766.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] virsh: undefine: Rename --delete-snapshots to --delete-storage-volume-snapshots 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 05 Jun 2019 11:27:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The old flag name confused some users into thinking it's the correct way to undefine a VM with libvirt (not storage volume) snapshots. The correct flag in that case is way less obvious: --snapshots-metadata. Rename the flag (by adding an alias) to something which will promote looking up the actual purpose of the flag. Signed-off-by: Peter Krempa --- tools/virsh-domain.c | 4 ++++ tools/virsh.pod | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index a6e4469160..828ae30789 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -3617,6 +3617,10 @@ static const vshCmdOptDef opts_undefine[] =3D { .help =3D N_("remove all associated storage volumes (use with caution= )") }, {.name =3D "delete-snapshots", + .type =3D VSH_OT_ALIAS, + .help =3D "delete-storage-volume-snapshots" + }, + {.name =3D "delete-storage-volume-snapshots", .type =3D VSH_OT_BOOL, .help =3D N_("delete snapshots associated with volume(s), requires " "--remove-all-storage (must be supported by storage driver= )") diff --git a/tools/virsh.pod b/tools/virsh.pod index 9f5bfd27a0..fd9ba00d1f 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -2896,8 +2896,8 @@ is not available the processes will provide an exit c= ode of 1. =3Ditem B I [I<--managed-save>] [I<--snapshots-metadata>] [I<--nvram>] [I<--keep-nvram>] -[ {I<--storage> B | I<--remove-all-storage> [I<--delete-snapshots= >]} -I<--wipe-storage>] +[ {I<--storage> B | I<--remove-all-storage> +[I<--delete-storage-volume-snapshots>]} I<--wipe-storage>] Undefine a domain. If the domain is running, this converts it to a transient domain, without stopping it. If the domain is inactive, @@ -2932,7 +2932,8 @@ Example: --storage vda,/path/to/storage.img The I<--remove-all-storage> flag specifies that all of the domain's storage volumes should be deleted. -The I<--delete-snapshots> flag specifies that any snapshots associated with +The I<--delete-storage-volume-snapshots> (previously I<--delete-snapshots>) +flag specifies that any snapshots associated with the storage volume should be deleted as well. Requires the I<--remove-all-storage> flag to be provided. Not all storage drivers support this option, presently only rbd. --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list