Hello Experts,
I've using terrform to provision.
Here is my config
provider.tf
main.tf
I get below error while creating VM:
error:
Please help.
I've using terrform to provision.
Here is my config
provider.tf
Code:
terraform {
required_providers {
proxmox = {
source = "bpg/proxmox"
}
}
}
provider "proxmox" {
endpoint = "https://172.23.18.4:8006/"
username = "root@pam"
password = "admin123"
insecure = true
ssh {
agent = true
}
}
main.tf
Code:
resource "proxmox_virtual_environment_vm" "ol9_vm" {
name = "test-ol9"
node_name = "pv1"
initialization {
user_account {
username = "vagrant"
password = "vagrant"
}
}
disk {
datastore_id = "local-lvm1"
file_id = proxmox_virtual_environment_download_file.ol9_cloud_image.id
interface = "virtio0"
iothread = true
discard = "on"
size = 20
}
}
resource "proxmox_virtual_environment_download_file" "ol9_cloud_image" {
content_type = "iso"
datastore_id = "local-lvm1"
node_name = "pv1"
url = "https://yum.oracle.com/templates/OracleLinux/OL9/u3/x86_64/OL9U3_x86_64-kvm-b220.qcow2"
file_name = "ol9.img"
upload_timeout = 4444
}
vagrant@JumpHost:~/terraform/proxmox-ol$ cat provider.tf
terraform {
required_providers {
proxmox = {
source = "bpg/proxmox"
}
}
}
I get below error while creating VM:
error:
Code:
proxmox_virtual_environment_download_file.ol9_cloud_image: Still creating... [17m0s elapsed]
proxmox_virtual_environment_download_file.ol9_cloud_image: Creation complete after 17m4s [id=local-lvm1:iso/ol9.img]
proxmox_virtual_environment_vm.ol9_vm: Creating...
╷
│ Error: error waiting for VM disk resize: All attempts fail:
│ #1: task "UPID:pv1:003BEBD1:0968C8B9:663F9A21:resize:114:root@pam:" failed to complete with exit code: shrinking disks is not supported
│
│ with proxmox_virtual_environment_vm.ol9_vm,
│ on main.tf line 2, in resource "proxmox_virtual_environment_vm" "ol9_vm":
│ 2: resource "proxmox_virtual_environment_vm" "ol9_vm" {
│
Please help.
Last edited: