From e1b4506e26dd587d3e27682560c5a1d68a70c96d Mon Sep 17 00:00:00 2001 From: Maksim An Date: Thu, 26 Sep 2024 09:46:02 -0700 Subject: [PATCH] fix: verity boot overrides SCSI config (#2262) When creating HCS doc for SNP UVM with verity boot, the SCSI controllers are overriden to always have only a single SCSI controller. This limits the max number of container layers to 64. Signed-off-by: Maksim An --- internal/uvm/create_lcow.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/internal/uvm/create_lcow.go b/internal/uvm/create_lcow.go index d100e99d79..dcd830b85c 100644 --- a/internal/uvm/create_lcow.go +++ b/internal/uvm/create_lcow.go @@ -471,16 +471,10 @@ func makeLCOWVMGSDoc(ctx context.Context, opts *OptionsLCOW, uvm *UtilityVM) (_ if opts.DmVerityMode { logrus.Debug("makeLCOWVMGSDoc DmVerityMode true") scsiController0 := guestrequest.ScsiControllerGuids[0] - doc.VirtualMachine.Devices.Scsi = map[string]hcsschema.Scsi{ - scsiController0: { - Attachments: map[string]hcsschema.Attachment{ - "0": { - Type_: "VirtualDisk", - Path: dmVerityRootFsFullPath, - ReadOnly: true, - }, - }, - }, + doc.VirtualMachine.Devices.Scsi[scsiController0].Attachments["0"] = hcsschema.Attachment{ + Type_: "VirtualDisk", + Path: dmVerityRootFsFullPath, + ReadOnly: true, } uvm.reservedSCSISlots = append(uvm.reservedSCSISlots, scsi.Slot{Controller: 0, LUN: 0}) }