Fuzail Ahmad
2019-May-23 17:07 UTC
[libvirt-users] [Libvirt failed to claim Virtual Functions on hostdev network after VM reboot]
Problem Statement:
Libvirt failed to claim Virtual Functions on hostdev network after VM
reboot.
Version-Release number of selected component (if applicable):
libvirtd (libvirt) 2.0.0
kernel-4.1.12-112.16.4.el7uek.x86_64
Reproducible: Not always
Description:
I am doing a reboot of Virtual machines and sometimes one of the VM
does not start and fail with the following error
In total I have spun 3 VMs out of which 2 gets started and 1 of them
fail with the below error.
[root@sriov2 ~]# virsh start VM3
error: Failed to attach interface
error: internal error: network 'hostnet' requires exclusive access to
interfaces, but none are available
[root@sriov2 ~]# virsh net-dumpxml hostnet
<network connections='2'>
<name>hostnet</name>
<uuid>c1fb4ead-21b8-4d69-8ad9-669c55b3dfc7</uuid>
<forward mode='hostdev' managed='yes'>
<address type='pci' domain='0x0000' bus='0x0f'
slot='0x10' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x0f'
slot='0x10' function='0x2'/>
</forward>
</network>
However, "ip link show" command shows 8 VFs in total.
# ip link show ens2
ens2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP
mode DEFAULT qlen 1000
link/ether 00:0a:f7:d5:a7:50 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 52:54:00:6d:7c:a0, spoof checking off, link-state auto
vf 1 MAC 52:54:00:44:c9:b6, spoof checking off, link-state auto
vf 2 MAC 52:54:00:30:7a:86, spoof checking off, link-state auto
vf 3 MAC c6:9a:1b:82:90:ea, spoof checking off, link-state auto
vf 4 MAC 46:db:e2:33:c7:a4, spoof checking off, link-state auto
vf 5 MAC 76:65:e1:f7:82:78, spoof checking off, link-state auto
vf 6 MAC 8e:a0:8b:e5:1a:66, spoof checking off, link-state auto
vf 7 MAC ba:f4:83:19:80:bf, spoof checking off, link-state auto
#
Please, letme know if I need to attach any additional information.
Regards
Fuzail
Erik Skultety
2019-May-24 10:33 UTC
Re: [libvirt-users] [Libvirt failed to claim Virtual Functions on hostdev network after VM reboot]
On Thu, May 23, 2019 at 10:37:56PM +0530, Fuzail Ahmad wrote:> Problem Statement: > > Libvirt failed to claim Virtual Functions on hostdev network after VM > reboot. > > Version-Release number of selected component (if applicable): > > libvirtd (libvirt) 2.0.0I'd just like to point out that 2.0.0 is very old libvirt, even debian 9 has 3.0.n, can you verify you're experiencing the same kind of issue with the current upstream? Regards, Erik
Yalan Zhang
2019-May-29 05:33 UTC
Re: [libvirt-users] [Libvirt failed to claim Virtual Functions on hostdev network after VM reboot]
Hi Fuzail, Even there are 8 VFs in total, you only specified 2 in the hostnet network. And connections='2' means the hostnet networks is connected 2 times, so both of the 2 VFs in hostnet are occupied. Please try to define network like this: <network> <name>hostnet</name> <forward mode='passthrough' managed='yes'> <pf dev='ens2'/> </forward> </network> It will include all the 8 VFs from PF ens2. ------- Best Regards, Yalan Zhang IRC: yalzhang On Fri, May 24, 2019 at 6:34 PM Erik Skultety <eskultet@redhat.com> wrote:> On Thu, May 23, 2019 at 10:37:56PM +0530, Fuzail Ahmad wrote: > > Problem Statement: > > > > Libvirt failed to claim Virtual Functions on hostdev network after VM > > reboot. > > > > Version-Release number of selected component (if applicable): > > > > libvirtd (libvirt) 2.0.0 > > I'd just like to point out that 2.0.0 is very old libvirt, even debian 9 > has > 3.0.n, can you verify you're experiencing the same kind of issue with the > current upstream? > > Regards, > Erik > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users >