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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eager zero disk setting not applied correctly when destination disk is larger than template. #2123

Open
4 tasks done
TrevGG opened this issue Jan 29, 2024 · 1 comment
Open
4 tasks done
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage

Comments

@TrevGG
Copy link

TrevGG commented Jan 29, 2024

Community Guidelines

  • I have read and agree to the HashiCorp Community Guidelines .
  • Vote on this issue by adding a 馃憤 reaction to the original issue initial description to help the maintainers prioritize.
  • Do not leave "+1" or other comments that do not add relevant information or questions.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Terraform

1.6.6

Terraform Provider

2.6.1

VMware vSphere

7.0.3

Description

When creating a VM from template via clone in terraform i noticed the thick eager zero setting is not applied correctly when the destination disk is larger than the original template disk size. The resulting disk configuration appears as "Thick Lazy Zero" instead of "Thick Eager Zero"

The following tests were performed:

thin-template(16GB) -> Request eager zero configured VM disk(16GB) -> results in eager zero VM disk (Pass)
thin-template(16GB) -> Request lazy zero configured VM disk(16GB) -> results in lazy zero VM disk (Pass)
thin-template(16GB) -> Request thin configured VM disk(16GB) -> results in thin VM disk (Pass)

thin-template(16GB) -> Request eager zero configured VM disk(17GB) -> results in lazy zero VM disk (Fail)
thin-template(16GB) -> Request lazy zero configured VM disk(17GB) -> results in lazy zero VM disk (Pass)
thin-template(16GB) -> Request thin configured VM disk(17GB) -> results in thin VM disk (Pass)

This is when specifying a datastore_id. When using a datastore_cluster the configuration is not applied at all (will create another issue for that).

The tests above used a thin template but this same behaviour occurs with Thick lazy zero templates.

Affected Resources or Data Sources

'resource/vsphere_virtual_machine'

Terraform Configuration

https://gist.github.com/TrevGG/a38fbccd367ea80f1b97120b8775f484

Debug Output

N/A

Panic Output

No response

Expected Behavior

Disk configuration should be "Thick Eager Zero"

Actual Behavior

Disk configuration is ""Thick Lazy Zero"

Steps to Reproduce

Create VM from template with disk size greater than source template and with disk settings thin_provisioned = false and eagerly_scrub = true.

Environment Details

No response

Screenshots

No response

References

No response

@TrevGG TrevGG added bug Type: Bug needs-triage Status: Issue Needs Triage labels Jan 29, 2024
Copy link

Hello, TrevGG! 馃枑

Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.

If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage
Projects
None yet
Development

No branches or pull requests

1 participant