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 863992 - The domain can't be started while the source path of serial redirect to "/root" path
Summary: The domain can't be started while the source path of serial redirect to "/roo...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-08 09:33 UTC by Xuesong Zhang
Modified: 2012-10-08 18:37 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-08 12:45:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xuesong Zhang 2012-10-08 09:33:42 UTC
Description of problem:
The domain can't be started while the source path of serial redirect to "/root" path, it can be started while the source path is other path, such as "/etc" or "/test".
I disabled the selinux to try again, the domain still can't be started and the error message is same as before.

Version-Release number of selected component (if applicable):
libvirt-0.10.2-1.el6
kernel-2.6.32-309.el6.x86_64
qemu-kvm-0.12.1.2-2.316.el6.x86_64
seabios-0.6.1.2-22.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
[on guest]
1. Add console=ttyS0,115200 to guest kernel line.

[on host]
1. Add the following XML to a domain, and delete other serial nodes.
<serial type="file">
   <source path="/root/vm-serial.log"/>
   <target port="1"/>
</serial>
2. Start the domain.

  
Actual results:
The domain can't be started. Below is the error message:
error: Failed to start domain rhel63
error: internal error process exited while connecting to monitor: chardev: opening backend "file" failed

Below is the error message in log:
2012-10-08 07:20:42.607+0000: 2302: error : qemuMonitorOpenUnix:293 : failed to connect to monitor socket: No such process
2012-10-08 07:20:42.607+0000: 2302: error : qemuProcessWaitForMonitor:1644 : internal error process exited while connecting to monitor: chardev: opening backend "file" failed

Expected results:
The domain should be started while the source path is redirect to "/root" path.
If libvirt didn't have the authority, the error message should be reported clearly.

Additional info:

Comment 2 Daniel Berrangé 2012-10-08 10:33:18 UTC
The /root directory permissions only allow the root user to access files in it, and QEMU runs as qemu:qemu, so even if libvirt sets the file permissions, the directory permissions will still block access. IMHO this is not a bug, but actually desired behaviour. Don't use /root for this.

Comment 3 Dave Allan 2012-10-08 13:10:54 UTC
Dan, anything we can do to make the error clearer to the user?  It'd be nice to report what file was causing the problem.

Comment 4 Jiri Denemark 2012-10-08 18:37:14 UTC
We can't really do much about it in libvirt since the error message ``chardev: opening backend "file" failed'' comes from qemu-kvm.


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