Skip to content

fix: configuration parameters#468

Merged
lbajolet-hashicorp merged 1 commit intomainfrom
fix/configuration-parameters
Oct 4, 2024
Merged

fix: configuration parameters#468
lbajolet-hashicorp merged 1 commit intomainfrom
fix/configuration-parameters

Conversation

@tenthirtyam
Copy link
Copy Markdown
Collaborator

@tenthirtyam tenthirtyam commented Sep 26, 2024

Summary

Updates to the documentation, improvements to logging, and enhancements to error handling in the vsphere builder components. The most important changes include adding examples to the documentation, improving logging for configuration parameters, and enhancing error handling during VM reconfiguration.

Documentation Updates:

Logging Enhancements:

Error Handling Improvements:

Testing

Configuration:

  configuration_parameters = {
    "svga.autodetect"        = "TRUE"
    "logging"                = "FALSE"
    "disk.EnableUUID"        = "TRUE"
    "log.keepOld"            = "15"
    "migrate.encryptionMode" = "required"
  }

Log:

2024/09/25 19:51:52 packer-plugin-vsphere_v1.4.1-dev_x5.0_darwin_arm64 plugin: 2024/09/25 19:51:52 [INFO] Adding: svga.autodetect = TRUE
2024/09/25 19:51:52 packer-plugin-vsphere_v1.4.1-dev_x5.0_darwin_arm64 plugin: 2024/09/25 19:51:52 [INFO] Adding: logging = FALSE
2024/09/25 19:51:52 packer-plugin-vsphere_v1.4.1-dev_x5.0_darwin_arm64 plugin: 2024/09/25 19:51:52 [INFO] Adding: disk.EnableUUID = TRUE
2024/09/25 19:51:52 packer-plugin-vsphere_v1.4.1-dev_x5.0_darwin_arm64 plugin: 2024/09/25 19:51:52 [INFO] Adding: log.keepOld = 15
2024/09/25 19:51:52 packer-plugin-vsphere_v1.4.1-dev_x5.0_darwin_arm64 plugin: 2024/09/25 19:51:52 [INFO] Adding: migrate.encryptionMode = required
2024/09/25 19:51:52 packer-plugin-vsphere_v1.4.1-dev_x5.0_darwin_arm64 plugin: 2024/09/25 19:51:52 [INFO] Reconfiguration task completed successfully.
2024/09/25 19:51:52 packer-plugin-vsphere_v1.4.1-dev_x5.0_darwin_arm64 plugin: 2024/09/25 19:51:52 [INFO] Ignored the following parameters: [migrate.encryptionMode = required , logging = FALSE]
2024/09/25 19:51:52 packer-plugin-vsphere_v1.4.1-dev_x5.0_darwin_arm64 plugin: 2024/09/25 19:51:52 [INFO] Some configuration keys were ignored due to conflicts with other fields in the ConfigSpec. Refer to VirtualMachineConfigSpec in the vSphere API documentation.

Reference

Ref: #467

- o := &types.OptionValue{...} ensures OptionValue is correctly type-asserted to BaseOptionValue.
- Added more descriptive error messages for better debugging.
- Updated documentation.

Signed-off-by: Ryan Johnson <ryan@tenthirtyam.org>
@tenthirtyam tenthirtyam added the refactor Refactor label Sep 26, 2024
@tenthirtyam tenthirtyam added this to the v1.4.1 milestone Sep 26, 2024
@tenthirtyam tenthirtyam self-assigned this Sep 26, 2024
@tenthirtyam tenthirtyam requested a review from a team as a code owner September 26, 2024 00:01
Copy link
Copy Markdown
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @tenthirtyam

@github-actions
Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

refactor Refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants