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 611447 - qemu: vhost-net requested but could not be initialized
Summary: qemu: vhost-net requested but could not be initialized
Keywords:
Status: CLOSED DUPLICATE of bug 615118
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-05 10:21 UTC by Alex Jia
Modified: 2013-01-09 22:49 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-10 02:02:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Can't fix selinux context in this case. (6.71 KB, text/plain)
2010-07-05 10:24 UTC, Alex Jia
no flags Details

Description Alex Jia 2010-07-05 10:21:54 UTC
Description of problem:
Can't successfully install guest using virt-install when selinux enable, it can successfully install if disable selinux. 

Version-Release number of selected component (if applicable):
# uname -a
Linux dhcp-66-70-62.nay.redhat.com 2.6.32-37.el6.x86_64 #1 SMP Sun Jun 20 19:29:35 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
# rpm -q libvirt
libvirt-0.8.1-13.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.90.el6.x86_64
# rpm -q python-virtinst
python-virtinst-0.500.3-5.el6.noarch

How reproducible:
Always

Steps to Reproduce:
#virt-install --name=demo --ram=1024 --vcpus=1 --location=http://download.englab.nay.redhat.com/pub/rhel/released/RHEL-6/Beta-2/Server/x86_64/os/ --disk path=/var/lib/libvirt/images/demo,size=4 --vnc

  
Actual results:
ERROR    internal error Process exited while reading console log output: char device redirected to /dev/pts/7
qemu-kvm: -netdev tap,fd=22,id=hostnet0,vhost=on,vhostfd=26: vhost-net requested but could not be initialized
qemu-kvm: -netdev tap,fd=22,id=hostnet0,vhost=on,vhostfd=26: Device 'tap' could not be initialized

Expected results:
Fix it.

Additional info:
Please see attachment.

Comment 1 Alex Jia 2010-07-05 10:24:37 UTC
Created attachment 429500 [details]
Can't fix selinux context in this case.

Comment 3 Dor Laor 2010-07-12 11:27:41 UTC
Michael & Daniel, can you sort out what component to blame?

Comment 4 Michael S. Tsirkin 2010-07-12 11:56:37 UTC
looks like a libvirt issue: it's passing us an invalid vhostfd.
it could be selinux related: there's a warning on that
above:

[Mon, 05 Jul 2010 18:18:28 virt-install 24880] DEBUG (VirtualDisk:1179) Can't fix selinux context in this case.

Comment 5 Daniel Berrangé 2010-07-12 12:14:14 UTC
Is selinux enabled & enforcing ?

Comment 6 Alex Jia 2010-07-13 03:24:55 UTC
(In reply to comment #5)
> Is selinux enabled & enforcing ?    

Selinux is enforcing:

# getenforce
Enforcing

Comment 7 Amit Shah 2010-07-15 11:01:07 UTC
Re-assigning component acc. to comment 4

Comment 8 Laine Stump 2010-07-20 16:40:56 UTC
What problems does selinux report?

Can you run "setenforce Permissive", run the virt-install again, and send the output of:

    grep denied /var/log/audit/audit.log

(or even better, the "full error output" from all the alerts show in the SELinux Security Alerts tool).

Comment 9 Laine Stump 2010-07-20 17:08:48 UTC
Just for reference, I can't reproduce this problem using an identical commandline with the 20100719.n.0 snapshot (and selinux enforcing).

Comment 10 Alex Jia 2010-07-23 03:07:46 UTC
(In reply to comment #9)
> Just for reference, I can't reproduce this problem using an identical
> commandline with the 20100719.n.0 snapshot (and selinux enforcing).    

Laine,
Thanks, it may be my environment issue, only I met the bug, and I can't reproduce it with libvirt-0.8.1-18.el6.x86_64, so I will close the bug, if I meet it again I will reopen it.

Comment 11 Jeff Burke 2010-08-04 15:44:26 UTC
This issue is back. It was seen while testing the latest kernel 2.6.32-58.el6. 

dirname is: tmp.4003 
virt-install --name guest-80-138.rhts.eng.bos.redhat.com --mac 00:16:3E:50:8A:B3 --cdrom /var/lib/libvirt/images/guest-80-138.rhts.eng.bos.redhat.com.iso --ram=1024 --vcpus=2 --file-size=20 --hvm --debug --extra-args ks=http://lab2.rhts.eng.bos.redhat.com/cblr/svc/op/ks/system/guest-80-138.rhts.eng.bos.redhat.com --prompt --accelerate --os-variant=virtio26 --network bridge:br0   --noreboot --vnc                                                         spawn virt-install --name guest-80-138.rhts.eng.bos.redhat.com --mac 00:16:3E:50:8A:B3 --cdrom /var/lib/libvirt/images/guest-80-138.rhts.eng.bos.redhat.com.iso --ram=1024 --vcpus=2 --file-size=20 --hvm --debug --extra-args ks=http://lab2.rhts.eng.bos.redhat.com/cblr/svc/op/ks/system/guest-80-138.rhts.eng.bos.redhat.com --prompt --accelerate --os-variant=virtio26 --network bridge:br0   --noreboot --vnc                                                         
Wed, 04 Aug 2010 09:14:33 DEBUG    Launched with command line:
/usr/sbin/virt-install --name guest-80-138.rhts.eng.bos.redhat.com --mac 00:16:3E:50:8A:B3 --cdrom /var/lib/libvirt/images/guest-80-138.rhts.eng.bos.redhat.com.iso --ram=1024 --vcpus=2 --file-size=20 --hvm --debug --extra-args ks=http://lab2.rhts.eng.bos.redhat.com/cblr/svc/op/ks/system/guest-80-138.rhts.eng.bos.redhat.com --prompt --accelerate --os-variant=virtio26 --network bridge:br0   --noreboot --vnc                                                         
Wed, 04 Aug 2010 09:14:33 DEBUG    Requesting libvirt URI default
Wed, 04 Aug 2010 09:14:33 DEBUG    Received libvirt URI qemu:///system
Wed, 04 Aug 2010 09:14:33 DEBUG    Requesting virt method 'hvm', hv type 'default'.
Wed, 04 Aug 2010 09:14:33 DEBUG    Received virt method 'hvm'
Wed, 04 Aug 2010 09:14:33 DEBUG    Hypervisor name is 'kvm'
Please enter the path to the file you would like to use for storage. It will have size 20.0GB. /var/lib/libvirt/images/guest-80-138.rhts.eng.bos.redhat.com 
Wed, 04 Aug 2010 09:14:33 DEBUG    Setting os type to 'linux' for variant 'virtio26'
Wed, 04 Aug 2010 09:14:33 DEBUG    DistroInstaller location is a local file/path: /var/lib/libvirt/images/guest-80-138.rhts.eng.bos.redhat.com.iso
 

Starting install...

Creating storage file guest-80-138.rhts.eng.bos.redhat.c |  20 GB     00:00     
Wed, 04 Aug 2010 09:14:33 DEBUG    Generated install XML: 
<domain type='kvm'>
  <name>guest-80-138.rhts.eng.bos.redhat.com</name>
  <currentMemory>1048576</currentMemory>
  <memory>1048576</memory>
  <uuid>2c50f1bd-b19e-3157-d1d4-ab7683fe2e45</uuid>
  <os>
    <type arch='x86_64'>hvm</type>
    <boot dev='cdrom'/>
  </os>
  <features>
    <acpi/><apic/><pae/>
  </features>
  <clock offset="utc"/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>destroy</on_reboot>
  <on_crash>destroy</on_crash>
  <vcpu>2</vcpu>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/var/lib/libvirt/images/guest-80-138.rhts.eng.bos.redhat.com'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu'/>
      <source file='/var/lib/libvirt/images/guest-80-138.rhts.eng.bos.redhat.com.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
    </disk>
    <interface type='bridge'>
      <source bridge='br0'/>
      <mac address='00:16:3E:50:8A:B3'/>
      <model type='virtio'/>
    </interface>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' keymap='en-us'/>
    <console type='pty'/>
    <video>
      <model type='cirrus'/>
    </video>
  </devices>
</domain>

Wed, 04 Aug 2010 09:14:34 ERROR    internal error Process exited while reading console log output: char device redirected to /dev/pts/2
qemu-kvm: -netdev tap,fd=20,id=hostnet0,vhost=on,vhostfd=21: vhost-net requested but could not be initialized
qemu-kvm: -netdev tap,fd=20,id=hostnet0,vhost=on,vhostfd=21: Device 'tap' could not be initialized

Domain installation does not appear to have been
 successful.  If it was, you can restart your domain
 by running 'virsh start guest-80-138.rhts.eng.bos.redhat.com'; otherwise, please
 restart your installation.
Wed, 04 Aug 2010 09:14:34 ERROR    internal error Process exited while reading console log output: char device redirected to /dev/pts/2
qemu-kvm: -netdev tap,fd=20,id=hostnet0,vhost=on,vhostfd=21: vhost-net requested but could not be initialized
qemu-kvm: -netdev tap,fd=20,id=hostnet0,vhost=on,vhostfd=21: Device 'tap' could not be initialized
Traceback (most recent call last):
  File "/usr/sbin/virt-install", line 1054, in <module>
    main()
  File "/usr/sbin/virt-install", line 936, in main
    start_time, guest.start_install)
  File "/usr/sbin/virt-install", line 978, in do_install
    dom = install_func(conscb, progresscb, wait=(not wait))
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 973, in start_install
    return self._do_install(consolecb, meter, removeOld, wait)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1038, in _do_install
    "install")
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1009, in _create_guest
    dom = self.conn.createLinux(start_xml, 0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1270, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error Process exited while reading console log output: char device redirected to /dev/pts/2
qemu-kvm: -netdev tap,fd=20,id=hostnet0,vhost=on,vhostfd=21: vhost-net requested but could not be initialized
qemu-kvm: -netdev tap,fd=20,id=hostnet0,vhost=on,vhostfd=21: Device 'tap' could not be initialized

A Libvirt error occurred during installation.

Comment 12 Martin Jenner 2010-08-04 16:04:53 UTC
Reproduced; this is a hard error with the 2.6.32-58.el6.x86_64 kernel prior kernels -54,56,57.el6 where tested and we do not hit the issue.

command line used for testing.
# virt-install --hvm --name vm1 --ram 1024 --vnc --cdrom http://download.lab.bos.redhat.com/redhat/rel-eng/RHEL6.0-20100730.5/6/Server/i386/os --disk path=/var/lib/libvirt/images/vm1,size=6,device=disk,bus=virtio --accelerate --os-variant=rhel6 --debug

seen on both Intel and AMD systems.

Comment 13 Chris Lalancette 2010-08-04 16:28:46 UTC
Looks like a possible culprit:

eae4695f6bfab836ccc207eaf3047656599d385f: [virt] vhost: create a vhost thread per device

A bisect would confirm.

Chris Lalancette

Comment 15 Laine Stump 2010-08-04 18:26:41 UTC
Michael - any ideas?

Comment 16 Laine Stump 2010-08-10 02:02:51 UTC
Bug 615118 was also re-opened because of this, and the fix is being tracked there, so I'm marking this as a duplicate.

*** This bug has been marked as a duplicate of bug 615118 ***


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