Greetings Laine, > Sent: Monday, December 10, 2018 at 8:35 PM > From: "Laine Stump" <la...@redhat.com> > To: libvirt-users@redhat.com > Cc: daggs <da...@gmx.com> > Subject: Re: [libvirt-users] unable to add pci network to existing vm > > On 12/10/18 1:24 PM, daggs wrote: > > Greetings, > > > > I'm trying to add a virtual nic to an existing and active vm and I'm > > getting this error: > > error: internal error: No more available PCI slots > > > > the cmd I'm trying to run is: virsh -c qemu:///system attach-interface > > --domain router --type bridge --source virbr0 --model virtio --config --live > > > > the lspci output within the vm is this: > > # lspci > > 00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM > > Controller > > 00:01.0 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI > > Express Root Port 0 (rev 02) > > 00:01.1 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI > > Express Root Port 0 (rev 02) > > 00:01.2 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI > > Express Root Port 0 (rev 02) > > 00:01.3 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI > > Express Root Port 0 (rev 02) > > 00:01.4 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI > > Express Root Port 0 (rev 02) > > 00:01.5 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI > > Express Root Port 0 (rev 02) > > 00:01.6 PCI bridge: Intel Corporation 7500/5520/5500/X58 I/O Hub PCI > > Express Root Port 0 (rev 02) > > You have 7 pcie-root-ports... > > > 00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI > > Controller #1 (rev 03) > > 00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI > > Controller #2 (rev 03) > > 00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI > > Controller #3 (rev 03) > > 00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI > > Controller #1 (rev 03) > > 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92) > > 00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface > > Controller (rev 02) > > 00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 > > port SATA Controller [AHCI mode] (rev 02) > > 00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev > > 02) > > 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) > > I219-V (rev 31) > > 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. > > RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06) > > 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. > > RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06) > > 03:00.0 SCSI storage controller: Red Hat, Inc. Virtio block device (rev 01) > > 04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. > > RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06) > > 05:00.0 Unclassified device [00ff]: Red Hat, Inc. Virtio memory balloon > > (rev 01) > > 06:00.0 Ethernet controller: Red Hat, Inc. Virtio network device (rev 01) > > 07:00.0 Unclassified device [0002]: Red Hat, Inc. Virtio filesystem (rev 01) > > ...and 7 PCIe devices, each taking up one of those root ports. > > On a PCIe-based archicture, you can only hotplug a device into a > pcie-root-port (not into the root bus), but you can't hotplug the > pcie-root-port itself. libvirt knows this, and since your guest is > running and has no unused pcie-root-ports, it can't do the hotplug. > > If you do the attach-interface command with --config *only* (remove the > --live), libvirt will be able to automatically add the pcie-root-port > that it knows is required. Then you'll just need to shutdown and restart > the guest for the device to be added to the running guest instance (a > simple reboot from the guest is insufficient, you need to fully shut it > down, so that a new qemu process is started) > Thanks, that indeed fixed the trick.
Dagg. > > 08:00.0 PCI bridge: Red Hat, Inc. QEMU PCI-PCI bridge > > > > how can I add additional pci entry? I don't mind if I need to edit the xml > > file and restart the vm, I just don't want to cause the vm not to start due > > to bad xml or something. > > > > Thanks, > > > > Dagg. > > > > _______________________________________________ > > libvirt-users mailing list > > libvirt-users@redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-users > > > > _______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users