diff --git a/internal/uvm/create.go b/internal/uvm/create.go index 25e7bd6ffb..858398414a 100644 --- a/internal/uvm/create.go +++ b/internal/uvm/create.go @@ -378,12 +378,14 @@ func Create(opts *UVMOptions) (_ *UtilityVM, err error) { if opts.ConsolePipe != "" { vmDebugging = true - kernelArgs += " console=ttyS0,115200" + kernelArgs += " 8250_core.nr_uarts=1 8250_core.skip_txen_test=1 console=ttyS0,115200" vm.Devices.ComPorts = map[string]hcsschema.ComPort{ "0": { // Which is actually COM1 NamedPipe: opts.ConsolePipe, }, } + } else { + kernelArgs += " 8250_core.nr_uarts=0" } if opts.EnableGraphicsConsole { @@ -394,11 +396,9 @@ func Create(opts *UVMOptions) (_ *UtilityVM, err error) { vm.Devices.VideoMonitor = &hcsschema.VideoMonitor{} } - if vmDebugging { - kernelArgs += " 8250_core.nr_uarts=1 8250_core.skip_txen_test=1" - } else { + if !vmDebugging { // Terminate the VM if there is a kernel panic. - kernelArgs += " panic=-1 8250_core.nr_uarts=0 quiet" + kernelArgs += " panic=-1 quiet" } if opts.KernelBootOptions != "" {