Hide Forgot
Description of problem: Two issues with libvirt's concept of default storage: 1) /etc/libvirt/storage/default.xml defines the "default" storage pool in libvirt. When using "virsh pool-delete default" - the running instance of libvirtd does not delete the definition, but does delete the directory (directory based pool) 2) There is no way to define a default storage pool that is called something other than default. Version-Release number of selected component (if applicable): libvirt-0.8.1-27.el6.x86_64 How reproducible: Always: [root@mcgill /]# virsh pool-list --all Name State Autostart ----------------------------------------- UserVM active yes default inactive yes [root@mcgill /]# virsh pool-delete default Pool default deleted [root@mcgill /]# virsh pool-list --all Name State Autostart ----------------------------------------- UserVM active yes default inactive yes [root@mcgill /]# virsh pool-delete default error: Failed to delete pool default error: failed to remove pool '/var/lib/libvirt/images': No such file or directory [root@mcgill /]# ls /var/lib/libvirt/ boot lxc network qemu [root@mcgill /]# ls /etc/libvirt/storage/ autostart default.xml UserVM.xml Steps to Reproduce: 1. 2. 3. Actual results: The XML definition file remains and libvirt attempts to use it. Expected results: Along with the directory, the XML definition file should be removed Additional info:
IMHO this should be WONTFIX, it's by design somehow, if you want to get the XML away, should use "virsh pool-undefine" to undefine it, and if we fix it with invoking "virStoragePoolUndefine" in "virStoragePoolDelete", (is it a good idea? ) the applications which use libvirt storage APIs perhaps will be affected.
Subhendu, this is indeed correct behavior. pool-delete removes (if possible) the underlying resource for the pool, in your case, the directory. pool-undefine will remove the pool definition but leave the underlying resource alone. There actually is no default pool as far as libvirt is concerned. libvirt will let you undefine all pools. virt-manager creates the pool called default. I'm not sure if virt-manager will let you change the name, but I change what it points to on my system. Cole can the default pool be renamed?
There isn't any way to tell virt-manager to not use the pool named 'default'. You can create any pool you want named 'default' and virt-manager will use it though. It should be configurable though.
I've moved it to virt-manager as an RFE to allow the default pool to be renamed.
Since RHEL 6.1 External Beta has begun, and this bug remains unresolved, it has been rejected as it is not proposed as an exception or blocker. It has been moved to RHEL 6.2 since it is a FutureFeature request.
Not done upstream yet and would be an non-trivial backport, so deferring to 6.3
*** Bug 649373 has been marked as a duplicate of this bug. ***
Upstream now allows you to rename existing pools, so if you wanted to use a new pool as 'default', just rename it to 'default'. While 'default' isn't really descriptive, it's been in use for a while now, and wiring up virt-manager to use a different named pool as the default storage location is more work than it's worth IMO since it's just cosmetic.