Skip to content

Commit 12efb82

Browse files
committed
vz: validate required version before start
Signed-off-by: Balaji Vijayakumar <[email protected]>
1 parent beeaea5 commit 12efb82

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/vz/vz_driver_darwin.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ func New(driver *driver.BaseDriver) *LimaVzDriver {
3636
}
3737

3838
func (l *LimaVzDriver) Validate() error {
39+
//Calling NewEFIBootLoader to do required version check for latest APIs
40+
_, err := vz.NewEFIBootLoader()
41+
if errors.Is(err, vz.ErrUnsupportedOSVersion) {
42+
return fmt.Errorf("VZ driver requires macOS 13 or higher to run")
43+
}
3944
if *l.Yaml.MountType == limayaml.NINEP {
4045
return fmt.Errorf("field `mountType` must be %q or %q for VZ driver , got %q", limayaml.REVSSHFS, limayaml.VIRTIOFS, *l.Yaml.MountType)
4146
}

0 commit comments

Comments
 (0)