Closed Thulium-Drake closed 1 year ago
Noticed that boot
wasn't getting sent in the update call to the API (from the proxmox-api-go package) so working on a fix there
What version of the provider are you using? I agree that it definitely doesn't seem like boot
is being set for update calls, but I was doing some packet sniffing for an unrelated issue and I can confirm that with 2.9.11 of the provider it is definitely somehow managing to set the boot
parameter on at least the initial call to /api2/json/nodes/<node>/qemu/<vmid>/config
after cloning (although it still just uses the same config.UpdateConfig function so I would not expect this to be a special case).
I'm using following configuration:
terraform {
required_providers {
proxmox = {
source = "telmate/proxmox"
version = "2.9.13"
}
}
}
provider "proxmox" {
pm_user = "terraform-prov@pve"
pm_password = "xxxxxxxxxxxxxx"
pm_api_url = "https://pve.example.com:8006/api2/json"
}
Which according to the docs, should be the latest version :-)
Ah interesting, I updated to 2.9.13 and it definitely breaks it. Looks like ~6 months of change to the PVE API package got merged in between 2.9.11 and 2.9.13 and in that time, it seems like the API package got more or less completely rewritten (1/3 of all commits happened in the last 6 months).
All that is to say, the previously mentioned PR probably is the correct fix and I will be sticking with 2.9.11 until that PR is merged and this provider is updated to use a non-broken version of the API
@Thulium-Drake FWIW it is actually possible (with some limitations) to create EFI disks and has just been an undocumented feature for a while apparently. See my latest comment in #341
Thanks for the note! It can't help me in my situation, I need to have pre-enrolled keys disabled (as I can't run with SecureBoot enabled when deploying systems via Foreman/Satellite).
But the template workaround is just fine for me, it also allows for some extra settings to be defined.
Hi there,
When I clone a template VM (as #341 isn't here yet) with the following
.tf
, it keeps complaining the VM does not have the correct boot order. In my case the boot order is empty on my template (as it has no disks/networks), but also when I want to change it fromnet0;virtio0
tovirtio0;net0
for example, the change is not applied to the VMsTF file
terraform plan output
Proxmox task log entry
Unless I'm mistaken, the
boot
parameter isn't passed to the Proxmox API at all.The workaround I have right now is create a template VM with a dummy disk and network (I use PXE boot to provision them anyway), set the boot order on the template and clone it then.