Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 601276 - Can not start vm if vhost-net is loaded.
Can not start vm if vhost-net is loaded.
Status: CLOSED DUPLICATE of bug 599146
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.0
All Linux
medium Severity high
: rc
: ---
Assigned To: Daniel Veillard
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-07 11:37 EDT by lihuang
Modified: 2010-06-14 06:35 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-12 04:53:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description lihuang 2010-06-07 11:37:56 EDT
Description of problem:
got following error when start vm 


Error starting domain: internal error Process exited while reading console log output: char device redirected to /dev/pts/1
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/share/virt-manager/virtManager/engine.py", line 878, in run_domain
    vm.startup()
  File "/usr/share/virt-manager/virtManager/domain.py", line 1311, in startup
    self._backend.create()
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 333, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error Process exited while reading console log output: char device redirected to /dev/pts/1
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



can start guest with commandline like :
 -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,mac=02:00:40:3F:20:20,bus=pci.0,addr=0x4





Version-Release number of selected component (if applicable):
libvirt-0.8.1-7.el6.x86_64
kernel-2.6.32-33.el6.x86_64
qemu-kvm-0.12.1.2-2.69.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.lsmod | grep vhost_net
  ==> vhost-net is not loaded
2.start a pre-installed vm (virtio-net)
  ==> vm start normally
3.shutdown vm
4.modprobe vhost-net 
5.start the vm again
  
Actual results:
FAILED .

Expected results:



Additional info:
virsh # dumpxml rhel5
<domain type='kvm' id='1'>
  <name>rhel5</name>
  <uuid>85d541f2-3d57-b0f1-c095-c6e4f2638fe2</uuid>
  <memory>2097152</memory>
  <currentMemory>2097152</currentMemory>
  <vcpu>2</vcpu>
  <os>
    <type arch='x86_64' machine='rhel6.0.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/rhel5.img'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <interface type='bridge'>
      <mac address='52:54:00:34:59:ac'/>
      <source bridge='breth0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/1'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/1'>
      <source path='/dev/pts/1'/>
      <target port='0'/>
      <alias name='serial0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/>
    <sound model='ac97'>
      <alias name='sound0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </sound>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
  </devices>
  <seclabel type='dynamic' model='selinux'>
    <label>system_u:system_r:svirt_t:s0:c506,c706</label>
    <imagelabel>system_u:object_r:svirt_image_t:s0:c506,c706</imagelabel>
  </seclabel>
</domain>
Comment 1 lihuang 2010-06-07 11:40:28 EDT
FYI . in bug 596891. vhost-net is going to be loaded automatically.
Comment 3 RHEL Product and Program Management 2010-06-07 12:18:32 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 5 lihuang 2010-06-07 23:04:13 EDT
/var/log/libvirt/qemu/rhel5.log

LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name rhel5 -uuid 85d541f2-3d57-b0f1-c095-c6e4f2638fe2 -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/rhel5.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -boot c -drive file=/var/lib/libvirt/images/rhel5.img,if=none,id=drive-virtio-disk0,boot=on,format=raw -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:34:59:ac,bus=pci.0,addr=0x5 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:0 -k en-us -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0x6 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 
char device redirected to /dev/pts/1
qemu-kvm: -netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24: vhost-net requested but could not be initialized
qemu-kvm: -netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24: Device 'tap' could not be initialized
Comment 6 Daniel Berrange 2010-06-08 08:33:12 EDT
Is SELinux set to 'enforcing' ?  if so, does 'setenforce 0' make it work ?
Comment 7 lihuang 2010-06-12 04:53:20 EDT
(In reply to comment #6)
> Is SELinux set to 'enforcing' ?  if so, does 'setenforce 0' make it work ?    

Hi Daniel.
 yes. selinux is enforcing,  Guest start normally after change to Permissive. 

closing as not a bug ?
Comment 8 Daniel Berrange 2010-06-14 06:35:20 EDT

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

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