You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When deploying a VM that clones from a template, the provider throws an error expanding the disk. However the VM is created successfully in proxmox and the disk shows the desired size.
Example configuration in the module for cloning the template and attempting to expand the disk:
clone {
vm_id=data.proxmox_virtual_environment_vms.server_template_vms[0].vms[0].vm_iddatastore_id=var.root_disk_datastore_idfull=true
}
disk {
datastore_id=var.root_disk_datastore_idinterface="scsi0"iothread=truediscard="on"size=var.root_disk_size
}
and the output of terraform|tofu apply.
Error: disk resize fails: error waiting for VM disk resize: All attempts fail:
#1: the server did not include a data object in the response
Expected behavior
The VM is created from the template and the volume is expanded without the provider throwing an error.
Screenshots
The VM does actually get created and scsi0 gets expanded to the size passed in to root_disk_size
Additional context
Add any other context about the problem here.
Single or clustered Proxmox: clustered
Proxmox version: 7.4-17
Provider version (ideally it should be the latest version): 0.70.1
Terraform/OpenTofu version: tofu v1.9.0
OS (where you run Terraform/OpenTofu from): Ubuntu 22.04
Debug logs (TF_LOG=DEBUG terraform apply):
2025-02-06T16:54:37.362Z [ERROR] provider.terraform-provider-proxmox_v0.70.1: Response contains error diagnostic: diagnostic_detail="" tf_proto_version=6.8 tf_provider_addr=registry.terraform.io/bpg/proxmox diagnostic_severity=ERROR
diagnostic_summary=
| disk resize fails: error waiting for VM disk resize: All attempts fail:
| #1: the server did not include a data object in the response
tf_req_id=81b77ccf-b994-81d0-3780-d43def810421 tf_resource_type=proxmox_virtual_environment_vm tf_rpc=ApplyResourceChange @caller=/home/runner/go/pkg/mod/github.com/hashicorp/[email protected]/tfprotov6/internal/diag/diagnostics.go:58 @module=sdk.proto timestamp=2025-02-06T16:54:37.362Z
2025-02-06T16:54:37.363Z [DEBUG] State storage *remote.State declined to persist a state snapshot
2025-02-06T16:54:37.363Z [ERROR] vertex "module.example.proxmox_virtual_environment_vm.example_vm[0]" error: disk resize fails: error waiting for VM disk resize: All attempts fail:
#1: the server did not include a data object in the response
│ Error: disk resize fails: error waiting for VM disk resize: All attempts fail:
│ #1: the server did not include a data object in the response
│
│ with module.example.proxmox_virtual_environment_vm.example_vm[0],
│ on ../../modules/example/main.tf line 152, in resource "proxmox_virtual_environment_vm" "example_vm":
│ 152: resource "proxmox_virtual_environment_vm" "example_vm" {
│
╵
2025-02-06T16:54:37.862Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-02-06T16:54:37.863Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.opentofu.org/bpg/proxmox/0.70.1/linux_amd64/terraform-provider-proxmox_v0.70.1 pid=513271
2025-02-06T16:54:37.863Z [DEBUG] provider: plugin exited
The text was updated successfully, but these errors were encountered:
Discovered that the bug related to expanding disks can be worked around by manually rebooting VMs after applying with updated disk size, followed by a second apply.
Steps:
Deploy from template using the template disk size for the initial deploy to ensure you get a clean deploy and state
After VMs come up and whatever runs on them initializes, update disk size to new larger size
Run tofu apply
You will receive the error from tofu saying error waiting for VM disk resize: All attempts fail: for each disk attempting to resize
If you check the proxmox UI you will see pending changes on the VMs showing the current disk size already being the updated size and the pending size being the original
Manually shutdown and restart the VMs
At this point proxmox will show the old size in the GUI still, but the disks in the VM should be the new updated size
Run another tofu apply
You will see the same error as before, but now if you look in the GUI all the VMs should show the updated size
Subsequent applies should show no resources needing to be updated which indicates the tofu state matches the deployed infrastructure
This might even work for the initial VM creation, but I am uncertain if the tofu error is hit before it finishes setting everything else up for the VMs.
Describe the bug
When deploying a VM that clones from a template, the provider throws an error expanding the disk. However the VM is created successfully in proxmox and the disk shows the desired size.
Example configuration in the module for cloning the template and attempting to expand the disk:
and the output of
terraform|tofu apply
.Expected behavior
The VM is created from the template and the volume is expanded without the provider throwing an error.
Screenshots
The VM does actually get created and scsi0 gets expanded to the size passed in to
root_disk_size
Additional context
Add any other context about the problem here.
Debug logs (
TF_LOG=DEBUG terraform apply
):The text was updated successfully, but these errors were encountered: