Skip to content

Commit 19d3d8f

Browse files
naiming-zededaeriknordmark
authored andcommitted
Fix the issue of eve-k shim/container VMI logging
- add the ttyS0 in kernelArg for kubevirt VMI creation to allow the logging for cotainer Signed-off-by: naiming-zededa <naiming@zededa.com>
1 parent 3d74c16 commit 19d3d8f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/pillar/hypervisor/kubevirt.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,9 @@ func (ctx kubevirtContext) CreateReplicaVMIConfig(domainName string, config type
345345
// The concept is same in kubevirt too. Kubevirt supports this functionality through feature
346346
// https://kubevirt.io/user-guide/virtual_machines/boot_from_external_source/
347347
// Since disks are virtio disks we assume /dev/vda is the boot disk
348-
kernelArgs := "console=tty0 root=/dev/vda dhcp=1 rootfstype=ext4"
348+
// Include both tty0 (video) and ttyS0 (serial) consoles so that logs are captured
349+
// by kubevirt's guest-console-log container
350+
kernelArgs := "console=tty0 console=ttyS0 root=/dev/vda dhcp=1 rootfstype=ext4"
349351
eveRelease, err := os.ReadFile("/run/eve-release")
350352
if err != nil {
351353
return logError("Failed to fetch eve-release %v", err)

0 commit comments

Comments
 (0)