Terraform: error creating VM: 596 tls_process_server certificate: certificate verify failed

stu_m

New Member
May 3, 2023
1
0
1
I'm receiving this error message when trying to deploy a VM using a local ubuntu ISO stored in a local datastore on the bare metal host.

proxmox_vm_qemu.terra-vm1[0]: Creating... ╷ │ Error: error creating VM: 596 tls_process_server_certificate: certificate verify failed, error status: (params: map[agent:1 args: bios:seabios boot: bootdisk:scsi0 cores:2 cpu:host description: hotplug:network,disk,usb ide2:local:iso/ubuntu-20.04.4-live-server-amd64.iso,media=cdrom kvm:true machine: memory:2048 name:terra-vm1 net0:virtio=82:07:15:10:C4:4E,bridge=vmbr0 numa:false onboot:false ostype: scsi0:local-lvm-ssd-thin:10 scsihw:virtio-scsi-pci sockets:1 startup: tablet:true tags: vmid:104]) │ │ with proxmox_vm_qemu.terra-vm1[0], │ on main.tf line 21, in resource "proxmox_vm_qemu" "terra-vm1": │ 21: resource "proxmox_vm_qemu" "terra-vm1" {

This is my main.tf. I've tried with a token ID, with username and pw, tls_insecure true and false. Same result.

provider "proxmox" {
pm_api_url = "https://myserverIP:8006/api2/json"
#pm_user = "terraform-prov@pve"
#pm_password = "super_secure_password"
# pm_api_token_id = "root@pam!terra-test"
pm_api_token_id = "terraform-prov@pve!vmCreation"
pm_api_token_secret = "8f2408d0-3ffe-4759-832e-345659a0c2a7"
pm_tls_insecure = true
pm_debug = true
}

resource "proxmox_vm_qemu" "terra-vm1" {
count = 1
name = "terra-vm1"

target_node = "proxmoxlab.orlcoelab.com"

iso = "local:iso/ubuntu-20.04.4-live-server-amd64.iso"

agent = 1
memory = 2048
sockets = 1
cores = 2
cpu = "host"
scsihw = "virtio-scsi-pci"
os_type = "ubuntu"
bootdisk = "scsi0"

disk {
slot = 0
size = "10G"
type = "scsi"
storage = "local-lvm-ssd-thin"
}

network {
model = "virtio"
bridge = "vmbr0"
}
}
 
I'm receiving this error message when trying to deploy a VM using a local ubuntu ISO stored in a local datastore on the bare metal host.

proxmox_vm_qemu.terra-vm1[0]: Creating... ╷ │ Error: error creating VM: 596 tls_process_server_certificate: certificate verify failed, error status: (params: map[agent:1 args: bios:seabios boot: bootdisk:scsi0 cores:2 cpu:host description: hotplug:network,disk,usb ide2:local:iso/ubuntu-20.04.4-live-server-amd64.iso,media=cdrom kvm:true machine: memory:2048 name:terra-vm1 net0:virtio=82:07:15:10:C4:4E,bridge=vmbr0 numa:false onboot:false ostype: scsi0:local-lvm-ssd-thin:10 scsihw:virtio-scsi-pci sockets:1 startup: tablet:true tags: vmid:104]) │ │ with proxmox_vm_qemu.terra-vm1[0], │ on main.tf line 21, in resource "proxmox_vm_qemu" "terra-vm1": │ 21: resource "proxmox_vm_qemu" "terra-vm1" {

This is my main.tf. I've tried with a token ID, with username and pw, tls_insecure true and false. Same result.

provider "proxmox" {
pm_api_url = "https://myserverIP:8006/api2/json"
#pm_user = "terraform-prov@pve"
#pm_password = "super_secure_password"
# pm_api_token_id = "root@pam!terra-test"
pm_api_token_id = "terraform-prov@pve!vmCreation"
pm_api_token_secret = "8f2408d0-3ffe-4759-832e-345659a0c2a7"
pm_tls_insecure = true
pm_debug = true
}

resource "proxmox_vm_qemu" "terra-vm1" {
count = 1
name = "terra-vm1"

target_node = "proxmoxlab.orlcoelab.com"

iso = "local:iso/ubuntu-20.04.4-live-server-amd64.iso"

agent = 1
memory = 2048
sockets = 1
cores = 2
cpu = "host"
scsihw = "virtio-scsi-pci"
os_type = "ubuntu"
bootdisk = "scsi0"

disk {
slot = 0
size = "10G"
type = "scsi"
storage = "local-lvm-ssd-thin"
}

network {
model = "virtio"
bridge = "vmbr0"
}
}
try

target_node = "proxmoxlab"
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!