Skip to content

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 <[email protected]>
@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants