Skip to content

Commit 353be89

Browse files
authored
Merge pull request #3537 from AkihiroSuda/update-3334
vz: Intel Mac: warn if macOS < 15.5
2 parents 3014d01 + bd5ca7b commit 353be89

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

pkg/vz/vz_driver_darwin.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ import (
1111
"fmt"
1212
"net"
1313
"path/filepath"
14+
"runtime"
1415
"time"
1516

1617
"github.com/Code-Hex/vz/v3"
18+
"github.com/coreos/go-semver/semver"
1719

1820
"github.com/sirupsen/logrus"
1921

2022
"github.com/lima-vm/lima/pkg/driver"
2123
"github.com/lima-vm/lima/pkg/limayaml"
24+
"github.com/lima-vm/lima/pkg/osutil"
2225
"github.com/lima-vm/lima/pkg/reflectutil"
2326
)
2427

@@ -80,11 +83,18 @@ func New(driver *driver.BaseDriver) *LimaVzDriver {
8083
}
8184

8285
func (l *LimaVzDriver) Validate() error {
83-
// Calling NewEFIBootLoader to do required version check for latest APIs
84-
_, err := vz.NewEFIBootLoader()
85-
if errors.Is(err, vz.ErrUnsupportedOSVersion) {
86+
macOSProductVersion, err := osutil.ProductVersion()
87+
if err != nil {
88+
return err
89+
}
90+
if macOSProductVersion.LessThan(*semver.New("13.0.0")) {
8691
return errors.New("VZ driver requires macOS 13 or higher to run")
8792
}
93+
if runtime.GOARCH == "amd64" && macOSProductVersion.LessThan(*semver.New("15.5.0")) {
94+
logrus.Warnf("vmType %s: On Intel Mac, macOS 15.5 or later is required to run Linux 6.12 or later. "+
95+
"Update macOS, or change vmType to \"qemu\" if the VM does not start up. (https://github.com/lima-vm/lima/issues/3334)",
96+
*l.Instance.Config.VMType)
97+
}
8898
if *l.Instance.Config.MountType == limayaml.NINEP {
8999
return fmt.Errorf("field `mountType` must be %q or %q for VZ driver , got %q", limayaml.REVSSHFS, limayaml.VIRTIOFS, *l.Instance.Config.MountType)
90100
}

templates/_images/fedora-42.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ images:
1111
arch: riscv64
1212
digest: sha256:537c67710f4f1c9112fecaafafc293b649acd1d35b46619b97b5a5a0132241b0
1313

14-
# # NOTE: Intel Mac requires setting vmType to qemu
14+
# # NOTE: Intel Mac with macOS prior to 15.5 requires setting vmType to qemu
1515
# # https://github.com/lima-vm/lima/issues/3334
1616
# vmType: qemu

templates/_images/ubuntu-25.04.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ images:
4141
- location: https://cloud-images.ubuntu.com/releases/plucky/release/ubuntu-25.04-server-cloudimg-ppc64el.img
4242
arch: ppc64le
4343

44-
# # NOTE: Intel Mac requires setting vmType to qemu
44+
# # NOTE: Intel Mac with macOS prior to 15.5 requires setting vmType to qemu
4545
# # https://github.com/lima-vm/lima/issues/3334
4646
# vmType: qemu

0 commit comments

Comments
 (0)