Skip to content

machine: enable nested virt on libkrun by default #25922

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
7 changes: 7 additions & 0 deletions pkg/machine/apple/apple.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@ func StartGenericAppleVM(mc *vmconfigs.MachineConfig, cmdBinary string, bootload
cmd.Args = append(cmd.Args, "--gui") // add command line switch to pop the gui open
}

if mc.LibKrunHypervisor != nil {
// Nested Virtualization requires an M3 chip or newer, and to be running
// macOS 15+. If those requirements are not met, then krunkit will ignore the
// argument and keep Nested Virtualization disabled.
cmd.Args = append(cmd.Args, "--nested")
}

if mc.IsFirstBoot() {
// If this is the first boot of the vm, we need to add the vsock
// device to vfkit so we can inject the ignition file
Expand Down