feat(proxmox): parameterize new VM CPU model

This commit is contained in:
Hermes Agent committed 2026-11-24 08:51:40 +00:00
1 parent f1cc22987f
commit 8d56e3a81c
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -42,6 +42,6 @@ Only `vlan66` maps to a DNS suffix (`lab.vezpi.com`); other VLANs fail before cl
2. It waits for DNS, port 22, an Ansible connection and cloud-init. Cloud-init exit code `0` is accepted; degraded exit code `2` is accepted with a warning. Other codes, incomplete status and timeouts fail. 2. It waits for DNS, port 22, an Ansible connection and cloud-init. Cloud-init exit code `0` is accepted; degraded exit code `2` is accepted with a warning. Other codes, incomplete status and timeouts fail.
3. On the guest it sets the display timezone to `Europe/Paris` (CET/CEST), installs `qemu-guest-agent` and starts its device-activated service. It does not change RTC/NTP, manually enable the static unit, configure sudo or reboot. 3. On the guest it sets the display timezone to `Europe/Paris` (CET/CEST), installs `qemu-guest-agent` and starts its device-activated service. It does not change RTC/NTP, manually enable the static unit, configure sudo or reboot.
New clones use the `x86-64-v2-AES` CPU model before first boot; every destination host must support it. Existing VMs and templates are unchanged. New clones use `vm_cpu_model` (default `x86-64-v2-AES`, overridable via extra vars) before first boot; every destination host must support the selected model. Existing VMs and templates are unchanged.
A failure leaves the new VM intact for inspection. Playbook success does **not** prove agent communication: on the VM's actual Proxmox node, run `qm agent <NEW_VMID> ping`. A successful exit with no error is sufficient, even if the response is empty. A failure leaves the new VM intact for inspection. Playbook success does **not** prove agent communication: on the VM's actual Proxmox node, run `qm agent <NEW_VMID> ping`. A successful exit with no error is sufficient, even if the response is empty.
+2 -1
View File
@@ -6,6 +6,7 @@
vars: vars:
ansible_python_interpreter: "{{ ansible_playbook_python }}" ansible_python_interpreter: "{{ ansible_playbook_python }}"
vm_cpu: 1 vm_cpu: 1
vm_cpu_model: x86-64-v2-AES
vm_ram_gib: 2 vm_ram_gib: 2
vm_disk_gib: 4 vm_disk_gib: 4
vm_vlan: vlan66 vm_vlan: vlan66
@@ -87,7 +88,7 @@
update: true update: true
update_unsafe: true # Needed to replace net0 on this newly cloned VM. update_unsafe: true # Needed to replace net0 on this newly cloned VM.
cores: "{{ vm_cpu }}" cores: "{{ vm_cpu }}"
cpu: x86-64-v2-AES cpu: "{{ vm_cpu_model }}"
memory: "{{ vm_ram_gib | int * 1024 }}" memory: "{{ vm_ram_gib | int * 1024 }}"
net: net:
net0: "virtio,bridge={{ vm_vlan }}" net0: "virtio,bridge={{ vm_vlan }}"