From a6f8e6336b62249cbd3d712e8ffc69a7ea018dd4 Mon Sep 17 00:00:00 2001 From: Benjamin Somers Date: Thu, 31 Oct 2024 13:32:05 +0000 Subject: [PATCH] incusd/instance/qemu: Log QEMU command line Signed-off-by: Benjamin Somers --- internal/server/instance/drivers/driver_qemu.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/server/instance/drivers/driver_qemu.go b/internal/server/instance/drivers/driver_qemu.go index f424d876b36..cc7fbb4ea62 100644 --- a/internal/server/instance/drivers/driver_qemu.go +++ b/internal/server/instance/drivers/driver_qemu.go @@ -1699,8 +1699,12 @@ func (d *qemu) start(stateful bool, op *operationlock.InstanceOperation) error { forkLimitsCmd = append(forkLimitsCmd, fmt.Sprintf("fd=%d", 3+i)) } + // Log the QEMU command line. + fullCmd := append(forkLimitsCmd, qemuCmd...) + d.logger.Debug("Starting QEMU", logger.Ctx{"command": fullCmd}) + // Setup background process. - p, err := subprocess.NewProcess(d.state.OS.ExecPath, append(forkLimitsCmd, qemuCmd...), d.EarlyLogFilePath(), d.EarlyLogFilePath()) + p, err := subprocess.NewProcess(d.state.OS.ExecPath, fullCmd, d.EarlyLogFilePath(), d.EarlyLogFilePath()) if err != nil { op.Done(err) return err