-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.9.13 - Terraform hangs on "still creating" when deploying multiple VMs #705
Comments
yep, this is a huge blocker for both lxc and vm creation atm,
|
I'm a moron, change the template and try again it'll work. use a updated template: https://github.com/TechByTheNerd/cloud-image-for-proxmox/tree/main/ubuntu |
This actually appears to be a real problem. I am unable to deploy more than 1 container resource. This appears to be because Terraform uses parallelism by default and PVE cannot handle multiple requests at the same time. Perhaps a lock issue on a clone? Here is an interesting thread, putting the responsibility on the provider to manage this. I've tried both a Would love to be proved wrong here. resource "proxmox_lxc" "data_lxc" {
count = 2
hostname = "data-${count.index + 1}"
target_node = "pve3"
password = var.container_password
clone = 501
full = true
cores = 4
memory = 2048
swap = 1024
start = true
onboot = true
unprivileged = true
hastate = "ignored"
vmid = count.index + 221
rootfs {
storage = "containers"
size = "10G"
}
mountpoint {
key = "0"
slot = 0
storage = "salt-states"
mp = "/srv"
size = "100M"
shared = true
}
mountpoint {
key = "1"
slot = 1
storage = "data-library"
mp = "/mnt/data"
size = "100G"
shared = true
}
network {
name = "eth0"
bridge = "vmbr0"
ip = "10.10.9.${count.index + 221}/24"
gw = "10.10.9.254"
}
provisioner "remote-exec" {
script = "provision.sh"
connection {
type = "ssh"
user = "root"
host = "10.10.9.${count.index + 221}"
private_key = var.ssh_private_key
}
}
} |
Just discovered |
@rterbush you cannot clone in parallel : https://forum.proxmox.com/threads/parallel-cloning.75902/ |
@CaptainPizzaPirate thanks for the link. It does explain the issue on the Proxmox side. Point of my earlier comment is that setting Actually, was the poster in one of the other referenced issues that made the statement that they did not believe this works as intended. |
@rterbush & @deep-blue-pulsar
can you post the log trace in the file terraform-provider-proxmox.log? |
@CaptainPizzaPirate in my case, I am deploying lxc containers, so not applicable. |
@rterbush I understand that, however if the clone template does not have the agent it will also stall. you can verify this by enabling the logs to confirm its not actually the image issue.
|
@CaptainPizzaPirate maybe I am not understanding you completely. I am not running qemu in these deployments. The containers are cloned from lxc templates. No qemu involved to install and run the qemu agent. A lot of water has gone under the bridge since I reported/confirmed this behavior with not being able to control parallelism in the proxmox provider config. I acknowledge that there is a limitation in the Proxmox API with regard to locking clones. However, setting My config has also changed a lot in order to work around other bugs such as #753, so I am now also specifying hwaddr for each container provisioned. Not clear if I can easily recreate this without substantially reverting my config. Will give a try without the command line var and report back if I can recreate. But again, this has less to do with the container config and more to do with an upstream issue in the proxmox provider config itself. |
@rterbush |
This issue is stale because it has been open for 60 days with no activity. Please update the provider to the latest version and, in the issue persist, provide full configuration and debug logs |
This issue was closed because it has been inactive for 5 days since being marked as stale. |
Hi folks. Apologies if I'm missing any information as I'm still learning the ropes with Terraform. I've been trying for the past day to deploy 4 cloudinit VMs to Proxmox but no mater how much I tweak things I can't get the provider to progress further than the first VM.
This is what my main.tf looks like:
I've provisioned the template to have the qemu agent installed. Whenever I run the plan, it starts creating the first VM but never goes past that. Also, when it tries to boot the VM it does so 3 times and errors out because the VM is already running from the first request it sent:
Anyone else having a similar issue?
The text was updated successfully, but these errors were encountered: