-
Notifications
You must be signed in to change notification settings - Fork 90
hvf: Add API to verify Nested Virt is supported #320
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
base: main
Are you sure you want to change the base?
Conversation
Related to comments in containers/podman#25922 |
On the krunkit side, my thought was we could allow the user to still do |
0c582d5
to
cc35fce
Compare
If it's not supported, couldn't we just have |
That was the original behavior. At this moment, if the user wants to enable nested virt, they either have to already know the requirements for the feature and do some system queries, or they have to try and call For consumers of krunkit, like Podman, having the command fail is not a graceful way to handle the issue. It's also not ideal UX to have each consumer do the same manual checks when we can provide it for them. |
Your stated use-case in krunkit (the main consumer of this API):
What is the difference between |
We can define this failure as its own error code and have krunkit wrap/handle it accordingly for podman. |
Add an API to check if the current system supports Nested Virt on macOS. Signed-off-by: Jake Correnti <[email protected]>
cc35fce
to
aa00caf
Compare
In this scenario, you're right and the outcome would be the same. In the grand scheme of things, in my opinion, checking if nested virt is supported and enabling nested virt should be two separate operations. I don't want this to be a controversial change, so if it's best to go about this a different way so everyone's happy I can do that. |
I think the check itself is fine. I'm just not convinced it warrants its own krun API, when I try to avoid adding new krun APIs unless absolutely necessary though. Perhaps @slp has different thoughts? |
But every time you check for nested virt and it is supported, you would then enable, correct? This suggests to me it can be one operation. |
I don't have a strong opinion either way, but for me having this API seems fine (and doesn't seem hard to maintain). But yes, you can get by without having this API. This would perhaps be useful if you are creating a VM configuration to save to a file using some sort of CLI, but not starting it the VM yet - you can tell the user nested virt is not supported on their system. |
Add an API to check if the current system supports Nested Virt on macOS.