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

disk update fails #1845

Closed
skoppe opened this issue Mar 25, 2025 · 2 comments · Fixed by #1849
Closed

disk update fails #1845

skoppe opened this issue Mar 25, 2025 · 2 comments · Fixed by #1849
Labels
🐛 bug Something isn't working

Comments

@skoppe
Copy link

skoppe commented Mar 25, 2025

Describe the bug
Following the new release which includes #1829 I am running into an issue when cloning a VM that has 2 disks (boot and efi) where we move the boot disk to another datastore.

In the TF_LOG I see it moves the boot disk to the correct datastore, but then continues to use its old id when setting the final bits.

tf_http_req_body="virtio0=file%3Dshared-ssd%3Avm-108-disk-1%2Csize%3D8589934592%2Caio%3Dio_uring%2Cbackup%3D0%2Ciothread%3D1%2Cdiscard%3Dignore%2Ccache%3Dnone%2Creplicate%3D1"

To Reproduce
Steps to reproduce the behavior:

Have a VM Template with 2 disks, boot and efi, both on the same datastore.

Clone a VM from it, while setting the boot disk to be on another datastore.

See the error:

2025-03-25T13:43:38.406+0100 [ERROR] provider.terraform-provider-proxmox_v0.73.2: Response contains error diagnostic: @caller=/home/runner/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.26.0/tfprotov6/internal/diag/diagnostics.go:58 tf_req_id=672dc621-5785-b340-2ed2-68faabea6640 tf_rpc=ApplyResourceChange tf_provider_addr=registry.terraform.io/bpg/proxmox @module=sdk.proto diagnostic_detail="" diagnostic_severity=ERROR diagnostic_summary="disk update fails: error updating VM: received an HTTP 500 response - Reason: Internal Server Error" tf_proto_version=6.8 tf_resource_type=proxmox_virtual_environment_vm timestamp="2025-03-25T13:43:38.406+0100"

Expected behavior
It should use the correct id to set the disk attributes.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

  • Single or clustered Proxmox:
  • Proxmox version:
  • Provider version (ideally it should be the latest version):
  • Terraform/OpenTofu version:
  • OS (where you run Terraform/OpenTofu from):
  • Debug logs (TF_LOG=DEBUG terraform apply):
@bpg
Copy link
Owner

bpg commented Mar 25, 2025

Good catch, thanks @skoppe! I'll take a look.

Quick question though, was this a new clone, or an apply of the existing config to an existing resource using the new provider version?

@bpg bpg moved this from 📥 Inbox to ☑️ Todo in terraform-provider-proxmox Mar 25, 2025
@skoppe
Copy link
Author

skoppe commented Mar 26, 2025

It was a brand new clone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants