-
Notifications
You must be signed in to change notification settings - Fork 122
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
Nested virtualization with Linux VM #933
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any objections to just enable it by default if it's supported? Can't think of any drawback.
Any objection 👍🏻 I'll do it. |
Thank you! You contribution is much appreciated as we still on M1/M2 and just getting to order M4 Minis. :-) |
My M4 pro incoming the 8th november hopping it is more veloce than my MacBook M3 pro compared against MacMini M2 pro. |
func platform(nvramURL: URL, enableNestedVirtualization: Bool) throws -> VZPlatformConfiguration { | ||
let result: VZGenericPlatformConfiguration = VZGenericPlatformConfiguration() | ||
|
||
if #available(macOS 15.0, *) { | ||
if VZGenericPlatformConfiguration.isNestedVirtualizationSupported { | ||
result.isNestedVirtualizationEnabled = enableNestedVirtualization | ||
} | ||
} | ||
|
||
return result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems enableNestedVirtualization
is not used here and I think we can revert the rest of the changes in other files and just enable virtualization if possible.
func platform(nvramURL: URL, enableNestedVirtualization: Bool) throws -> VZPlatformConfiguration { | |
let result: VZGenericPlatformConfiguration = VZGenericPlatformConfiguration() | |
if #available(macOS 15.0, *) { | |
if VZGenericPlatformConfiguration.isNestedVirtualizationSupported { | |
result.isNestedVirtualizationEnabled = enableNestedVirtualization | |
} | |
} | |
return result | |
func platform(nvramURL: URL) throws -> VZPlatformConfiguration { | |
let result: VZGenericPlatformConfiguration = VZGenericPlatformConfiguration() | |
if #available(macOS 15.0, *) { | |
if VZGenericPlatformConfiguration.isNestedVirtualizationSupported { | |
result.isNestedVirtualizationEnabled = enableNestedVirtualization | |
} | |
} | |
return result |
What do you think? Can do it in this PR or if it's more convenient in a separate one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point of view is: nested virtualization must be an user option.
lima tool do it as user option. Probably some users don't want allow the ability to create VM inside a VM in their work.
Also when nested virtualization is active extras kernel modules are load using extras memory and bandwith in IO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point of view is: nested virtualization must be an user option.
What do you think about a --nested
option to tart run
then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about a
--nested
option totart run
then?
I agree it was my initial pull request 👍🏻
The object of this pull request is to support nested virtualization on Linux VM machines created with tart.
The nested virtualization is permitted only if:
Asking nested virtualization on unsupported will throw an error.
In the pull request it's also changed cpuCountMin=1 and memorySizeMin=512Mb for reasonable size for Linux VM.