Skip to content

vz: Intel Mac: warn if macOS < 15.5 #3537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions pkg/vz/vz_driver_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ import (
"fmt"
"net"
"path/filepath"
"runtime"
"time"

"github.com/Code-Hex/vz/v3"
"github.com/coreos/go-semver/semver"

"github.com/sirupsen/logrus"

"github.com/lima-vm/lima/pkg/driver"
"github.com/lima-vm/lima/pkg/limayaml"
"github.com/lima-vm/lima/pkg/osutil"
"github.com/lima-vm/lima/pkg/reflectutil"
)

Expand Down Expand Up @@ -80,11 +83,18 @@ func New(driver *driver.BaseDriver) *LimaVzDriver {
}

func (l *LimaVzDriver) Validate() error {
// Calling NewEFIBootLoader to do required version check for latest APIs
_, err := vz.NewEFIBootLoader()
if errors.Is(err, vz.ErrUnsupportedOSVersion) {
macOSProductVersion, err := osutil.ProductVersion()
if err != nil {
return err
}
if macOSProductVersion.LessThan(*semver.New("13.0.0")) {
return errors.New("VZ driver requires macOS 13 or higher to run")
}
if runtime.GOARCH == "amd64" && macOSProductVersion.LessThan(*semver.New("15.5.0")) {
logrus.Warnf("vmType %s: On Intel Mac, macOS 15.5 or later is required to run Linux 6.12 or later. "+
"Update macOS, or change vmType to \"qemu\" if the VM does not start up. (https://github.com/lima-vm/lima/issues/3334)",
*l.Instance.Config.VMType)
}
if *l.Instance.Config.MountType == limayaml.NINEP {
return fmt.Errorf("field `mountType` must be %q or %q for VZ driver , got %q", limayaml.REVSSHFS, limayaml.VIRTIOFS, *l.Instance.Config.MountType)
}
Expand Down
2 changes: 1 addition & 1 deletion templates/_images/fedora-42.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ images:
arch: riscv64
digest: sha256:537c67710f4f1c9112fecaafafc293b649acd1d35b46619b97b5a5a0132241b0

# # NOTE: Intel Mac requires setting vmType to qemu
# # NOTE: Intel Mac with macOS prior to 15.5 requires setting vmType to qemu
# # https://github.com/lima-vm/lima/issues/3334
# vmType: qemu
2 changes: 1 addition & 1 deletion templates/_images/ubuntu-25.04.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ images:
- location: https://cloud-images.ubuntu.com/releases/plucky/release/ubuntu-25.04-server-cloudimg-ppc64el.img
arch: ppc64le

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