Skip to content

Commit

Permalink
fix: verity boot overrides SCSI config (#2262)
Browse files Browse the repository at this point in the history
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 <maksiman@microsoft.com>
  • Loading branch information
anmaxvl authored Sep 26, 2024
1 parent 16dc8eb commit e1b4506
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions internal/uvm/create_lcow.go
Original file line number Diff line number Diff line change
Expand Up @@ -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})
}
Expand Down

0 comments on commit e1b4506

Please # to comment.