Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
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
....
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.
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
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.
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 ....