Open steveDecot opened 3 weeks ago
Anyone can help me please ?
@steveDecot this could be that the QEMU agent (package qemu-guest-agent
) isn't installed and running on the build guest. VM shutdowns in Proxmox rely on the agent to initiate a soft shutdown of the OS rather than a Power Off (hard stop).
A Ctrl+C during a packer build executes a Power Off (hard stop) which doesn't wait for the OS to signal that it's shut down.
@mpywell Hi ! Thx for answer me ! :) I've this on my ks file
`%post dnf install -y qemu-guest-agent systemctl enable qemu-guest-agent %end
reboot --eject`
The machine reboot correctly and I check the logs
2024/10/18 21:25:35 packer-plugin-proxmox_v1.2.1_x5.0_linux_amd64 plugin: 2024/10/18 21:25:35 [DEBUG] Error getting SSH address: 500 QEMU guest agent is not running 2024/10/18 21:25:40 packer-plugin-proxmox_v1.2.1_x5.0_linux_amd64 plugin: 2024/10/18 21:25:40 [DEBUG] Error getting SSH address: 500 QEMU guest agent is not running 2024/10/18 21:25:45 packer-plugin-proxmox_v1.2.1_x5.0_linux_amd64 plugin: 2024/10/18 21:25:45 [DEBUG] Error getting SSH address: 500 QEMU guest agent is not running 2024/10/18 21:25:50 packer-plugin-proxmox_v1.2.1_x5.0_linux_amd64 plugin: 2024/10/18 21:25:50 [DEBUG] Error getting SSH address: 500 QEMU guest agent is not running 2024/10/18 21:25:55 packer-plugin-proxmox_v1.2.1_x5.0_linux_amd64 plugin: 2024/10/18 21:25:55 [DEBUG] Error getting SSH address: 500 QEMU guest agent is not running 2024/10/18 21:26:00 packer-plugin-proxmox_v1.2.1_x5.0_linux_amd64 plugin: 2024/10/18 21:26:00 [DEBUG] Error getting SSH address: 500 QEMU guest agent is not running 2024/10/18 21:26:05 ui error: Cancelling build after receiving interrupt 2024/10/18 21:26:05 Cancelling builder after context cancellation context canceled 2024/10/18 21:26:05 packer-plugin-proxmox_v1.2.1_x5.0_linux_amd64 plugin: 2024/10/18 21:26:05 Received interrupt signal (count: 1). Ignoring. 2024/10/18 21:26:05 packer-plugin-proxmox_v1.2.1_x5.0_linux_amd64 plugin: 2024/10/18 21:26:05 [WARN] Interrupt detected, quitting waiting for SSH. 2024/10/18 21:26:05 packer-plugin-proxmox_v1.2.1_x5.0_linux_amd64 plugin: 2024/10/18 21:26:05 [DEBUG] SSH wait cancelled. Exiting loop. 2024/10/18 21:26:05 ui: ==> rocky-linux-with-ks.proxmox.rocky-linux: Stopping VM 2024/10/18 21:26:07 ui: ==> rocky-linux-with-ks.proxmox.rocky-linux: Deleting VM 2024/10/18 21:26:09 [INFO] (telemetry) ending proxmox.rocky-linux 2024/10/18 21:26:09 ui error: Build 'rocky-linux-with-ks.proxmox.rocky-linux' errored after 18 minutes 6 seconds: build was cancelled 2024/10/18 21:26:09 ui: ==> Wait completed after 18 minutes 6 seconds
I think it's my nic card is not correctly enabled or qemu issues .
I will try and tell you
So I tried, qemu was installed through ksfile.cfg correctly. I've this ` rocky-linux-with-ks.proxmox.rocky-linux: output will be in this color.
==> rocky-linux-with-ks.proxmox.rocky-linux: Creating VM ==> rocky-linux-with-ks.proxmox.rocky-linux: No VM ID given, getting next free from Proxmox ==> rocky-linux-with-ks.proxmox.rocky-linux: Starting VM ==> rocky-linux-with-ks.proxmox.rocky-linux: Starting HTTP server on port 8098 ==> rocky-linux-with-ks.proxmox.rocky-linux: Waiting 1m0s for boot ==> rocky-linux-with-ks.proxmox.rocky-linux: Typing the boot command ==> rocky-linux-with-ks.proxmox.rocky-linux: Waiting for SSH to become available... ==> rocky-linux-with-ks.proxmox.rocky-linux: Connected to SSH! ==> rocky-linux-with-ks.proxmox.rocky-linux: Stopping VM ==> rocky-linux-with-ks.proxmox.rocky-linux: Error converting VM to template, could not stop: can't lock file '/var/lock/qemu-server/lock-104.conf' - got timeout ==> rocky-linux-with-ks.proxmox.rocky-linux: Provisioning step had errors: Running the cleanup provisioner, if present... ==> rocky-linux-with-ks.proxmox.rocky-linux: Stopping VM ==> rocky-linux-with-ks.proxmox.rocky-linux: Error stopping VM. Please stop and delete it manually: can't lock file '/var/lock/qemu-server/lock-104.conf' - got timeout Build 'rocky-linux-with-ks.proxmox.rocky-linux' errored after 18 minutes 16 seconds: Error converting VM to template, could not stop: can't lock file '/var/lock/qemu-server/lock-104.conf' - got timeout
==> Wait completed after 18 minutes 16 seconds
==> Some builds didn't complete successfully and had errors: --> rocky-linux-with-ks.proxmox.rocky-linux: Error converting VM to template, could not stop: can't lock file '/var/lock/qemu-server/lock-104.conf' - got timeout
==> Builds finished but no artifacts were created.`
Same error. Qemu seems ok. Why I've this lock file ? From console remote, I see this
Hi !
I found the problem,
In my ks.cfg file, I disable acpi ! --> acpi=off
This command create my issue, even the shutdown command was stuck in the same way than packer
I remove them and it's work fine !
Have nice day !
Hi everyone !
I' ve issues with packer and my proxmox cluster.
I would like create a Rocky Linux 9.4 template for starting. After that the idea is to use Terraform with this template. I'm stuck on packer step. This is the permissions through my token
Code:
My packer version Code:
I've my kickstart file in http dir and my variables.pkvars.hcl. Everything is fine exept at the end, especially on stopping VM for create the template.
On pve side I've this
Code:
and on packer side
Code:
rocky-linux-with-ks.proxmox.rocky-linux: output will be in this color.
==> rocky-linux-with-ks.proxmox.rocky-linux: Creating VM ==> rocky-linux-with-ks.proxmox.rocky-linux: No VM ID given, getting next free from Proxmox ==> rocky-linux-with-ks.proxmox.rocky-linux: Starting VM ==> rocky-linux-with-ks.proxmox.rocky-linux: Starting HTTP server on port 8098 ==> rocky-linux-with-ks.proxmox.rocky-linux: Waiting 15s for boot ==> rocky-linux-with-ks.proxmox.rocky-linux: Typing the boot command ==> rocky-linux-with-ks.proxmox.rocky-linux: Waiting for SSH to become available... ==> rocky-linux-with-ks.proxmox.rocky-linux: Connected to SSH! ==> rocky-linux-with-ks.proxmox.rocky-linux: Stopping VM ==> rocky-linux-with-ks.proxmox.rocky-linux: Error converting VM to template, could not stop: VM quit/powerdown failed ==> rocky-linux-with-ks.proxmox.rocky-linux: Provisioning step had errors: Running the cleanup provisioner, if present... ==> rocky-linux-with-ks.proxmox.rocky-linux: Stopping VM ==> rocky-linux-with-ks.proxmox.rocky-linux: Deleting VM Build 'rocky-linux-with-ks.proxmox.rocky-linux' errored after 8 minutes 13 seconds: Error converting VM to template, could not stop: VM quit/powerdown failed
I tried
I think the problem is on the templating phase. I check the new version of code here : https://github.com/hashicorp/packer-plugin-proxmox/blob/main/docs/builders/iso.mdx . But elements are missing ( like iso_storage_pool , umount_iso ... ) Do you have any ideas please ?