.Hot plugging a Watchdog card to a virtual machine no longer fails
Previously, if no PCI slots were available, adding a Watchdog card to a running virtual machine (VM) failed with the following error:
----
Failed to configure watchdog
ERROR Error attempting device hotplug: internal error: No more available PCI slots
----
With this update, the problem has been fixed and adding a Watchdog card to a running VM now works as expected.
Description of problem:
[Machines] "No more available PCI slots" is shown when adding watchdog to a running vm
Packages:
cockpit-machines-284-1.el9.noarch
cockpit-286-1.el9.x86_64
libvirt-dbus-1.4.1-5.el9.x86_64
libvirt-daemon-9.0.0-7.el9.x86_64
How reproducible:
100%
Steps:
1. Prepare a running VM (Cirros, Fedora, all ok)
2. Enter VM details page, Click "Add" after watchdog in Overview tab
3. On "Add watchdog device type" , choose "Reset", click Add
Failed to configure watchdog
ERROR Error attempting device hotplug: internal error: No more available PCI slots
There is a workaround for above issue, add "pcie-pci-bridge" controller to the xml:
# virsh edit $vm
<controller type='pci' index='17' model='pcie-to-pci-bridge'>
<model name='pcie-pci-bridge'/>
</controller>
Then shutdown the vm, run it again, then repeat step2-3, the watchdog can be attached now.
Check the xml , you can see:
# virsh dumpxml cirros| grep -iA 1 watchdog
<watchdog model='i6300esb' action='reset'>
<alias name='watchdog0'/>
<address type='pci' domain='0x0000' bus='0x0f' slot='0x01' function='0x0'/>
</watchdog>
Actual results:
See step 3.
Expected results:
It should attach successful in step 3 without any extra step working on the xml.
Additional info:
As this bug will absolutely encounterd by customer, please evaluate whether we should get excetpin+ for it, if not, we should at least mark this problem in release document and provide the workaround by editing xml, please also comment your opinion, thanks.
Verified with Packages:
cockpit-machines-290-1.el9.noarch
cockpit-292-1.el9.x86_64
libvirt-dbus-1.4.1-5.el9.x86_64
libvirt-daemon-9.0.0-10.1.el9_2.x86_64
Steps:
1. Prepare a running VM (Cirros, Fedora, all ok)
2. Enter VM details page, Click "Add" after watchdog in Overview tab
3. On "Add watchdog device type" , choose "Reset", click Add
It's successfully added to the vm. So verified.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (cockpit-machines bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2023:6336
Comment 27Red Hat Bugzilla
2024-03-08 04:25:24 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days
Description of problem: [Machines] "No more available PCI slots" is shown when adding watchdog to a running vm Packages: cockpit-machines-284-1.el9.noarch cockpit-286-1.el9.x86_64 libvirt-dbus-1.4.1-5.el9.x86_64 libvirt-daemon-9.0.0-7.el9.x86_64 How reproducible: 100% Steps: 1. Prepare a running VM (Cirros, Fedora, all ok) 2. Enter VM details page, Click "Add" after watchdog in Overview tab 3. On "Add watchdog device type" , choose "Reset", click Add Failed to configure watchdog ERROR Error attempting device hotplug: internal error: No more available PCI slots There is a workaround for above issue, add "pcie-pci-bridge" controller to the xml: # virsh edit $vm <controller type='pci' index='17' model='pcie-to-pci-bridge'> <model name='pcie-pci-bridge'/> </controller> Then shutdown the vm, run it again, then repeat step2-3, the watchdog can be attached now. Check the xml , you can see: # virsh dumpxml cirros| grep -iA 1 watchdog <watchdog model='i6300esb' action='reset'> <alias name='watchdog0'/> <address type='pci' domain='0x0000' bus='0x0f' slot='0x01' function='0x0'/> </watchdog> Actual results: See step 3. Expected results: It should attach successful in step 3 without any extra step working on the xml. Additional info: As this bug will absolutely encounterd by customer, please evaluate whether we should get excetpin+ for it, if not, we should at least mark this problem in release document and provide the workaround by editing xml, please also comment your opinion, thanks.