From cec2b0df57b633581ec98d17b6342e30faad590a Mon Sep 17 00:00:00 2001 From: "Justin Terry (VM)" Date: Thu, 29 Nov 2018 10:43:28 -0800 Subject: [PATCH] Moving uart kernel config to ComPort creation Signed-off-by: Justin Terry (VM) --- internal/uvm/create.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 != "" {