Skip to content

Commit e7c9e65

Browse files
committed
Attach EFI VHD as read-only
Signed-off-by: Amit Barve <ambarve@microsoft.com>
1 parent 0dae66c commit e7c9e65

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/uvm/create_wcow.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,9 @@ func prepareSecurityConfigDoc(ctx context.Context, uvm *UtilityVM, opts *Options
414414
Type_: "VirtualDisk",
415415
}
416416
doc.VirtualMachine.Devices.Scsi[guestrequest.ScsiControllerGuids[0]].Attachments["1"] = hcsschema.Attachment{
417-
Path: opts.BootFiles.BlockCIMFiles.EFIVHDPath,
418-
Type_: "VirtualDisk",
417+
Path: opts.BootFiles.BlockCIMFiles.EFIVHDPath,
418+
Type_: "VirtualDisk",
419+
ReadOnly: true,
419420
}
420421
doc.VirtualMachine.Devices.Scsi[guestrequest.ScsiControllerGuids[0]].Attachments["2"] = hcsschema.Attachment{
421422
Path: opts.BootFiles.BlockCIMFiles.BootCIMVHDPath,

0 commit comments

Comments
 (0)