Eager zero disk setting not applied correctly when destination disk is larger than template. #2123
Open
4 tasks done
Labels
Milestone
Community Guidelines
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
The text was updated successfully, but these errors were encountered: