Hello,
I am trying to create a Proxmox VM template using Packer. However I am getting a Proxmox error saying `Build 'proxmox' errored: Error converting VM to template, could not stop: VM quit/powerdown failed - got timeout`.
According to the Proxmox GUI, the VM produces this error during shutdown (status error) but it has no problems stopping (status OK).
I have tried installing and enabling `qemu-guest-agent` in the preseeding of the Debian OS.
I have tried installing and starting `acpid` and `acpi-support` in the preseeding of the Debian OS.
Thank you for your time. All ideas and suggestions are appreciated.
Here is the Packer file I am trying to build:
{
"builders": [
{
"type": "proxmox",
"proxmox_url": "https://192.111.1.108:8006/api2/json",
"insecure_skip_tls_verify": true,
"username": "root@pam",
"password": "foobar",
"vm_name": "pm-prov",
"vm_id": "200",
"node": "pve",
"os": "l26",
"iso_file": "local:iso/debian-10.4.0-amd64-netinst.iso",
"ssh_username": "root",
"ssh_password": "foobar",
"qemu_agent": false,
"memory": "2048",
"communicator": "none",
"scsi_controller": "virtio-scsi-pci",
"network_adapters": [
{
"model": "virtio",
"bridge": "vmbr0"
}
],
"disks": [
{
"type": "scsi",
"disk_size": "32G",
"storage_pool": "local-lvm",
"storage_pool_type": "lvm"
}
],
"boot_command": [
"<esc><wait>",
"install <wait>",
"preseed/url=preseed_url <wait>",
"debian-installer=en_US.UTF-8 <wait>",
"auto <wait>",
"locale=en_US.UTF-8 <wait>",
"kbd-chooser/method=us <wait>",
"keyboard-configuration/xkb-keymap=us <wait>",
"netcfg/get_hostname=debian_proxmox_hostname <wait>",
"netcfg/get_domain=.local <wait>",
"fb=false <wait>",
"debconf/frontend=noninteractive <wait>",
"console-setup/ask_detect=false <wait>",
"console-keymaps-at/keymap=us <wait>",
"grub-installer/bootdev=/dev/sda <wait>",
"<enter><wait>"
]
}
]
}
Here is the error in the terminal:
2020/06/25 14:35:11 packer-builder-proxmox plugin: [INFO] communicator disabled, will not connect
2020/06/25 14:35:11 packer-builder-proxmox plugin: Unable to load communicator config from state to populate provisionHookData
2020/06/25 14:35:11 packer-builder-proxmox plugin: Running the provision hook
==> proxmox: Stopping VM
2020/06/25 14:38:18 packer-builder-proxmox plugin: Unable to load communicator config from state to populate provisionHookData
==> proxmox: Error converting VM to template, could not stop: VM quit/powerdown failed - got timeout
==> proxmox: Provisioning step had errors: Running the cleanup provisioner, if present...
==> proxmox: Stopping VM
==> proxmox: Deleting VM
2020/06/25 14:38:23 [INFO] (telemetry) ending proxmox
2020/06/25 14:38:23 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2020/06/25 14:38:23 machine readable: proxmox,error []string{"Error converting VM to template, could not stop: VM quit/powerdown failed - got timeout"}
==> Builds finished but no artifacts were created.
Build 'proxmox' errored: Error converting VM to template, could not stop: VM quit/powerdown failed - got timeout
2020/06/25 14:38:23 [INFO] (telemetry) Finalizing.
==> Some builds didn't complete successfully and had errors:
--> proxmox: Error converting VM to template, could not stop: VM quit/powerdown failed - got timeout
==> Builds finished but no artifacts were created.
2020/06/25 14:38:23 waiting for all plugin processes to complete...
2020/06/25 14:38:23 /home/linuxbrew/.linuxbrew/Cellar/packer/1.6.0/bin/packer: plugin process exited
I am trying to create a Proxmox VM template using Packer. However I am getting a Proxmox error saying `Build 'proxmox' errored: Error converting VM to template, could not stop: VM quit/powerdown failed - got timeout`.
According to the Proxmox GUI, the VM produces this error during shutdown (status error) but it has no problems stopping (status OK).
I have tried installing and enabling `qemu-guest-agent` in the preseeding of the Debian OS.
I have tried installing and starting `acpid` and `acpi-support` in the preseeding of the Debian OS.
Thank you for your time. All ideas and suggestions are appreciated.
Here is the Packer file I am trying to build:
{
"builders": [
{
"type": "proxmox",
"proxmox_url": "https://192.111.1.108:8006/api2/json",
"insecure_skip_tls_verify": true,
"username": "root@pam",
"password": "foobar",
"vm_name": "pm-prov",
"vm_id": "200",
"node": "pve",
"os": "l26",
"iso_file": "local:iso/debian-10.4.0-amd64-netinst.iso",
"ssh_username": "root",
"ssh_password": "foobar",
"qemu_agent": false,
"memory": "2048",
"communicator": "none",
"scsi_controller": "virtio-scsi-pci",
"network_adapters": [
{
"model": "virtio",
"bridge": "vmbr0"
}
],
"disks": [
{
"type": "scsi",
"disk_size": "32G",
"storage_pool": "local-lvm",
"storage_pool_type": "lvm"
}
],
"boot_command": [
"<esc><wait>",
"install <wait>",
"preseed/url=preseed_url <wait>",
"debian-installer=en_US.UTF-8 <wait>",
"auto <wait>",
"locale=en_US.UTF-8 <wait>",
"kbd-chooser/method=us <wait>",
"keyboard-configuration/xkb-keymap=us <wait>",
"netcfg/get_hostname=debian_proxmox_hostname <wait>",
"netcfg/get_domain=.local <wait>",
"fb=false <wait>",
"debconf/frontend=noninteractive <wait>",
"console-setup/ask_detect=false <wait>",
"console-keymaps-at/keymap=us <wait>",
"grub-installer/bootdev=/dev/sda <wait>",
"<enter><wait>"
]
}
]
}
Here is the error in the terminal:
2020/06/25 14:35:11 packer-builder-proxmox plugin: [INFO] communicator disabled, will not connect
2020/06/25 14:35:11 packer-builder-proxmox plugin: Unable to load communicator config from state to populate provisionHookData
2020/06/25 14:35:11 packer-builder-proxmox plugin: Running the provision hook
==> proxmox: Stopping VM
2020/06/25 14:38:18 packer-builder-proxmox plugin: Unable to load communicator config from state to populate provisionHookData
==> proxmox: Error converting VM to template, could not stop: VM quit/powerdown failed - got timeout
==> proxmox: Provisioning step had errors: Running the cleanup provisioner, if present...
==> proxmox: Stopping VM
==> proxmox: Deleting VM
2020/06/25 14:38:23 [INFO] (telemetry) ending proxmox
2020/06/25 14:38:23 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2020/06/25 14:38:23 machine readable: proxmox,error []string{"Error converting VM to template, could not stop: VM quit/powerdown failed - got timeout"}
==> Builds finished but no artifacts were created.
Build 'proxmox' errored: Error converting VM to template, could not stop: VM quit/powerdown failed - got timeout
2020/06/25 14:38:23 [INFO] (telemetry) Finalizing.
==> Some builds didn't complete successfully and had errors:
--> proxmox: Error converting VM to template, could not stop: VM quit/powerdown failed - got timeout
==> Builds finished but no artifacts were created.
2020/06/25 14:38:23 waiting for all plugin processes to complete...
2020/06/25 14:38:23 /home/linuxbrew/.linuxbrew/Cellar/packer/1.6.0/bin/packer: plugin process exited