Got the error when trying to create VM via terraform.
pveversion
pve-manager/8.2.4/faa83925c9641325 (running kernel: 6.8.8-1-pve)
Running terraform right from the PVE node.
cat main.tf
mount | grep /opt/st
/dev/mapper/pve-data on /opt/st type ext4 (rw,relatime,errors=remount-ro,stripe=16)
pveversion
pve-manager/8.2.4/faa83925c9641325 (running kernel: 6.8.8-1-pve)
Code:
Plan: 1 to add, 0 to change, 0 to destroy.
proxmox_vm_qemu.vm[0]: Creating...
proxmox_vm_qemu.vm[0]: Still creating... [10s elapsed]
proxmox_vm_qemu.vm[0]: Still creating... [20s elapsed]
proxmox_vm_qemu.vm[0]: Still creating... [30s elapsed]
proxmox_vm_qemu.vm[0]: Still creating... [40s elapsed]
proxmox_vm_qemu.vm[0]: Still creating... [50s elapsed]
proxmox_vm_qemu.vm[0]: Still creating... [1m0s elapsed]
╷
│ Error: command '/usr/bin/qemu-img resize -f qcow2 /opt/st/images/194/vm-194-disk-1.qcow2 10737418240' failed: got timeout
Running terraform right from the PVE node.
cat main.tf
Code:
terraform {
required_providers {
proxmox = {
source = "registry.local/telmate/proxmox"
# source = "telmate/proxmox"
version = "3.0.1-rc4"
}
}
}
provider "proxmox" {
pm_api_url = "https://172.16.11.1:8006/api2/json"
pm_api_token_id = "redacted"
pm_api_token_secret = "redacted"
pm_timeout = 7200
}
variable "vm_ips" {
default = ["172.16.10.161", "172.16.10.162", "172.16.10.163"]
}
resource "proxmox_vm_qemu" "vm" {
timeouts {
create = "60m"
delete = "10m"
}
count = 1
name = "terraform-vm-${count.index}"
agent = 1
boot = "order=scsi0"
target_node = "Node-5"
clone = "cloud-init-template"
full_clone = true
clone_wait = 45
scsihw = "virtio-scsi-pci"
## machine = "pc"
# storage = "st"
cores = 2
memory = 4096
disks {
scsi {
scsi0 {
disk {
size = "10G"
storage = "st"
format = "qcow2"
}
}
}
}
...
mount | grep /opt/st
/dev/mapper/pve-data on /opt/st type ext4 (rw,relatime,errors=remount-ro,stripe=16)