Bug 1044564 - Cannot rename VM that has snapshots
Summary: Cannot rename VM that has snapshots
Keywords:
Status: CLOSED DUPLICATE of bug 558160
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 20
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-18 15:02 UTC by Jeremy Harris
Modified: 2014-01-18 19:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-18 19:24:14 UTC
Type: Bug


Attachments (Terms of Use)

Description Jeremy Harris 2013-12-18 15:02:34 UTC
Description of problem:
 Using the GUI virt-manager, on a shutdown VM, try to change the Name field in Overview/Basic_Details.  Fails with a popup error window.


Version-Release number of selected component (if applicable):
 Virtual Machine Manager 0.10.0

How reproducible:
 100%


Steps to Reproduce:
1. Create VM
2. Snapshot
3. Sutdown VM
4: Attempt to rename VM.

Actual results:
"Error changing VM configuration: Requested operation is not valid: cannot delete inactive domain with 1 snapshots"

Expected results:


Additional info:
  RHEL7-beta VM on f20 host. VM was Status: Shutoff.  VM image is qcow2 format.  A single snapshot, VM State: Running, was present.

  Error detail:Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 2409, in _change_config_helper
    func(*args)
  File "/usr/share/virt-manager/virtManager/domain.py", line 461, in define_name
    newname)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 87, in _define_name_helper
    rename_cb(self, origxml, newxml)
  File "/usr/share/virt-manager/virtManager/connection.py", line 782, in rename_vm
    obj, origxml, newxml)
  File "/usr/share/virt-manager/virtManager/connection.py", line 753, in _rename_helper
    obj.delete(force=False)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1278, in delete
    self._backend.undefine()
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1866, in undefine
    if ret == -1: raise libvirtError ('virDomainUndefine() failed', dom=self)
libvirtError: Requested operation is not valid: cannot delete inactive domain with 1 snapshots

Comment 1 Cole Robinson 2014-01-18 19:24:14 UTC
This message comes from libvirt. Right now there isn't any official rename API, so we have to undefine/delete the VM and redefine it with the new name. But all the user hidden metadata won't get transfered in that case, like managedsave data or snapshots.

The solution here is that libvirt needs to provide a rename API which handles all that stuff for us.

Duping to the pre-existing RFE

*** This bug has been marked as a duplicate of bug 558160 ***


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