-
Notifications
You must be signed in to change notification settings - Fork 533
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
Plugin crashes trying to clone a template #1101
Comments
Hey there, |
@nkamenar the thing you are trying to achieve isn't possible with the Terraform provider. The provider is built with the concept that the Terraform config is the truth of the environment. Therefore, any changes made outside of Terraform will be seen as drift from its state of truth. |
@TheGameProfi thanks for the info, that got me at least somewhat up and running. I think maybe I need to add some sort of delay between spinning up the VM's since it's all using the same template? Also for the cipassword variable should that be a plain text password in my .tfvars file or does that need to be encrypted like $(openssl passwd -6 'super_secret_pass')? Thanks again for the assistance.
|
Yeah, there is a threading issue causing it to request all IDs at the same time and getting the same ID. As workaround, you can manually set the ID and auto increment it with count |
Sorry to be a pain but could you give an example of how I might do this? This is literally the first time I am trying to use Terraform to set up some VM's so I'm super new to all of this. |
@nkamenar If I remember correctly this is how you do it. When you statically assign the resource "proxmox_vm_qemu" "docker_nodes" {
vmid: ${1234 + count.index}
} |
Never used cloud-init with Ubuntu, but for Debian, I use a `genericcloud' image https://cloud.debian.org/images/cloud/bookworm/latest/ maybe there is something like that for Ubuntu aswell. Was this vm template created from an image provided by Ubuntu or just a normal Ubuntu installation? In the past, I've seen people post that it should work with a normal installation as long as cloud-init is installed, never verified this. |
Mine was created similarly. This is the set of commands I used to create the template:
|
Just noticed your cloud-init disk is mounted as |
Could be the same issue as #973 |
The drive was mounted as
|
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 |
I have an ubuntu cloudinit template I am trying to create clones of using terraform. I admit I am new to Terraform so it's entirely possible I am making a mistake here and if that is the case I apologize. I have included my terraform file as well as the output from running apply.
Apply output log: terraform_debug.log
I did notice that in the plan, the output memory is set to 512 which is odd because I didn't specify memory in the config so I thought it should just use what is currently set in the template (8192) but maybe I am not understanding how this works? Similarly the plan has bios set as seabios but the template is set up with OVMF (UEFI). Basically I have a cloudinit template already configured with all my settings including user info, SSH tokens, hardware configuration, etc. And I just want to create multiple copies of that template, as is, with unique known IP Addresses. Thanks for any assistance!
Proxmox Template Hardware Config:
Template Cloud-Init settings:
The text was updated successfully, but these errors were encountered: