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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context deadline exceeded on VMs with large disks - thick provision eager zeroed #1795

Closed
1 of 4 tasks
UrbanDavid opened this issue Dec 1, 2022 · 5 comments · Fixed by #1645
Closed
1 of 4 tasks
Labels
bug Type: Bug duplicate Status: Duplicate Issue
Milestone

Comments

@UrbanDavid
Copy link

UrbanDavid commented Dec 1, 2022

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

v1.3.6

Terraform Provider

vsphere v2.2.0

VMware vSphere

vmware 7.0.3.00700

Description

Dear all,
I have an issue with creating vm with disks formated as thick provision eager zeroed (eagerly_scrub = true).
After 5 minutes terraform created a second task for delete vm. Vm takes 10 minutes to reconfiguration disks.
Terraform still running and if vm was created, vm is deleted and terraform show error:

Error: Error reconfiguring virtual machine: error reconfiguring virtual machine: Post "https://xxx/sdk": context deadline exceeded

I found issue #1134 and configured api_timeout = 30, but I have same issue.

I am using terraform for windows and vsphere v2.2.0.

Affected Resources or Data Sources

disk

Terraform Configuration

  resource "vsphere_virtual_machine" "vm-sql" {
  count = local.vm-sql_count	
  name             = "${local.vm-sql_name-prefix}${format("%02d", count.index + 1)}"

  #
wait_for_guest_ip_timeout               = 20
#wait_for_guest_net_routable             = true
wait_for_guest_net_timeout              = 20

  resource_pool_id = data.vsphere_compute_cluster.cluster.resource_pool_id

  datastore_cluster_id = data.vsphere_datastore_cluster.datastore_cluster.id
			
  folder = local.vm-sql_folder
  firmware = "efi"
  num_cpus         = local.vm-sql_num_cpus
  num_cores_per_socket = local.vm-sql_mnum_cores_per_socket
  memory           = local.vm-sql_memory
  guest_id         = data.vsphere_virtual_machine.template.guest_id
  scsi_type        = data.vsphere_virtual_machine.template.scsi_type
  scsi_controller_count = "4"
  
  network_interface {
    network_id   = data.vsphere_network.vlan-180.id
    adapter_type = data.vsphere_virtual_machine.template.network_interface_types[0]
  }
  disk {
    label            = "disk0"
    size             = data.vsphere_virtual_machine.template.disks.0.size
    thin_provisioned = data.vsphere_virtual_machine.template.disks.0.thin_provisioned
  }

  disk {
    label       = "disk1" #TempDB
    size        = local.vm-sql_diskT
    unit_number = "16"
    thin_provisioned = false
    eagerly_scrub = true
    }

  disk {
    label       = "disk2" #Disk D
    size        = local.vm-sql_diskD
    unit_number = "32"
    thin_provisioned = false
    eagerly_scrub = true
    }

  disk {
    label       = "disk3" # SQL Logs
    size        = local.vm-sql_diskL
    unit_number = "48"
    thin_provisioned = false
    eagerly_scrub = true
    }

  cdrom {
    client_device = true
    #datastore_id = data.vsphere_datastore.iso_datastore.id
    #path         = "/Volume/Storage/ISO/foo.iso"
  }

  clone {
    template_uuid = data.vsphere_virtual_machine.template.id

    customize {
	 windows_options {
	  computer_name = "${local.vm-sql_name-prefix}${format("%02d", count.index + 1)}"
	  join_domain = "${var.domain_add_domain}"
	  domain_admin_user = "${var.domain_add_user}"
	  domain_admin_password = "${var.domain_add_password}"
	  organization_name = "${var.customize_company_name}"

	  admin_password = "${var.customize_local_admin_pwd}"
	  auto_logon     = true
	  auto_logon_count = 1

	run_once_command_list = [
		"cmd.exe /C Powershell.exe -ExecutionPolicy ByPass -File C:\\temp\\ConfigureRemotingForAnsible.ps1 -CertValidityDays 3650",

	]
 
          }
  	#Time in minutes
  	#timeout = 10
      	network_interface {
		ipv4_address = cidrhost("${local.vm-sql_ip}/${local.vm-sql_ip-mask}", split(".", local.vm-sql_ip)[3] + count.index)
	        #ipv4_address = "${local.vm-sql_ip-prefix}.${11 + count.index}" 
	        ipv4_netmask = local.vm-sql_ip-mask
		dns_server_list = local.dns-sql_server_list
	      }
	ipv4_gateway = local.vm-sql_ip-gateway
  }
}
}

Debug Output

Error: error reconfiguring virtual machine: error reconfiguring virtual machine: Post "https://xxxx/sdk": context deadline exceeded

Panic Output

No response

Expected Behavior

extend timeout

Actual Behavior

vm is deleted if creating big disk thick provision eager zeroed

Steps to Reproduce

disk {
    label       = "disk2" #Disk D
    size        = "5000"
    unit_number = "32"
    thin_provisioned = false
    **eagerly_scrub = true**
    }

Environment Details

No response

Screenshots

No response

References

No response

@UrbanDavid UrbanDavid added bug Type: Bug needs-triage Status: Issue Needs Triage labels Dec 1, 2022
@github-actions github-actions bot removed the bug Type: Bug label Dec 1, 2022
@github-actions
Copy link

github-actions bot commented Dec 1, 2022

Hello, UrbanDavid! 🖐

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.

@tenthirtyam
Copy link
Collaborator

Resolved in #1645 that will be in v2.3.0 when released. It’s noted in the pending CHANGELOG.

@tenthirtyam tenthirtyam added this to the v2.3.0 milestone Dec 1, 2022
@tenthirtyam tenthirtyam added bug Type: Bug duplicate Status: Duplicate Issue and removed needs-triage Status: Issue Needs Triage labels Dec 1, 2022
@tenthirtyam
Copy link
Collaborator

Duplicate of #1662

@tenthirtyam tenthirtyam marked this as a duplicate of #1662 Dec 1, 2022
@tenthirtyam
Copy link
Collaborator

Duplicate of #1764

@tenthirtyam tenthirtyam marked this as a duplicate of #1764 Dec 1, 2022
@tenthirtyam tenthirtyam closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2022
@github-actions
Copy link

github-actions bot commented Jan 1, 2023

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. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Type: Bug duplicate Status: Duplicate Issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants