Bug 592374 - fail to create a HVM by using virsh or VMM when ixgbe vf is assigned to the HVM
Summary: fail to create a HVM by using virsh or VMM when ixgbe vf is assigned to the HVM
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.5
Hardware: All
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: Rhel5KvmTier2
TreeView+ depends on / blocked
 
Reported: 2010-05-14 17:08 UTC by sibai.li
Modified: 2010-11-16 22:49 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-16 22:49:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
dmesg info (50.32 KB, application/octet-stream)
2010-05-21 21:55 UTC, sibai.li
no flags Details
lspci -xxx (157.02 KB, application/octet-stream)
2010-05-21 21:58 UTC, sibai.li
no flags Details
lspci (12.63 KB, application/octet-stream)
2010-05-21 21:59 UTC, sibai.li
no flags Details

Description sibai.li 2010-05-14 17:08:14 UTC
Description of problem:
In KVM, it always fails to create a HVM by using virsh (with a xml file) or VMM if an ixgbe vf needs be assigned to the HVM. 

Not sure if this bug is also related to the bug 
https://bugzilla.redhat.com/show_bug.cgi?id=581655

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create a xml file, name kvm.xml
<domain type='kvm' id='1'>
  <name>RHEL-5.5-KVM_vm1</name>
  <uuid>da9882a0-e86a-2fcd-d6ac-e3bd1a34b33b</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc'>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'>
      <source file='/images/RHEL-5.5_vm1.img'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <interface type='network'>
      <mac address='54:52:00:65:24:5a'/>
      <source network='default'/>
      <target dev='vnet0'/>
    </interface>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
    <source>
    <address bus='0x04' slot='0x10' function='0x00'/>
    </source>
    </hostdev> 
  </devices>
</domain>
2. run virsh create kvm.xml 
3. Failed to create domain from kvm.xml
error: internal error unable to start guest: char device redirected to /dev/pts/6
4. Check the log file
Last login: Thu May 13 16:15:02 2010
[root@localhost ~]# cat /var/log/libvirt/qemu/kvm_linux_vm1.log
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin HOME=/ /usr/libexec/qemu-kvm -S -M pc -m 512 -smp 2 -name kvm_linux_vm1 -uuid da9882a0-e86a-2fcd-d6ac-e3bd1a34b33b -no-kvm-pit-reinjection -monitor pty -pidfile /var/run/libvirt/qemu//kvm_linux_vm1.pid -boot c -drive file=/images/kernel_vm2,if=ide,index=0,boot=on -net nic,macaddr=54:52:00:65:24:5a,vlan=0 -net tap,fd=19,script=,vlan=0,ifname=vnet0 -serial none -parallel none -usb -vnc 127.0.0.1:0 -k en-us -pcidevice host=01:10.0 -pcidevice host=01:10.2
char device redirected to /dev/pts/5
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin HOME=/ /usr/libexec/qemu-kvm -S -M pc -m 512 -smp 2 -name kvm_linux_vm1 -uuid da9882a0-e86a-2fcd-d6ac-e3bd1a34b33b -no-kvm-pit-reinjection -monitor pty -pidfile /var/run/libvirt/qemu//kvm_linux_vm1.pid -boot c -drive file=/images/kernel_vm2,if=ide,index=0,boot=on -net nic,macaddr=54:52:00:65:24:5a,vlan=0 -net tap,fd=19,script=,vlan=0,ifname=vnet0 -serial none -parallel none -usb -vnc 127.0.0.1:0 -k en-us -pcidevice host=01:10.0 -pcidevice host=01:10.2
char device redirected to /dev/pts/5
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
BUG: kvm_destroy_phys_mem: invalid parameters (slot=-1)
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin HOME=/ /usr/libexec/qemu-kvm -S -M pc -m 512 -smp 2 -name kvm_linux_vm1 -uuid da9882a0-e86a-2fcd-d6ac-e3bd1a34b33b -no-kvm-pit-reinjection -monitor pty -pidfile /var/run/libvirt/qemu//kvm_linux_vm1.pid -boot c -drive file=/images/kernel_vm2,if=ide,index=0,boot=on -net nic,macaddr=54:52:00:65:24:5a,vlan=0 -net tap,fd=19,script=,vlan=0,ifname=vnet0 -serial none -parallel none -usb -vnc 127.0.0.1:0 -k en-us -pcidevice host=04:10.0 -pcidevice host=04:10.2
char device redirected to /dev/pts/5
Failed to assign irq for "04:10.0": Input/output error
Perhaps you are assigning a device that shares an IRQ with another device?
Failed to initialize assigned device host=04:10.0
[root@localhost ~]#

  
Actual results:


Expected results:


Additional info:

Comment 1 Don Dutile (Red Hat) 2010-05-21 21:37:32 UTC
Assuming you loaded the ixgbe driver w/appropriate flags (max_vfs=8),
can you provide the host dmesg log, and the host's lspci, and lspci -xxx output?
Bug 581655 is xen-related, so not a kvm bug.

It's possible the system bios didnt' make enough window space for
vf's downstream of pci-pci bridge; the above logs should help to decipher if that's the case.

Comment 2 Don Dutile (Red Hat) 2010-05-21 21:45:16 UTC
also, what was your version of kvm on this system ?

Comment 3 sibai.li 2010-05-21 21:55:55 UTC
Created attachment 415788 [details]
dmesg info

Comment 4 sibai.li 2010-05-21 21:58:47 UTC
Created attachment 415792 [details]
lspci -xxx

Comment 5 sibai.li 2010-05-21 21:59:51 UTC
Created attachment 415793 [details]
lspci

Comment 6 sibai.li 2010-05-21 22:02:36 UTC
(In reply to comment #1)
> Assuming you loaded the ixgbe driver w/appropriate flags (max_vfs=8),
> can you provide the host dmesg log, and the host's lspci, and lspci -xxx
> output?
  Please see the attachments. The PF driver is loaded correctly, since the VF can be assigned to a VM by using qemu-kvm, and the VF works just fine.
> Bug 581655 is xen-related, so not a kvm bug.
> It's possible the system bios didnt' make enough window space for
> vf's downstream of pci-pci bridge; the above logs should help to decipher if
> that's the case.    
  I don't think so, beacuse the VF works fine when qemu-kvm command is used.

Comment 7 sibai.li 2010-05-21 22:05:10 UTC
(In reply to comment #2)
> also, what was your version of kvm on this system ?    
Is this the right way to check the version

[root@localhost ~]# cat /sys/module/kvm/version
kvm-83-164.el5
[root@localhost ~]#

Comment 8 Don Dutile (Red Hat) 2010-05-21 22:15:34 UTC
(In reply to comment #6)
> (In reply to comment #1)
> > Assuming you loaded the ixgbe driver w/appropriate flags (max_vfs=8),
> > can you provide the host dmesg log, and the host's lspci, and lspci -xxx
> > output?
>   Please see the attachments. The PF driver is loaded correctly, since the VF
> can be assigned to a VM by using qemu-kvm, and the VF works just fine.
> > Bug 581655 is xen-related, so not a kvm bug.
> > It's possible the system bios didnt' make enough window space for
> > vf's downstream of pci-pci bridge; the above logs should help to decipher if
> > that's the case.    
>   I don't think so, beacuse the VF works fine when qemu-kvm command is used.    

You hadn't stated anywhere that it works with qemu-kvm command directly.

That makes this a libvirt problem (which virsh uses to generate qemu-kvm command).

Comment 9 sibai.li 2010-05-21 22:30:07 UTC
(In reply to comment #8)
> (In reply to comment #6)
> > (In reply to comment #1)
> > > Assuming you loaded the ixgbe driver w/appropriate flags (max_vfs=8),
> > > can you provide the host dmesg log, and the host's lspci, and lspci -xxx
> > > output?
> >   Please see the attachments. The PF driver is loaded correctly, since the VF
> > can be assigned to a VM by using qemu-kvm, and the VF works just fine.
> > > Bug 581655 is xen-related, so not a kvm bug.
> > > It's possible the system bios didnt' make enough window space for
> > > vf's downstream of pci-pci bridge; the above logs should help to decipher if
> > > that's the case.    
> >   I don't think so, beacuse the VF works fine when qemu-kvm command is used.    
> You hadn't stated anywhere that it works with qemu-kvm command directly.
> That makes this a libvirt problem (which virsh uses to generate qemu-kvm
> command).    

I thought I wrote something about qemu-kvm command, but I didn't. Do you have a QA to test the product or reproduct the bug?

Comment 10 Daniel Berrangé 2010-07-06 14:37:18 UTC
Was SELinux enabled & enforcing on the machine when attempting this ?

Comment 12 Daniel Veillard 2010-09-15 15:43:46 UTC
Could you recheck with the rebased libvirt-0.8.2-4.el5 it may fix the problem

Daniel

Comment 13 Dave Allan 2010-11-16 22:49:20 UTC
Since this BZ has been in needinfo since early July, I am going to close as insufficient data.  Please feel free to reopen if additional data becomes available.


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