mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-03 02:26:37 +00:00
qemu: Pass sandboxID to agent for logging purposes
Add a kernel command-line option that the agent can read to determine the sandbox ID of the VM. It can use this to create a `sandbox=` log field for improved log analysis. Fixes #465. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
bf1cf684f5
commit
793a22083c
@ -297,10 +297,14 @@ func (q *qemu) createSandbox(sandboxConfig SandboxConfig) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Pass the sandbox name to the agent via the kernel command-line to
|
||||
// allow the agent to use it in log messages.
|
||||
params := q.kernelParameters() + " " + "agent.sandbox=" + sandboxConfig.ID
|
||||
|
||||
kernel := govmmQemu.Kernel{
|
||||
Path: kernelPath,
|
||||
InitrdPath: initrdPath,
|
||||
Params: q.kernelParameters(),
|
||||
Params: params,
|
||||
}
|
||||
|
||||
rtc := govmmQemu.RTC{
|
||||
|
Loading…
Reference in New Issue
Block a user