-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Help to configure api_timeout on vsphere provider #1387
Comments
Nobody can help us ? |
Hello func Reconfigure(vm *object.VirtualMachine, spec types.VirtualMachineConfigSpec) error {
log.Printf("[DEBUG] Reconfiguring virtual machine %q", vm.InventoryPath)
ctx, cancel := context.WithTimeout(context.Background(), provider.DefaultAPITimeout)
defer cancel()
task, err := vm.Reconfigure(ctx, spec)
if err != nil {
return err
}
tctx, tcancel := context.WithTimeout(context.Background(), provider.DefaultAPITimeout)
defer tcancel()
return task.Wait(tctx)
} After update : func Reconfigure(vm *object.VirtualMachine, spec types.VirtualMachineConfigSpec) error {
log.Printf("[DEBUG] Reconfiguring virtual machine %q", vm.InventoryPath)
ctx, cancel := context.WithTimeout(context.Background(), 10 * time.Minute)
defer cancel()
task, err := vm.Reconfigure(ctx, spec)
if err != nil {
return err
}
tctx, tcancel := context.WithTimeout(context.Background(), 10 * time.Minute)
defer tcancel()
return task.Wait(tctx)
} So despite the modification in 1.25.0 the parameter api_timeout which should overwrite the defaultapitimeout does not seem to work in the template |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Terraform Version
0.11.11
vSphere Provider Version
1.25.0
Hello, we have an issue with the vpshere api_timeout link to this issue:
Make the API timeout configurable when creating VM # 1278
When we build a vm with the vpshere provider with a large disk like 1TB.
the reconfiguration of the
vm takes a long time and after 5 minutes the vms is deleted by vsphere
We used to use version 1.12.0 of the plugin from the vpshere provider and today we have updated to 1.25.0. but the problem continues
we specify a timeout: "90" in the customization block of our model and api_timeout: "60" in vphere provider block but the result is the same
provider "vsphere" {
allow_unverified_ssl = true
api_timeout = 60
}
....
clone {
template_uuid = "${data.vsphere_virtual_machine.template.id}"
timeout = "90"
customize {
windows_options {
computer_name = "${var.vm_name}"
full_name = "xxxr"
admin_password = "xxxx"
time_zone = "105"
}
timeout = "90"
}
Can you help us
error output:
error reconfiguring virtual machine: Post https://xxx/sdk: context deadline exceeded
Additionally, there was an error removing the cloned virtual machine:
error destroying virtual machine: Post https://xxx: context deadline exceeded
The text was updated successfully, but these errors were encountered: