microsoft / hcsshim

Windows - Host Compute Service Shim
MIT License
576 stars 259 forks source link

fix: use block device mount to format scratch #2215

Closed anmaxvl closed 3 months ago

anmaxvl commented 3 months ago

By default, create LCOW will set the number of SCSI controllers to 4, when VPMem isn't used, which is the case when formatting scratch. This makes the device path lookup non-determenistic, since the SCSI controllers in the guest may have different indices.

To workaround that, use a block device mount and use the mount-path to format the scratch VHDX without needing to lookup the actual dev node path.