@@ -10,6 +10,7 @@ import (
1010 "net"
1111 "os"
1212 "path/filepath"
13+ "runtime"
1314 "strings"
1415
1516 "github.com/Microsoft/go-winio"
@@ -113,6 +114,11 @@ type OptionsLCOW struct {
113114func NewDefaultOptionsLCOW (id , owner string ) * OptionsLCOW {
114115 // Use KernelDirect boot by default on all builds that support it.
115116 kernelDirectSupported := osversion .Build () >= 18286
117+ var vPmemCount uint32 = vmutils .DefaultVPMEMCount
118+ if runtime .GOARCH == "arm64" {
119+ kernelDirectSupported = false
120+ vPmemCount = 0
121+ }
116122 opts := & OptionsLCOW {
117123 Options : newDefaultOptions (id , owner ),
118124 KernelFile : vmutils .KernelFile ,
@@ -124,7 +130,7 @@ func NewDefaultOptionsLCOW(id, owner string) *OptionsLCOW {
124130 ForwardStdout : false ,
125131 ForwardStderr : true ,
126132 OutputHandlerCreator : vmutils .ParseGCSLogrus ,
127- VPMemDeviceCount : vmutils . DefaultVPMEMCount ,
133+ VPMemDeviceCount : vPmemCount ,
128134 VPMemSizeBytes : vmutils .DefaultVPMemSizeBytes ,
129135 VPMemNoMultiMapping : osversion .Get ().Build < osversion .V19H1 ,
130136 PreferredRootFSType : PreferredRootFSTypeInitRd ,
@@ -775,14 +781,20 @@ func MakeLCOWDoc(ctx context.Context, opts *OptionsLCOW, uvm *UtilityVM) (_ *hcs
775781 vmDebugging := false
776782 if opts .ConsolePipe != "" {
777783 vmDebugging = true
778- kernelArgs += " 8250_core.nr_uarts=1 8250_core.skip_txen_test=1 console=ttyS0,115200"
784+ if runtime .GOARCH == "arm64" {
785+ kernelArgs += " console=ttyAMA0,115200"
786+ } else {
787+ kernelArgs += " 8250_core.nr_uarts=1 8250_core.skip_txen_test=1 console=ttyS0,115200"
788+ }
779789 doc .VirtualMachine .Devices .ComPorts = map [string ]hcsschema.ComPort {
780790 "0" : { // Which is actually COM1
781791 NamedPipe : opts .ConsolePipe ,
782792 },
783793 }
784794 } else {
785- kernelArgs += " 8250_core.nr_uarts=0"
795+ if runtime .GOARCH != "arm64" {
796+ kernelArgs += " 8250_core.nr_uarts=0"
797+ }
786798 }
787799
788800 if opts .EnableGraphicsConsole {
@@ -803,7 +815,7 @@ func MakeLCOWDoc(ctx context.Context, opts *OptionsLCOW, uvm *UtilityVM) (_ *hcs
803815 kernelArgs += " " + opts .KernelBootOptions
804816 }
805817
806- if ! opts .VPCIEnabled {
818+ if runtime . GOARCH != "arm64" && ! opts .VPCIEnabled {
807819 kernelArgs += ` pci=off`
808820 }
809821
0 commit comments