Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: issue gh-2005 #2009

Closed
wants to merge 1 commit into from
Closed

fix: issue gh-2005 #2009

wants to merge 1 commit into from

Conversation

nklinkachevAtVMware
Copy link
Contributor

@nklinkachevAtVMware nklinkachevAtVMware commented Aug 31, 2023

Customizing VMs ( customize{} block in the spec) with a hardware version less than 10 fails due to formatting error of the version string passed in the API. Changed the formatting code to format the version to 2 digit integer, left padded with 0 when it's less than 10. That way version 9 becomes vmx-09 instead of vmx-9 and version 10 remains vmx-10.

Description

Fix: r/vsphere_virtual_machine Customization fails with when the hardware version of the machine is less than 10.
"Error: cannot find OS family for guest ID "": ServerFaultCode: A specified parameter was not correct: key"

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'
no regressions

Release Note

Release note for CHANGELOG:

resource/vsphere_virtual_machine: Customization fails when hardware version of the machine is less than 10. [#2009](https://github.com/hashicorp/terraform-provider-vsphere/pull/2009)

References

Customizing VMs ( customize{} block in the spec) with a hardware version less than 10 fails due to formatting error of the version string passed in the API.
Changed the formatting code to format the version to 2 digit integer, left padded with 0 when it's less than 10.
That way version 9 becomes vmx-09 instead of vmx-9 and version 10 remains vmx-10.
@nklinkachevAtVMware nklinkachevAtVMware requested a review from a team as a code owner August 31, 2023 14:33
@hashicorp-cla
Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

@github-actions github-actions bot added provider Type: Provider size/xs Relative Sizing: Extra-Small labels Aug 31, 2023
@appilon
Copy link
Contributor

appilon commented Aug 31, 2023

I will run the VM resource tests on your branch, great job this has been a bug forever.

UPDATE: no regressions for existing VM tests

@tenthirtyam tenthirtyam changed the title Bugfix for issue https://github.com/hashicorp/terraform-provider-vsph… fix: issue gh-2005 Aug 31, 2023
Copy link
Collaborator

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

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

@nklinkachevAtVMware Can you ensure that the commit is signed and that you have signed the CLA?

@appilon
Copy link
Contributor

appilon commented Sep 1, 2023

replacing with #2011 due some unfortunate timeline limitations.

@appilon appilon closed this Sep 1, 2023
@github-actions
Copy link

github-actions bot commented Oct 2, 2023

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 Oct 2, 2023
@tenthirtyam tenthirtyam deleted the issue-2005 branch March 5, 2024 16:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
provider Type: Provider size/xs Relative Sizing: Extra-Small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants