[GH-ISSUE #325] Crash: interface conversion: interface {} is string, not float64 #76

Closed
opened 2026-02-28 00:40:28 +03:00 by kerem · 0 comments
Owner

Originally created by @marvin2309 on GitHub (Apr 3, 2024).
Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/325

Hey, new to Terraform and having a difficult time running the plugin.

When executing my cloudinit.tf file with "terraform apply" the plugin crashes.


│ Error: clone failed: can't lock file '/var/lock/pve-manager/pve-storage-local-ssd-zfs' - got timeout

│ with proxmox_vm_qemu.cloudinit-k3s-master[2],
│ on test-cloudinit.tf line 1, in resource "proxmox_vm_qemu" "cloudinit-k3s-master":
│ 1: resource "proxmox_vm_qemu" "cloudinit-k3s-master" {



│ Error: Plugin did not respond

│ with proxmox_vm_qemu.cloudinit-k3s-master[0],
│ on test-cloudinit.tf line 1, in resource "proxmox_vm_qemu" "cloudinit-k3s-master":
│ 1: resource "proxmox_vm_qemu" "cloudinit-k3s-master" {

│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.


│ Error: Plugin did not respond

│ with proxmox_vm_qemu.cloudinit-k3s-master[1],
│ on test-cloudinit.tf line 1, in resource "proxmox_vm_qemu" "cloudinit-k3s-master":
│ 1: resource "proxmox_vm_qemu" "cloudinit-k3s-master" {

│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.


│ Error: Plugin did not respond

│ with proxmox_vm_qemu.cloudinit-k3s-worker[1],
│ on test-cloudinit.tf line 49, in resource "proxmox_vm_qemu" "cloudinit-k3s-worker":
│ 49: resource "proxmox_vm_qemu" "cloudinit-k3s-worker" {

│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.


│ Error: Plugin did not respond

│ with proxmox_vm_qemu.cloudinit-k3s-worker[0],
│ on test-cloudinit.tf line 49, in resource "proxmox_vm_qemu" "cloudinit-k3s-worker":
│ 49: resource "proxmox_vm_qemu" "cloudinit-k3s-worker" {

│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.

Stack trace from the terraform-provider-proxmox_v2.9.14 plugin:

panic: interface conversion: interface {} is string, not float64

goroutine 73 [running]:
github.com/Telmate/proxmox-api-go/proxmox.NewConfigQemuFromApi(0x40001446e0, 0x804294?)
github.com/Telmate/proxmox-api-go@v0.0.0-20230319185744-e7cde7198cdf/proxmox/config_qemu.go:584 +0x3a94
github.com/Telmate/terraform-provider-proxmox/proxmox.resourceVmQemuCreate(0x40000d9680, {0x6cdf40?, 0x40000c07d0})
github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:972 +0x21c0
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x93efc0?, {0x93efc0?, 0x4000131e30?}, 0xd?, {0x6cdf40?, 0x40000c07d0?})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/resource.go:695 +0x134
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x40004387e0, {0x93efc0, 0x4000131e30}, 0x40000ae340, 0x40000d9300, {0x6cdf40, 0x40000c07d0})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/resource.go:837 +0x844
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x40004c2b70, {0x93efc0?, 0x4000131d10?}, 0x40006e2230)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/grpc_provider.go:1021 +0xbac
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x400039a3c0, {0x93efc0?, 0x4000131500?}, 0x400022efc0)
github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/tf5server/server.go:818 +0x3bc
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x7d2980?, 0x400039a3c0}, {0x93efc0, 0x4000131500}, 0x400022ef50, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x16c
google.golang.org/grpc.(*Server).processUnaryRPC(0x40004dc000, {0x942b80, 0x4000082820}, 0x40006e70e0, 0x40004deba0, 0xdef6a0, 0x0)
google.golang.org/grpc@v1.53.0/server.go:1336 +0xb68
google.golang.org/grpc.(*Server).handleStream(0x40004dc000, {0x942b80, 0x4000082820}, 0x40006e70e0, 0x0)
google.golang.org/grpc@v1.53.0/server.go:1704 +0x840
google.golang.org/grpc.(*Server).serveStreams.func1.2()
google.golang.org/grpc@v1.53.0/server.go:965 +0x84
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/grpc@v1.53.0/server.go:963 +0x294

Error: The terraform-provider-proxmox_v2.9.14 plugin crashed!

My .tf file looks like this:

resource "proxmox_vm_qemu" "cloudinit-k3s-master" {
# Node name has to be the same name as within the cluster
# this might not include the FQDN
target_node = "atlas"
desc = "Cloudinit Debian"
count = 3
onboot = true

# The template name to clone this vm from
clone = "Small"

# Activate QEMU agent for this VM
agent = 0

os_type = "cloud-init"
cores = 2
sockets = 2
numa = true
vcpus = 0
cpu = "host"
memory = 4096
name = "k3s-master-0${count.index + 1}"

cloudinit_cdrom_storage = "local-ssd-zfs"
scsihw   = "virtio-scsi-single" 
bootdisk = "scsi0"

#disk {
#    scsi {
#        scsi0 {
#            disk {
#              storage = "local-ssd-zfs"
#              size = 30
#            }
#        }
#    }
#}

# Setup the ip address using cloud-init.
# Keep in mind to use the CIDR notation for the ip.
ipconfig0 = "dhcp"
ciuser = "ansible"
nameserver = "192.168.20.1"

}

resource "proxmox_vm_qemu" "cloudinit-k3s-worker" {
# Node name has to be the same name as within the cluster
# this might not include the FQDN
target_node = "atlas"
desc = "Cloudinit Debian"
count = 2
onboot = true

# The template name to clone this vm from
clone = "Small"

# Activate QEMU agent for this VM
agent = 0

os_type = "cloud-init"
cores = 2
sockets = 2
numa = true
vcpus = 0
cpu = "host"
memory = 4096
name = "k3s-worker-0${count.index + 1}"

cloudinit_cdrom_storage = "local-ssd-zfs"
scsihw   = "virtio-scsi-single" 
bootdisk = "scsi0"

#disks {
#    scsi {
#        scsi0 {
#            disk {
#              storage = "local-ssd-zfs"
#              size = 12
#            }
#       }
#    }
#}

# Setup the ip address using cloud-init.
# Keep in mind to use the CIDR notation for the ip.
ipconfig0 = "dhcp"
ciuser = "ansible"

}

Originally created by @marvin2309 on GitHub (Apr 3, 2024). Original GitHub issue: https://github.com/Telmate/proxmox-api-go/issues/325 Hey, new to Terraform and having a difficult time running the plugin. When executing my cloudinit.tf file with "terraform apply" the plugin crashes. ╷ │ Error: clone failed: can't lock file '/var/lock/pve-manager/pve-storage-local-ssd-zfs' - got timeout │ │ with proxmox_vm_qemu.cloudinit-k3s-master[2], │ on test-cloudinit.tf line 1, in resource "proxmox_vm_qemu" "cloudinit-k3s-master": │ 1: resource "proxmox_vm_qemu" "cloudinit-k3s-master" { │ ╵ ╷ │ Error: Plugin did not respond │ │ with proxmox_vm_qemu.cloudinit-k3s-master[0], │ on test-cloudinit.tf line 1, in resource "proxmox_vm_qemu" "cloudinit-k3s-master": │ 1: resource "proxmox_vm_qemu" "cloudinit-k3s-master" { │ │ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details. ╵ ╷ │ Error: Plugin did not respond │ │ with proxmox_vm_qemu.cloudinit-k3s-master[1], │ on test-cloudinit.tf line 1, in resource "proxmox_vm_qemu" "cloudinit-k3s-master": │ 1: resource "proxmox_vm_qemu" "cloudinit-k3s-master" { │ │ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details. ╵ ╷ │ Error: Plugin did not respond │ │ with proxmox_vm_qemu.cloudinit-k3s-worker[1], │ on test-cloudinit.tf line 49, in resource "proxmox_vm_qemu" "cloudinit-k3s-worker": │ 49: resource "proxmox_vm_qemu" "cloudinit-k3s-worker" { │ │ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details. ╵ ╷ │ Error: Plugin did not respond │ │ with proxmox_vm_qemu.cloudinit-k3s-worker[0], │ on test-cloudinit.tf line 49, in resource "proxmox_vm_qemu" "cloudinit-k3s-worker": │ 49: resource "proxmox_vm_qemu" "cloudinit-k3s-worker" { │ │ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details. ╵ Stack trace from the terraform-provider-proxmox_v2.9.14 plugin: panic: interface conversion: interface {} is string, not float64 goroutine 73 [running]: github.com/Telmate/proxmox-api-go/proxmox.NewConfigQemuFromApi(0x40001446e0, 0x804294?) github.com/Telmate/proxmox-api-go@v0.0.0-20230319185744-e7cde7198cdf/proxmox/config_qemu.go:584 +0x3a94 github.com/Telmate/terraform-provider-proxmox/proxmox.resourceVmQemuCreate(0x40000d9680, {0x6cdf40?, 0x40000c07d0}) github.com/Telmate/terraform-provider-proxmox/proxmox/resource_vm_qemu.go:972 +0x21c0 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x93efc0?, {0x93efc0?, 0x4000131e30?}, 0xd?, {0x6cdf40?, 0x40000c07d0?}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/resource.go:695 +0x134 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x40004387e0, {0x93efc0, 0x4000131e30}, 0x40000ae340, 0x40000d9300, {0x6cdf40, 0x40000c07d0}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/resource.go:837 +0x844 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x40004c2b70, {0x93efc0?, 0x4000131d10?}, 0x40006e2230) github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/grpc_provider.go:1021 +0xbac github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x400039a3c0, {0x93efc0?, 0x4000131500?}, 0x400022efc0) github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/tf5server/server.go:818 +0x3bc github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x7d2980?, 0x400039a3c0}, {0x93efc0, 0x4000131500}, 0x400022ef50, 0x0) github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x16c google.golang.org/grpc.(*Server).processUnaryRPC(0x40004dc000, {0x942b80, 0x4000082820}, 0x40006e70e0, 0x40004deba0, 0xdef6a0, 0x0) google.golang.org/grpc@v1.53.0/server.go:1336 +0xb68 google.golang.org/grpc.(*Server).handleStream(0x40004dc000, {0x942b80, 0x4000082820}, 0x40006e70e0, 0x0) google.golang.org/grpc@v1.53.0/server.go:1704 +0x840 google.golang.org/grpc.(*Server).serveStreams.func1.2() google.golang.org/grpc@v1.53.0/server.go:965 +0x84 created by google.golang.org/grpc.(*Server).serveStreams.func1 google.golang.org/grpc@v1.53.0/server.go:963 +0x294 Error: The terraform-provider-proxmox_v2.9.14 plugin crashed! **My .tf file looks like this:** resource "proxmox_vm_qemu" "cloudinit-k3s-master" { # Node name has to be the same name as within the cluster # this might not include the FQDN target_node = "atlas" desc = "Cloudinit Debian" count = 3 onboot = true # The template name to clone this vm from clone = "Small" # Activate QEMU agent for this VM agent = 0 os_type = "cloud-init" cores = 2 sockets = 2 numa = true vcpus = 0 cpu = "host" memory = 4096 name = "k3s-master-0${count.index + 1}" cloudinit_cdrom_storage = "local-ssd-zfs" scsihw = "virtio-scsi-single" bootdisk = "scsi0" #disk { # scsi { # scsi0 { # disk { # storage = "local-ssd-zfs" # size = 30 # } # } # } #} # Setup the ip address using cloud-init. # Keep in mind to use the CIDR notation for the ip. ipconfig0 = "dhcp" ciuser = "ansible" nameserver = "192.168.20.1" } resource "proxmox_vm_qemu" "cloudinit-k3s-worker" { # Node name has to be the same name as within the cluster # this might not include the FQDN target_node = "atlas" desc = "Cloudinit Debian" count = 2 onboot = true # The template name to clone this vm from clone = "Small" # Activate QEMU agent for this VM agent = 0 os_type = "cloud-init" cores = 2 sockets = 2 numa = true vcpus = 0 cpu = "host" memory = 4096 name = "k3s-worker-0${count.index + 1}" cloudinit_cdrom_storage = "local-ssd-zfs" scsihw = "virtio-scsi-single" bootdisk = "scsi0" #disks { # scsi { # scsi0 { # disk { # storage = "local-ssd-zfs" # size = 12 # } # } # } #} # Setup the ip address using cloud-init. # Keep in mind to use the CIDR notation for the ip. ipconfig0 = "dhcp" ciuser = "ansible" }
kerem closed this issue 2026-02-28 00:40:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/proxmox-api-go#76
No description provided.