| Summary: | Doc bug: Only the image that can be listed by vol-list can be removed by undefined with option remove-all-storage | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Yang Yang <yanyang> | |
| Component: | libvirt | Assignee: | Peter Krempa <pkrempa> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | |
| Severity: | low | Docs Contact: | ||
| Priority: | low | |||
| Version: | 7.0 | CC: | acathrow, dyuan, lcui, mjenner, mzhan, pkrempa | |
| Target Milestone: | rc | |||
| Target Release: | --- | |||
| Hardware: | x86_64 | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | libvirt-1.1.1-16.el7 | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1044790 (view as bug list) | Environment: | ||
| Last Closed: | 2014-06-13 09:26:13 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Bug Depends On: | ||||
| Bug Blocks: | 1044790 | |||
Right. The man page could note that the volumes need to be in a storage pool for the functionality to work. 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 ....