- Package:
- libvirt-daemon
- Source:
- libvirt-daemon
- Description:
- Virtualization daemon
- Submitter:
- Trupti
- Date:
- 2025-07-17 13:21:01 UTC
- Severity:
- normal
- Tags:
Version Info:
Host/Guest OS: Debian Trixie/sid (powerpc64le)
Kernel: 6.12.27-powerpc64le-64k
QEMU: 10.0.0
Libvirt: 11.3.0
Issue:
Live-attaching or detaching a device with virsh on a Debian Trixie
(ppc64le) guest does not take effect immediately. While the host command
succeeds, the guest OS only recognizes the change after a full reboot.
This defeats the purpose of the hotplug feature.
Steps to reproduce:
1) Start a guest with Debian-Trixie OS same as Host
2) Attach an interface to guest using below virsh attach-device command
'virsh attach-interface --live vm bridge --source virbr0'
3) The command executes successfully and give output as "Interface
attached successfully"
4) But the interface is not immediately attached to guest. When the
guest is rebooted , then the
interface is seen on the guest.
5) Same is happening with virsh detach-interface command. A guest reboot
is required to remove
the interface from guest
Thanks Trupti
What's the output of attach-interface if you pass the --print-xml flag to it? What does the full live XML look like before and after the operation? Honestly this sounds like a guest OS issue rather than a bug in libvirt. Is any message produced in dmesg/journal as a consequence of the hotplug operation?
I have gathered the diagnostic information you requested.
virsh attach-interface --live vm bridge --source virbr0 --print-xml
The command produced the following output:
<interface type='bridge'>
<source bridge='virbr0'/>
</interface>
I have attached the two files, before.xml and after.xml.
The guest dmesg shows the RTAS hot-plug signal, but no further messages
appear.
Thanks Trupti
Checking the difference between the two:
$ diff -Naru before.xml after.xml
--- before.xml 2025-06-10 20:32:21.630608513 +0200
+++ after.xml 2025-06-10 20:32:02.658407208 +0200
@@ -60,6 +60,14 @@
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</interface>
+ <interface type='bridge'>
+ <mac address='52:54:00:a2:19:7a'/>
+ <source bridge='virbr0'/>
+ <target dev='vnet3'/>
+ <model type='rtl8139'/>
+ <alias name='net1'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ </interface>
<serial type='pty'>
<source path='/dev/pts/1'/>
<target type='spapr-vio-serial' port='0'>
That rtl8139 model doesn't seem right for a ppc64le guest. Try
passing
performed the hotplug, the OS detected that happening, then something
went wrong. Probably the ppc64le OS simply doesn't come with the
driver for the rtl8139 network device.
Hello, I have a key update from further testing. Libvirt appears to be working correctly, as the VM's live XML is updated immediately after an attach-interface command. The main finding comes from the guest kernel log. It reveals that both attach-interface and detach-interface cause the guest to receive the exact same signal: RTAS Hotplug Event (229). Receiving the same signal for both adding and removing a device is the probable cause of the hotplug failure. Thanks Trupti.
More evidence that the issue is on the guest OS side, not the libvirt side. I'm strongly inclined to close this bug at this point. Let me know if you disagree, otherwise I'll go ahead. Did you try using the virtio model? You didn't clarify whether this additional testing is still happening with rtl8139, which I wouldn't necessarily expect to work correctly for ppc64le.
Thank you for your observations. You were absolutely right in suggesting earlier that the issue could be on the guest OS side. Based on internal discussions and validation across various distributions with similar configurations, I can confirm that the root cause lies in the guest kernel and not in libvirt. Specifically, the guest kernel was expecting the device tree property ibm,drc-info for PCI hotplug support, but in this case, only the older property ibm,drc-indexes was present. Since ibm,drc-info was missing, the kernel failed to handle the hotplug operation correctly. This upstream patch fixes the issue by allowing the kernel to use ibm,drc-indexes when ibm,drc-info is not found: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next&id=41a1452759a8b1121df9cf7310acf31d766ba70b I’ll loop in the Debian kernel team to check if this patch can be considered for inclusion in the Trixie kernel. I’ll also test the patch and share results once available. I’ll also validate the virtio model setup and update accordingly. Thanks, Trupti.
Send it to stable@ please. Bastian
Okay Sure! Thanks, Trupti