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

Issue: vsphere_virtual_machine Fails with NoPermission Error During Cloning #2353

Open
3 of 4 tasks
Sam-Eldin opened this issue Mar 3, 2025 · 1 comment
Open
3 of 4 tasks
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage

Comments

@Sam-Eldin
Copy link

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

1.11.0

Terraform Provider

1.5.7

VMware vSphere

2.8.1

Description

When attempting to create a new VM using the vsphere_virtual_machine resource, the process intermittently fails during the cloning phase with a NoPermission error.

Affected Resources or Data Sources

resource/vsphere_virtual_machine

Terraform Configuration

resource "vsphere_virtual_machine" "devops" {
  name             = "vm-random-name"
  resource_pool_id = "resgroup-2679946"
  datastore_cluster_id   = "group-p1289337"
  num_cpus = 4
  memory   = 16384
  guest_id = "rhel9_64Guest"
  scsi_type = "pvscsi"
  firmware = "efi"
  network_interface {
    network_id   = "dvportgroup-751218"
    adapter_type = "vmxnet3"
  }
  disk {
    label            = "disk0"
    size             = 140
    eagerly_scrub    = false
    thin_provisioned = true
  }
  clone {
    template_uuid = "42025960-08fd-4a20-3eb2-cf33b5485525"
  }
}

Debug Output

Logs

Panic Output

No response

Expected Behavior

The VM provisioning should complete successfully regardless of the log level.

Actual Behavior

Running terraform apply with INFO log level always fails with the NoPermission error.
Running terraform apply with TRACE log level results in a ~90% success rate.
Attached are the TRACE logs for both a successful and a failed provisioning attempt.

Steps to Reproduce

Run terraform apply with INFO logging → consistently fails.
Run terraform apply with TRACE logging → succeeds most of the time (~90% success rate).

Environment Details

No response

Screenshots

No response

References

No response

@Sam-Eldin Sam-Eldin added bug Type: Bug needs-triage Status: Issue Needs Triage labels Mar 3, 2025
Copy link

github-actions bot commented Mar 3, 2025

Hello, Sam-Eldin! 🖐

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage
Projects
None yet
Development

No branches or pull requests

1 participant