From 2aa523f08a2f65c3b3a100c0eaa06e58294b9ea3 Mon Sep 17 00:00:00 2001 From: Jakob Naucke Date: Thu, 30 Jan 2025 16:59:12 +0100 Subject: [PATCH] virtcontainers: Fix virtio-net-ccw address format Hex device number was formatted as hex twice, thus encoding the string as hex. Signed-off-by: Jakob Naucke --- src/runtime/virtcontainers/qemu.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/virtcontainers/qemu.go b/src/runtime/virtcontainers/qemu.go index 73b6df2e49..6fd6296ce7 100644 --- a/src/runtime/virtcontainers/qemu.go +++ b/src/runtime/virtcontainers/qemu.go @@ -1959,7 +1959,7 @@ func (q *qemu) hotplugNetDevice(ctx context.Context, endpoint Endpoint, op Opera return err } if machine.Type == QemuCCWVirtio { - devNoHotplug := fmt.Sprintf("fe.%x.%x", bridge.Addr, addr) + devNoHotplug := fmt.Sprintf("fe.%x.%v", bridge.Addr, addr) return q.qmpMonitorCh.qmp.ExecuteNetCCWDeviceAdd(q.qmpMonitorCh.ctx, tap.Name, devID, endpoint.HardwareAddr(), devNoHotplug, int(q.config.NumVCPUs())) } return q.qmpMonitorCh.qmp.ExecuteNetPCIDeviceAdd(q.qmpMonitorCh.ctx, tap.Name, devID, endpoint.HardwareAddr(), addr, bridge.ID, romFile, int(q.config.NumVCPUs()), defaultDisableModern)