Bug 728155 - [virt-manager]can't delete guest from virt-manager when guest have save file
Summary: [virt-manager]can't delete guest from virt-manager when guest have save file
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-manager
Version: 6.2
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Cole Robinson
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2011-08-04 08:39 UTC by zhe peng
Modified: 2011-12-06 16:15 UTC (History)
6 users (show)

Fixed In Version: virt-manager-0.9.0-6.el6
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Last Closed: 2011-12-06 16:15:06 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1642 normal SHIPPED_LIVE virt-manager bug fix and enhancement update 2011-12-06 00:50:37 UTC

Description zhe peng 2011-08-04 08:39:25 UTC
Description of problem:
if save a guest,then can't delete the guest from virt-manager,and no error in debug info.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.install a guest ,make sure the guest running
2.lunch virt-manager,click guest name to open guest graphics console
3.click "Virtual Machine"->"Shut Down"->"Save"
4.after save complete,the guest will shutoff,switch to virt-manager main page,and delete the guest

Actual results:
the guest still in virt-manager w/o any msg
2011-08-04 04:08:57,898 (delete:159): Threading off connection to delete vol.
2011-08-04 04:08:57,899 (delete:173): Removing VM 'spice'

refer to bug: 697742 , libvirt have new options for this

Expected results:
the guest remove from virt-manager,or have dialog to prompt user

Additional info:
actually , when save a guest ,will have an error in debug info,seems another issue
2011-08-04 04:12:05,086 (domain:110): Error calling jobinfo
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/domain.py", line 94, in jobinfo_cb
    jobinfo = vm.job_info()
  File "/usr/share/virt-manager/virtManager/domain.py", line 781, in job_info
    return self._backend.jobInfo()
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1318, in jobInfo
    if ret is None: raise libvirtError ('virDomainGetJobInfo() failed', dom=self)
libvirtError: Requested operation is not valid: domain is not running
2011-08-04 04:12:05,087 (engine:426): Tick is slow, not running at requested rate.

Comment 1 Cole Robinson 2011-08-24 16:50:59 UTC
Does virsh undefine have the same problem? I think I recall a similar libvirt issue, so reassigning there.

Comment 2 Eric Blake 2011-08-24 17:12:36 UTC
Libvirt had a problem where it allowed deletion without removing the save file, and it was fixed in virsh at the series ending here:

commit 83e849c197caf09373d1ff7337d9e2b487ad905c
Author: Osier Yang <jyang@redhat.com>
Date:   Wed Jul 20 11:12:46 2011 +0800

    undefine: Extend virsh undefine to support the new flag
    If the domain has managed save image, and --managed-save is
    not specified, then it fails with an error telling the user
    that a managed save image still exists.

virt-manager needs to be taught the same logic as virsh.  It is unsafe to undefine a domain with managed save data, since stranding that managed save data would interfere with the creation of a new domain by the same name.  When managing older libvirt, virt-manager must manually check for managed save data first; when managing newer libvirt, virt-manager can use the new flag.

Reassigning to virt-manager - the change in libvirt was intentional to forbid undefining of domains with save data, so virt-manager need to make it easier to automatically remove the save data before undefining domains, and to provide the safety check that is guaranteed by newer libvirt but missing in older libvirt.

Comment 4 Cole Robinson 2011-08-30 19:38:59 UTC
Fixed in virt-manager-0.9.0-6.el6

Comment 7 Huming Jiang 2011-09-09 03:37:58 UTC
Reproduce with the following packages:

Verified with the following packages:

1.lunch virt-manager,
#virt-manager --debug
2.install a guest ,make sure the guest running
3.click guest name to open guest graphics console
3.click "Virtual Machine"->"Shut Down"->"Save"
4.after save complete,the guest will shutoff,switch to virt-manager main
page,and delete the guest
The guest could be deleted.
So move the status of this bug from "ON_QA" to "Verified".

Comment 8 Cole Robinson 2011-11-07 16:41:28 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    New Contents:
No description necessary

Comment 9 errata-xmlrpc 2011-12-06 16:15:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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