On 10/6/25 17:18, Stefan Kober wrote:
On-behalf-of: SAP stefan.kober@sap.com Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de> --- src/ch/ch_hotplug.c | 10 +++ src/ch/ch_monitor.c | 5 +- src/ch/ch_monitor.h | 1 - src/ch/ch_process.c | 163 +++++++++++++++++++++++++------------------- src/ch/ch_process.h | 8 +++ 5 files changed, 111 insertions(+), 76 deletions(-)
diff --git a/src/ch/ch_hotplug.c b/src/ch/ch_hotplug.c index 902eab839b..25058e08f3 100644 --- a/src/ch/ch_hotplug.c +++ b/src/ch/ch_hotplug.c @@ -75,6 +75,16 @@ chDomainAttachDeviceLive(virCHDriver *driver, break;
case VIR_DOMAIN_DEVICE_NET: + if (chProcessAddNetworkDevice(driver, mon, vm->def, dev->data.net, + NULL, NULL) < 0) { + break; + } + + virDomainNetInsert(vm->def, dev->data.net); +
Here, we need: alias = dev->data.net->info.alias; so that the code later in this function emits an event that the device was attached.
+ dev->data.net = NULL; + ret = 0; + break; case VIR_DOMAIN_DEVICE_LEASE: case VIR_DOMAIN_DEVICE_FS: case VIR_DOMAIN_DEVICE_INPUT:
Michal