Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 677547

Summary: Virsh save a shutoff guest get 'error: cannot resolve symlink'
Product: Red Hat Enterprise Linux 6 Reporter: zhanghaiyan <yoyzhang>
Component: libvirtAssignee: Osier Yang <jyang>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 6.1CC: dallan, dyuan, eblake, jyang, llim, syeghiay, veillard, xen-maint
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.8.7-7.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:27:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description zhanghaiyan 2011-02-15 07:58:50 UTC
Description of problem:
Virsh save a shutoff guest get 'error: cannot resolve symlink'

Version-Release number of selected component (if applicable):
- libvirt-0.8.7-6.el6.x86_64
- kernel-2.6.32-113.el6.x86_64
- qemu-kvm-0.12.1.2-2.144.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.# virsh list --all
 Id Name                 State
----------------------------------
  - rhel6                shut off
2. # virsh save rhel6 rhel6.save
error: Failed to save domain rhel6 to rhel6.save
error: cannot resolve symlink /tmp/rhel6.save: No such file or directory
3. # touch rhel6.save
4. # virsh save rhel6 rhel6.save
error: Failed to save domain rhel6 to rhel6.save
error: Requested operation is not valid: domain is not running
5. # cat /var/log/libvirtd.log 
02:56:37.950: 8023: info : libvirt version: 0.8.7, package: 6.el6 (Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>, 2011-02-11-11:31:35, hs20-bc2-4.build.redhat.com)
02:56:37.950: 8023: warning : SELinuxRestoreSecurityFileLabel:434 : cannot resolve symlink /tmp/rhel6.save: No such file or directory
02:56:37.950: 8023: warning : qemudDomainSaveFlag:4978 : failed to restore save state label on /tmp/rhel6.save

Actual results:
step3, failed symlink error

Expected results:
step3 should fail the same as step4

Additional info:
In bug 672449, the issue was resolved. But in my test environment, I downgrade libvirt to -4 (the same with https://bugzilla.redhat.com/show_bug.cgi?id=672449#c7), but still got the same error. Is it possible kernel or qemu-kvm did some change ?

Comment 4 Osier Yang 2011-02-15 08:18:18 UTC
Though marking it as "regression" is fine, but it's not regression by fix of #BZ 672449, this bug is about "save", 672449 is about "managedsave".

Comment 5 zhanghaiyan 2011-02-15 08:20:04 UTC
manage save works well 
# virsh managedsave rhel6
error: Failed to save domain rhel6 state
error: Requested operation is not valid: domain is not running

but save to the same path failed
# virsh save rhel6 /var/lib/libvirt/qemu/rhel6.save
error: Failed to save domain rhel6 to /var/lib/libvirt/qemu/rhel6.save
error: cannot resolve symlink /var/lib/libvirt/qemu/rhel6.save: No such file or directory

Comment 6 zhanghaiyan 2011-02-15 08:21:17 UTC
(In reply to comment #4)
> Though marking it as "regression" is fine, but it's not regression by fix of
> #BZ 672449, this bug is about "save", 672449 is about "managedsave".

yup, you're right, thanks.

Comment 7 Osier Yang 2011-02-15 08:30:43 UTC
http://www.redhat.com/archives/libvir-list/2011-February/msg00503.html

patch posted to upstream.

Comment 8 Osier Yang 2011-02-17 03:36:37 UTC
patch posted internally, move to POST.

http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-February/msg01073.html

Comment 10 zhanghaiyan 2011-02-18 06:31:07 UTC
Verified PASS with libvirt-0.8.7-7.el6.x86_64
- kernel-2.6.32-113.el6.x86_64
- qemu-kvm-0.12.1.2-2.145.el6.x86_64

# getenforce 
Enforcing

1. # virsh list --all
 Id Name                 State
----------------------------------
  - rhel6                shut off
2. # ll /tmp/rhel6.save
ls: cannot access /tmp/rhel6.save: No such file or directory
3. # virsh save rhel6 /tmp/rhel6.save
error: Failed to save domain rhel6 to /tmp/rhel6.save
error: Requested operation is not valid: domain is not running

Comment 13 errata-xmlrpc 2011-05-19 13:27:32 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0596.html