Skip to content

api: Update ofvEnvelop.ToConfigSpec and configInfo.ToConfigSpec to handle nil ovfProperty userConfigurable#3911

Merged
akutz merged 1 commit intovmware:mainfrom
abaruni:toConfigSpec-explicit-userConfig
Nov 25, 2025
Merged

api: Update ofvEnvelop.ToConfigSpec and configInfo.ToConfigSpec to handle nil ovfProperty userConfigurable#3911
akutz merged 1 commit intovmware:mainfrom
abaruni:toConfigSpec-explicit-userConfig

Conversation

@abaruni
Copy link
Copy Markdown
Contributor

@abaruni abaruni commented Nov 24, 2025

Description

When creating a VM we want to be sure that VApp properties are being configured correctly. We have seen behavior where a nil UserConfigurable field is treated as true. To mitigate this behavior, this PR updates the ToConfigSpec functions in configspec.go and helpers.go to explicitly set the value of a Property's UserConfigurable field to false if the field is nil. This will ensure that the property is correctly set to UserConfigurable: false when creating a VM.

Closes: #(issue-number)

How Has This Been Tested?

Unit tests.

Guidelines

Please read and follow the CONTRIBUTION guidelines of this project.

@abaruni abaruni force-pushed the toConfigSpec-explicit-userConfig branch from 7928391 to 0a1cebc Compare November 24, 2025 21:12
…ndle nil ovfProperty userConfigurable

When creating a VM we want to be sure that VApp properties are being
configured correctly. We have seen behavior where a nil UserConfigurable
field is treated as true. To mitigate this behavior, this PR updates the
ToConfigSpec functions in configspec.go and helpers.go to explicitly set
the value of a Property's UserConfigurable field to false if the field is
nil. This will ensure that the property is correctly set to UserConfigurable: false
when creating a VM.

Signed-off-by: Adnan Baruni <adnan.baruni@broadcom.com>
@abaruni abaruni force-pushed the toConfigSpec-explicit-userConfig branch from 0a1cebc to 31d4775 Compare November 24, 2025 21:15
@abaruni abaruni changed the title Update ofvEnvelop.ToConfigSpec and configInfo.ToConfigSpec to handle nil ovfProperty userConfigurable api: Update ofvEnvelop.ToConfigSpec and configInfo.ToConfigSpec to handle nil ovfProperty userConfigurable Nov 24, 2025
@tenthirtyam tenthirtyam requested a review from akutz November 25, 2025 14:51
@akutz akutz merged commit 18c386c into vmware:main Nov 25, 2025
12 checks passed
bryanv added a commit to bryanv/govmomi that referenced this pull request Dec 3, 2025
This reverts commit 31d4775.

The "api: Update ofvEnvelop.ToConfigSpec and configInfo.ToConfigSpec
to handle nil ovfProperty userConfigurable" commit appears to have
broken VM creation with VKS images.

Signed-off-by: Bryan Venteicher <bryan.venteicher@broadcom.com>
akutz added a commit to akutz/govmomi that referenced this pull request Dec 3, 2025
This reverts commit 3313eae.
akutz added a commit to akutz/govmomi that referenced this pull request Dec 3, 2025
This reverts commit 3313eae.

Signed-off-by: akutz <andrew.kutz@broadcom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants