-
Notifications
You must be signed in to change notification settings - Fork 455
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
For cloning Virtual Machine has been powered off #746
Comments
@bill-rich could you please help evaluate above? thanks a lot. |
@bill-rich any thoughts? thanks |
Hi @chuanran, I looked into this and I don't see an issue with allowing the cloning of running VMs. I'm not certain on the time frame to get this enhancement added, but I'll get it on the backlog. |
Hi @bill-rich thanks for response. To allow cloning running vms is very easy, just comment out the following 3 lines code, and I already tested it and it works pretty good without any issues. |
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform
issue trackers reserved for bug reports and feature requests. For general usage
questions, please see: https://www.terraform.io/community.html.
Terraform Version
Terraform v0.11.11
vSphere Provider Version
vsphere_v1.9.1_x4
Affected Resource(s)
vsphere_virtual_machine
If this issue appears to affect multiple resources, it may be an issue with
Terraform's core, so please mention this.
Terraform Configuration Files
Works with any config. Nothing specific.
Debug Output
vsphere_virtual_machine.vm: virtual machine must be powered off to be used as a source for cloning. code is here:
https://github.com/terraform-providers/terraform-provider-vsphere/blob/master/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go#L73
Expected Behavior
It should allow end users to clone a VM even if it is running.
The PowerCLI cmdlet New-VM allows us to have VMs/Templates that are powered on when we create clones.
For example, if we want to clone an existing production environment, where we cannot power off the VMs before cloning, is it expected that terraform should support that?
From Vsphere Client, actually when you right click any running VM, and choose Clone -> Clone to virtual machine, it can work pretty well. We know the best practice is always NOT cloning a running vm to avoid edge cases, but at least terraform should provide the possibility to ask end users to decide
Actual Behavior
What actually happened?
Steps to Reproduce
It does not allow you to create a clone
References
https://github.com/terraform-providers/terraform-provider-vsphere/blob/master/vsphere/internal/vmworkflow/virtual_machine_clone_subresource.go#L73
The text was updated successfully, but these errors were encountered: