RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1044445 - Doc bug: Only the image that can be listed by vol-list can be removed by undefined with option remove-all-storage
Summary: Doc bug: Only the image that can be listed by vol-list can be removed by unde...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1044790
TreeView+ depends on / blocked
 
Reported: 2013-12-18 10:42 UTC by Yang Yang
Modified: 2014-06-18 01:01 UTC (History)
6 users (show)

Fixed In Version: libvirt-1.1.1-16.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1044790 (view as bug list)
Environment:
Last Closed: 2014-06-13 09:26:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yang Yang 2013-12-18 10:42:35 UTC
ENV:
libvirt-1.1.1-15.el7.x86_64

setup:
A shutoff domain rhel7_test2, source img: /var/lib/libvirt/images/rhel7_test2.img

step
1. # virsh vol-list default
Name                 Path                                    
-----------------------------------------
rhel7_test1.img      /var/lib/libvirt/images/rhel7_test1.img

rhel7_test2.img exits but is not listed

2. # virsh undefine rhel7_test2 --remove-all-storage

Actual result:
Storage volume 'vda'(/var/lib/libvirt/images/rhel7_test-2.img) is not managed by libvirt. Remove it manually.
Domain rhel7_test2 has been undefined

Tried to refresh the pool and ensure that rhel7_test2.img was listed by vol-list, then the image can be removed successfully.

So the following line should be add into manual page.

Make sure that image can be listed by vol-list before the responding domain undefines with option remove-all-storage

# man virsh
....
           The --remove-all-storage flag specifies that all of the domain's storage volumes should be deleted.   -----> after here
....

Comment 2 Peter Krempa 2013-12-18 11:07:23 UTC
Right. The man page could note that the volumes need to be in a storage pool for the functionality to work.

Comment 4 Peter Krempa 2013-12-18 15:55:16 UTC
Fixed upstream:

commit 878b8fa4298a4eefefded1d65a3bac5081b52444
Author: Peter Krempa <pkrempa>
Date:   Wed Dec 18 14:52:58 2013 +0100

    virsh: man: Mention that volumes need to be in storage pool for undefine
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1044445
    
    When undefining a VM with storage the man page doesn't explicitly
    mention that the volumes need to be a part of the storage pool otherwise
    it won't work.

Comment 6 Yang Yang 2013-12-19 04:37:46 UTC
Reproduce with libvirt-1.1.1-15.el7.x86_64

Verified with the package:

libvirt-1.1.1-16.el7.x86_64

Test steps:
1. # man virsh
2. Navigate to option undefine 

Test results:

The following line is displayed on option undefine screen.
 Only volumes managed by libvirt in storage pools can be removed this way. 


The --storage flag takes a parameter volumes, which is a comma
           separated list of volume target names or source paths of storage
           volumes to be removed along with the undefined domain. Volumes can
           be undefined and thus removed only on inactive domains. Volume
           deletion is only attempted after the domain is undefined; if not
           all of the requested volumes could be deleted, the error message
           indicates what still remains behind. If a volume path is not found
           in the domain definition, it's treated as if the volume was
           successfully deleted. Only volumes managed by libvirt in storage
           pools can be removed this way.  (See domblklist for list of target
           names associated to a domain).  Example: --storage
           vda,/path/to/storage.img

Comment 7 Ludek Smid 2014-06-13 09:26:13 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.