Bug 760795 - support renaming a volume -- virStorageVolumeRename
support renaming a volume -- virStorageVolumeRename
Status: CLOSED NOTABUG
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
All All
unspecified Severity low
: ---
: ---
Assigned To: Libvirt Maintainers
Michal Privoznik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-06 19:53 EST by alekibango
Modified: 2016-03-23 10:40 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-23 10:40:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description alekibango 2011-12-06 19:53:55 EST
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-06 20:55:40 EST
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 02:56:46 EDT
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 10:40:48 EDT
Closing as NOTABUG per comment #2

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