RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1314594 - Libvirt should reject to rename a domain in saved status.
Summary: Libvirt should reject to rename a domain in saved status.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-04 01:59 UTC by Fangge Jin
Modified: 2016-11-03 18:38 UTC (History)
3 users (show)

Fixed In Version: libvirt-1.3.3-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:38:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Fangge Jin 2016-03-04 01:59:29 UTC
Description of problem:
Do managedsave for a running domain, then rename the domain, and start it again, guest will start freshly instead of starting from the saved status.

Version-Release number of selected component (if applicable):
libvirt-1.3.2-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
0.Start a guest
# virsh start rhel7.2
Domain rhel7.2 started

1. Do managedsave:
# virsh managedsave rhel7.2

Domain rhel7.2 state saved by libvirt

# ls /var/lib/libvirt/qemu/save/rhel7.2.save
/var/lib/libvirt/qemu/save/rhel7.2.save


2. Rename the domain
# virsh domrename rhel7.2 new
Domain successfully renamed

3. Start guest again
# virsh start new
Domain new started

Check guest OS booting process, it doesn't boot from the state it's saved.

4.
# ls /var/lib/libvirt/qemu/save/rhel7.2.save
/var/lib/libvirt/qemu/save/rhel7.2.save

Actual results:
Guest will start freshly instead of starting from the saved status after renaming

Expected results:
Libvirt should reject to rename a domain in saved status.

Comment 2 Peter Krempa 2016-03-07 09:19:24 UTC
Fixed upstream:

commit 47fdf9bc3a823e21baa6fc8c504dfc3e97c560d9
Author: Peter Krempa <pkrempa>
Date:   Mon Mar 7 10:06:19 2016 +0100

    qemu: rename: Forbid renaming domains with managed save image
    
    The code does not handle renaming of the save state file. In addition to
    that the resuming code would need to be tweaked to handle the name
    change since the XML is extracted from the save image. The easies option
    is to make the rename API even less useful by forbiding this.

v1.3.2-67-g47fdf9b

Comment 3 Mike McCune 2016-03-28 23:19:36 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 5 Fangge Jin 2016-04-11 09:09:40 UTC
Verify pass on build libvirt-1.3.3-1.el7.x86_64:

Steps:
1. # virsh list --all
 Id    Name                           State
----------------------------------------------------
 6     rhel7.2-1030                   running
2. # virsh managedsave 6
3. # virsh domrename rhel7.2-1030 rhel7.2-new
error: Requested operation is not valid: domain with a managed saved state can't be renamed
4. # virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     rhel7.2-1030                   shut off

Comment 7 errata-xmlrpc 2016-11-03 18:38:55 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.

https://rhn.redhat.com/errata/RHSA-2016-2577.html


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