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 1112066

Summary: libvirt failed to start a domain with unix+guestfwd channel
Product: Red Hat Enterprise Linux 6 Reporter: Hu Jianwei <jiahu>
Component: libvirtAssignee: Martin Kletzander <mkletzan>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.6CC: ajia, dyuan, honzhang, jiyan, mdeng, mkletzan, mzhan, rbalakri
Target Milestone: rcKeywords: Upstream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.10.2-40.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1113668 (view as bug list) Environment:
Last Closed: 2014-10-14 04:22:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1113668    

Description Hu Jianwei 2014-06-23 05:43:35 UTC
Description of problem:
libvirt failed to start a domain with unix+guestfwd channel

Version-Release number of selected component (if applicable):
libvirt-0.10.2-38.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.428.el6.x86_64
kernel-2.6.32-468.el6.x86_64

How reproducible:
100%

Steps to Reproduce:

[root@rhel6 ~]# virsh dumpxml r7 | grep channel -A5
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/foo'/>
      <target type='guestfwd' address='127.0.0.1' port='2445'/>
    </channel>
...
[root@rhel6 ~]# virsh start r7
error: Failed to start domain r7
error: internal error process exited while connecting to monitor: 2014-06-19T09:02:41.371927Z qemu-kvm: -netdev user,guestfwd=tcp:127.0.0.1:2445,chardev=charchannel0,id=user-channel0: Invalid parameter 'chardev'

Actual results:
As shown above step.

Expected results:
Domain should be started successfully.

Comment 2 Martin Kletzander 2014-06-26 14:57:46 UTC
Fixed upstream with v1.2.6-rc1-12-g39931f5:

commit 39931f5ee8314137dba453bad9742310fc275f5b
Author: Martin Kletzander <mkletzan>
Date:   Thu Jun 26 16:09:46 2014 +0200

    qemu: fix guestfwd chardev option back how it was

Comment 5 Hu Jianwei 2014-07-01 07:58:21 UTC
I still can reproduce it using fixed version, but it has a different error message.

[root@dell-per415-02 ~]# rpm -q libvirt qemu-kvm-rhev
libvirt-0.10.2-40.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.428.el6.x86_64

[root@dell-per415-02 ~]# virsh dumpxml r7| grep channel -A5
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/foo'/>
      <target type='guestfwd' address='127.0.0.1' port='2445'/>
    </channel>

[root@dell-per415-02 ~]# virsh start r7
error: Failed to start domain r7
error: internal error process exited while connecting to monitor: 2014-07-01T07:44:27.910998Z qemu-kvm: -netdev user,guestfwd=tcp:127.0.0.1:2445-chardev:charchannel0,id=user-channel0: conflicting/invalid host:port in guest forwarding rule 'tcp:127.0.0.1:2445-chardev:charchannel0'
2014-07-01T07:44:27.911350Z qemu-kvm: -netdev user,guestfwd=tcp:127.0.0.1:2445-chardev:charchannel0,id=user-channel0: Device 'user' could not be initialized

Comment 6 Martin Kletzander 2014-07-02 08:49:22 UTC
(In reply to Hu Jianwei from comment #5)
Of course, because guestfwd outside the default guest address for the interface doesn't make sense.  So by default it has to be an address in the network 10.0.2.0/24 and can't be 10.0.2.2 (DHCP server) or 10.0.2.3 (DNS server).

Comment 7 Hu Jianwei 2014-07-03 09:27:48 UTC
(In reply to Martin Kletzander from comment #6)
> (In reply to Hu Jianwei from comment #5)
> Of course, because guestfwd outside the default guest address for the
> interface doesn't make sense.  So by default it has to be an address in the
> network 10.0.2.0/24 and can't be 10.0.2.2 (DHCP server) or 10.0.2.3 (DNS
> server).

Yes, the domain can start successfully.

[root@rhel6 ~]# virsh dumpxml r7 | grep channel -A4
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/foo'/>
      <target type='guestfwd' address='10.0.2.9' port='2445'/>
    </channel>
...

[root@rhel6 ~]# virsh start r7
Domain r7 started

[root@rhel6 ~]# ps aux | grep qemu-kvm
qemu     13389 52.9  0.3 1536916 30804 ?       Sl   14:47   0:05 /usr/libexec/qemu-kvm -name r7 -S -M rhel6.5.0 -enable-kvm -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 727bfa08-3937-aee7-8b61-13a6ec1c398e -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/r7.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:68:d6:f0,bus=pci.0,addr=0x3 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/foo,server,nowait -netdev user,guestfwd=tcp:10.0.2.9:2445-chardev:charchannel0,id=user-channel0 -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 -msg timestamp=on

Comment 10 Hu Jianwei 2014-07-04 01:23:54 UTC
According to comment 7's testing results, we can get expected results, so changed to verified.

Comment 12 errata-xmlrpc 2014-10-14 04:22:37 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.

http://rhn.redhat.com/errata/RHBA-2014-1374.html