-
Notifications
You must be signed in to change notification settings - Fork 276
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
feat(xo-server): set new XAPI platform flag for nested virtualization #8395
base: master
Are you sure you want to change the base?
Conversation
expNestedHvm: semver.satisfies(obj.hardware_platform_version, '>=3.4') | ||
? obj.platform['nested-virt'] === 'true' | ||
: obj.platform['exp-nested-hvm'] === true, |
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.
IMHO, expNestedHvm
should only return obj.platform['exp-nested-hvm'] === ' true''
to be consistent with the XAPI and be flagged as deprecated
with a small comment above explaining why, and what to use instead.
And maybe expose one property like:
isNestedVirtEnable: (isXcp83OrHigher && platformVersion >= 3.4 ? obj.platform['nested-virt'] : obj.platform['exp-nested-hvm']) === 'true'
If you follow my suggestion, you should update the BaseXoVm
type in @vates/types/xo.mts
to add the new property and flag expNestedHvm
as deprecated
set: (expNestedHvm, vm) => { | ||
const platformVersion = semver.satisfies(vm.hardware_platform_version, '>=3.4') | ||
? 'nested-virt' | ||
: 'exp-nested-hvm' | ||
vm.update_platform(platformVersion, expNestedHvm ? 'true' : null) | ||
}, |
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.
Same here, I found that weird having a set expNestedHvm
that in reality will updated nested-virt
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.
would it be ok to update both ?
also this could help handling VM that are migrated from 8.2 to 8.3 hosts
@@ -491,7 +492,12 @@ const methods = { | |||
hasVendorDevice: true, | |||
|
|||
expNestedHvm: { | |||
set: (expNestedHvm, vm) => vm.update_platform('exp-nested-hvm', expNestedHvm ? 'true' : null), | |||
set: (expNestedHvm, vm) => { | |||
const platformVersion = semver.satisfies(vm.hardware_platform_version, '>=3.4') |
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.
can platform_version
be >= 3.4
in case of XCP-ng 8.2
?
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.
No it will always be 3.2.1
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.
3.4 is only XCP-ng 8.3 and XS 8.4
- [VM] Updated Nested Virtualization handling to use `platform:nested-virt` for XCP-ng 8.3+ (PR [#8395](https://github.com/vatesfr/xen-orchestra/pull/8395)) | ||
|
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.
This is not really user-oriented, but I don't have a better suggestion.
Maybe you can ask the XCP team what the advantage of using nested-virt
is, and for example in the changelog:
use platform:nested-virt to determine if nested virtualization is enabled, because ...
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.
Nested virt has never supported by XCP-ng but it kinda worked until 8.3 where some stuff in Xen broke it.
Some changes were made to gt it back to where it were before - some not supported but kinda working and considered experimental.
So for the phrasing I'd say "add back nested virt experimental features for XCP-ng >=8.3" or something like that.
Bear in mind the fix is not yet available for users though so we might want to sync for the release.
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.
would it be ok to update both value on edit and only read the right value for the host handling the VM when checking it ?
this could help handling VM that are migrated from 8.2 to 8.3 hosts
or does the VM with the old flags need to add the new flag to handle the (future) nested virtualization ? ( @benjamreis )
I'm not sure - ping @ydirson @stormi . |
I do think the easy way is to set both flags unconditionally until 8.2 gets out of support, but concern was voiced that it would make the old flag live for too long (potentially forever). |
Description
Short explanation of this PR (feel free to re-use commit message)
Checklist
Fixes #007
,See xoa-support#42
,See https://...
)Introduced by
CHANGELOG.unreleased.md
Review process
Notes: