@@ -10,6 +10,7 @@ import (
1010 "strconv"
1111
1212 runhcsopts "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options"
13+ "github.com/Microsoft/hcsshim/internal/vm/vmutils"
1314 "github.com/Microsoft/hcsshim/pkg/annotations"
1415 "github.com/opencontainers/runtime-spec/specs-go"
1516 "github.com/sirupsen/logrus"
@@ -156,7 +157,7 @@ func handleAnnotationBootFilesPath(ctx context.Context, a map[string]string, lop
156157func handleAnnotationKernelDirectBoot (ctx context.Context , a map [string ]string , lopts * uvm.OptionsLCOW ) {
157158 lopts .KernelDirect = ParseAnnotationsBool (ctx , a , annotations .KernelDirectBoot , lopts .KernelDirect )
158159 if ! lopts .KernelDirect {
159- lopts .KernelFile = uvm .KernelFile
160+ lopts .KernelFile = vmutils .KernelFile
160161 }
161162}
162163
@@ -166,9 +167,9 @@ func handleAnnotationPreferredRootFSType(ctx context.Context, a map[string]strin
166167 lopts .PreferredRootFSType = parseAnnotationsPreferredRootFSType (ctx , a , annotations .PreferredRootFSType , lopts .PreferredRootFSType )
167168 switch lopts .PreferredRootFSType {
168169 case uvm .PreferredRootFSTypeInitRd :
169- lopts .RootFSFile = uvm .InitrdFile
170+ lopts .RootFSFile = vmutils .InitrdFile
170171 case uvm .PreferredRootFSTypeVHD :
171- lopts .RootFSFile = uvm .VhdFile
172+ lopts .RootFSFile = vmutils .VhdFile
172173 }
173174}
174175
@@ -206,7 +207,7 @@ func handleLCOWSecurityPolicy(ctx context.Context, a map[string]string, lopts *u
206207 // VPMem not supported by the enlightened kernel for SNP so set count to zero.
207208 lopts .VPMemDeviceCount = 0
208209 // set the default GuestState filename.
209- lopts .GuestStateFilePath = uvm . GuestStateFile
210+ lopts .GuestStateFilePath = vmutils . DefaultGuestStateFile
210211 lopts .KernelBootOptions = ""
211212 lopts .AllowOvercommit = false
212213 lopts .SecurityPolicyEnabled = true
@@ -219,7 +220,7 @@ func handleLCOWSecurityPolicy(ctx context.Context, a map[string]string, lopts *u
219220 // The default behavior is to use kernel.vmgs and a rootfs-verity.vhd file with Merkle tree appended to ext4 filesystem.
220221 lopts .PreferredRootFSType = uvm .PreferredRootFSTypeNA
221222 lopts .RootFSFile = ""
222- lopts .DmVerityRootFsVhd = uvm .DefaultDmVerityRootfsVhd
223+ lopts .DmVerityRootFsVhd = vmutils .DefaultDmVerityRootfsVhd
223224 lopts .DmVerityMode = true
224225 }
225226
0 commit comments