diff --git a/src/runtime/virtcontainers/clh.go b/src/runtime/virtcontainers/clh.go index 630054f85..50f34892d 100644 --- a/src/runtime/virtcontainers/clh.go +++ b/src/runtime/virtcontainers/clh.go @@ -286,11 +286,12 @@ func (clh *cloudHypervisor) createSandbox(ctx context.Context, id string, networ clh.vmconfig.Pmem = &[]chclient.PmemConfig{*pmem} } - // set the serial console to the cloud hypervisor + // Use serial port as the guest console only in debug mode, + // so that we can gather early OS booting log if clh.config.Debug { clh.vmconfig.Serial = chclient.NewConsoleConfig(cctTTY) } else { - clh.vmconfig.Serial = chclient.NewConsoleConfig(cctNULL) + clh.vmconfig.Serial = chclient.NewConsoleConfig(cctOFF) } clh.vmconfig.Console = chclient.NewConsoleConfig(cctOFF) @@ -967,9 +968,8 @@ func (clh *cloudHypervisor) launchClh() (int, error) { //########################################################################### const ( - cctOFF string = "Off" - cctNULL string = "Null" - cctTTY string = "Tty" + cctOFF string = "Off" + cctTTY string = "Tty" ) const (