mirror of
https://github.com/containers/podman.git
synced 2025-10-13 09:15:20 +08:00
machine: enable nested virt on libkrun by default
With the recent release of krunkit 0.2.0, a CLI option was added to enable nested virtualization on macOS hosts with an M3 or higher. Enable this by default. If the host does not support this feature, krunkit will ignore the argument and continue starting the VM. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user