Skip to content

Fix vmware-iso validation by explicitly setting tools_mode#1673

Open
t-mtsmt wants to merge 1 commit intochef:mainfrom
t-mtsmt:fix/vmware-tools-mode
Open

Fix vmware-iso validation by explicitly setting tools_mode#1673
t-mtsmt wants to merge 1 commit intochef:mainfrom
t-mtsmt:fix/vmware-tools-mode

Conversation

@t-mtsmt
Copy link
Copy Markdown

@t-mtsmt t-mtsmt commented Mar 17, 2026

Description

This change fixes vmware-iso validation when VMware tools upload settings are configured.

Bento already sets tools_upload_flavor and tools_upload_path for VMware builds, but does not set tools_mode. With current VMware builder validation, tools_mode must be explicitly specified whenever tools configuration is present.

Without this change, validation fails with the following error:

Error: 1 error(s) occurred:

* 'tools_mode' must be explicitly specified when using any tools configuration

  on packer_templates\pkr-sources.pkr.hcl line 547:
  (source code not available)

This PR adds a vmware_tools_mode variable, derives a default value from the existing upload configuration, and passes tools_mode to the vmware-iso source.

The default behavior remains the same:

  • use upload when a VMware tools upload flavor is configured
  • use disable when no upload flavor is available
  • allow explicit override through vmware_tools_mode

Related Issue

No related issue.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • If Gemfile.lock has changed, I have used --conservative to do it and included the full output in the Description above.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

@t-mtsmt t-mtsmt requested review from a team and Stromweld as code owners March 17, 2026 18:12
@sonarqubecloud
Copy link
Copy Markdown

@Stromweld
Copy link
Copy Markdown
Collaborator

now that they have attach fixed I think this should default to attach. upload was only used as it was the only one supported for all platforms. Attach speeds things up since it doesn't have to spend the time copying the iso to the server.

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