Bug 760795 - support renaming a volume -- virStorageVolumeRename
Summary: support renaming a volume -- virStorageVolumeRename
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Michal Privoznik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-07 00:53 UTC by alekibango
Modified: 2016-03-23 14:40 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-23 14:40:48 UTC
Embargoed:


Attachments (Terms of Use)

Description alekibango 2011-12-07 00:53:55 UTC
Description of problem:

i want to rename volume using libvirt api, but i am unable to do so --  I have to use all kinds of other tools to achieve the needed result.

what should be done: implement virStorageVolumeRename which will rename the volume (using the same pool)...

Comment 1 alekibango 2011-12-07 01:55:40 UTC
see also https://bugzilla.redhat.com/show_bug.cgi?id=760796 -- moving volume to another pool would be very nice to have supported in api.

Comment 2 Michal Privoznik 2013-04-12 06:56:46 UTC
I don't think you are unable to rename a volume or any other object using libvirt. I know this bug went stale, but anyway. You can use combination of virStorageVolGetXMLDesc(), virStorageVolCreateXML() and virStorageVolDelete() you can rename any volume. Just change name and UUID between 1st and 2nd step.

In fact, this is an undocumented feature of virsh as well: if you virsh *edit $obj; change <name> and remove <uuid> (or change it to a non-existing one), you effectively create a clone of the object. Then use just virsh undefine $obj; to undefine original object.

Hence, I am suggesting to close this as NOTABUG. Any ideas?

Comment 3 Cole Robinson 2016-03-23 14:40:48 UTC
Closing as NOTABUG per comment #2


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