Skip to content

Commit d990cec

Browse files
authored
Merge pull request #1545 from balajiv113/vz-version-check
vz: validate required version before hostagent start
2 parents a929372 + 12efb82 commit d990cec

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)