Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: configuration parameters #468

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

tenthirtyam
Copy link
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
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

@lbajolet-hashicorp lbajolet-hashicorp merged commit 5e944bc into main Oct 4, 2024
14 checks passed
@lbajolet-hashicorp lbajolet-hashicorp deleted the fix/configuration-parameters branch October 4, 2024 20:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
refactor Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants