terraform-provider-vsphere
terraform-provider-vsphere copied to clipboard
feat: add instant clone
Description
Implementation for instant clone functionality
- The Instant Clone technology is used to create powered-on virtual machines from the running state of another powered-on virtual machine.
- The result of an Instant Clone operation is a new virtual machine that is identical to the source virtual machine.
- With Instant Clone you can create new virtual machines from a controlled point in time. Instant cloning is very convenient for large-scale application deployments because it ensures memory efficiency and allows for creating numerous virtual machines on a single host.
- This functionality can be used for Creating a powered-on Instant Clone of a virtual machine.
Acceptance tests
- [x] Have you added an acceptance test for the functionality being added?
- [x] Have you run the acceptance tests on this branch?
Output from acceptance testing:
$ make testacc TESTARGS="-run=TestAccResourceVSphereVirtualMachine_Instantclone"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v -run=TestAccResourceVSphereVirtualMachine_Instantclone -timeout 240m
? github.com/hashicorp/terraform-provider-vsphere [no test files]
=== RUN TestAccResourceVSphereVirtualMachine_Instantclone
--- PASS: TestAccResourceVSphereVirtualMachine_Instantclone (188.07s)
PASS
ok github.com/hashicorp/terraform-provider-vsphere/vsphere 191.274s
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/administrationroles [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/clustercomputeresource [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/computeresource [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/contentlibrary [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/customattribute [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/datacenter [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/datastore [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/dvportgroup [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/envbrowse [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/folder [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/hostsystem [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/network [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/nsx [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/ovfdeploy [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/provider [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/resourcepool [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/spbm [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/storagepod [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/structure [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/testhelper [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/utils [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/vappcontainer [no test files]
testing: warning: no tests to run
PASS
ok github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/viapi (cached) [no tests to run]
testing: warning: no tests to run
PASS
ok github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/virtualdisk (cached) [no tests to run]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/virtualmachine [no test files]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/helper/vsansystem [no test files]
testing: warning: no tests to run
PASS
ok github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/virtualdevice (cached) [no tests to run]
? github.com/hashicorp/terraform-provider-vsphere/vsphere/internal/vmworkflow [no test files]
...
Release Note
Release note for CHANGELOG:
Capability to Add Instant Clone for a Parent VM.
References
Old PR: https://github.com/hashicorp/terraform-provider-vsphere/pull/1371
@redeux @markpeek @aareet @mfilipiak-ccg The Old PR CLA is resolved. Please take a look
@Anant99-sys, taking a moment to quickly scan the pull request and noticed that the vsphere_virtual_machine resource documentation will also need to be updated with context for this option for completeness.
Ryan Johnson Staff II Solutions Architect, VMware, Inc.
eature: instant_clone
@tenthirtyam Can you please guide me as to what to do for updating the documentation for vsphere_virtual_machine?
@Anant99-sys, I'll follow up over Slack next week to discuss this feature with you along with the documentation and tests.
Resolved conflicts and errors; all checks have now passed.
Ready for testing once again.
Ryan Johnson Senior Staff Solutions Architect | Product Engineering @ VMware, Inc.
Hi, any updates on this?
Hi, any updates on this?
Please refer to the tentative milestone assignment.
@Anant99-sys - could you review the current comments? Perhaps we can put this one forward now...