✨ Backfill ExtraConfig and NIC device properties from VM hardware during schema upgrade#1589
Open
hpannem wants to merge 10 commits into
Open
✨ Backfill ExtraConfig and NIC device properties from VM hardware during schema upgrade#1589hpannem wants to merge 10 commits into
hpannem wants to merge 10 commits into
Conversation
bryanv
reviewed
May 7, 2026
bb86b4c to
bf8511f
Compare
bryanv
reviewed
May 8, 2026
| // | ||
| // Bool decoding accepts "TRUE"/"FALSE" and "1"/"0" (case-insensitive). | ||
| // []int32 is decoded from a comma-separated list of decimal integers. | ||
| // []string-based slices are stored as a single-element slice containing raw. |
Contributor
There was a problem hiding this comment.
How strong is the vmx contract for the value of these fields? Like "true" or empty is never, ever allowed? For an imported VM I wouldn't want us to get stuck here for what we consider an invalid value.
Contributor
Author
There was a problem hiding this comment.
This needs a discussion. @bryanv I will talk to you offline.
Minimum allowed line rate is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do, and why is it needed?
During schema upgrade, populate the following spec fields from the live vSphere VM configuration so the spec reflects the VM's actual state:
spec.advanced.*vmx-tagged first-class fields frommoVM.Config.ExtraConfigspec.network.interfaces[i].vmxnet3.*frommoVM.Config.ExtraConfig(using device-key-derivedethernetXindex, not spec position)spec.network.interfaces[i].vNUMANodeIDfromVirtualDevice.NumaNodespec.network.interfaces[i].vmxnet3.UPTv2EnabledfromVirtualVmxnet3.Uptv2EnabledAdds
EthernetDeviceKeyBaseandEthernetExtraConfigPrefixtopkg/util/vmopv1to centralise thedeviceKey - 4000→ethernetX.mapping.Adds
validateAdvancedVMXFieldsNotChangedandvalidateNICBackfilledFieldsNotChangedtovalidateFieldsDuringSchemaUpgradeto prevent users from modifying backfilled fields before schema upgrade completes.Which issue(s) is/are addressed by this PR?
Fixes #
Are there any special notes for your reviewer:
FillEmptyNetworkInterfaceTypesFromMoVM). A proper device-to-spec matching is a follow-up.Please add a release note if necessary: