Error: error from PVE: "500 QEMU guest agent is not running"

csm310599

New Member
Jun 29, 2022
11
1
3
Hi everyone, I've several days trying to deploy a virtual machine and I'm stuck with this:
1. First I make a template by executing the following commands:

Code:
  qm create 9002 --memory 3072 --net0 virtio,bridge=vmbr1
  qm importdisk 9002 debian-11-generic-amd64-20210814-734.qcow2 R51_3-17
  qm set 9002 --scsihw virtio-scsi-pci --scsi0 R51_3-17:vm-9002-disk-0
  qm set 9002 --ide2 R51_3-17:cloudinit
  qm set 9002 --bot c --bootdisk scsi0
  qm set 9002 --boot c --bootdisk scsi0
  qm set 9002 --serial0 socket --vga serial0
  qm template 9002

(I don't know if is the best way because I'm brand new at this)

2. Then I'm trying to deploy a vritual machine with the new template using terraform
But always crashes with this error:

Code:
proxmox_vm_qemu.test_VM[0]: Still creating... [7m0s elapsed]
proxmox_vm_qemu.test_VM[0]: Still creating... [7m10s elapsed]
proxmox_vm_qemu.test_VM[0]: Still creating... [7m20s elapsed]
proxmox_vm_qemu.test_VM[0]: Still creating... [7m30s elapsed]
proxmox_vm_qemu.test_VM[0]: Still creating... [7m40s elapsed]
proxmox_vm_qemu.test_VM[0]: Still creating... [7m50s elapsed]
proxmox_vm_qemu.test_VM[0]: Still creating... [8m0s elapsed]
╷
│ Error: error from PVE: "500 QEMU guest agent is not running"
│ , QEMU Agent is enabled in you configuration but non installed/not working on your vm
│
│   with proxmox_vm_qemu.test_VM[0],
│   on main.tf line 19, in resource "proxmox_vm_qemu" "test_VM":
│   19:   resource "proxmox_vm_qemu" "test_VM" {



Why? in the settings I have qmagent enabled https://imgur.com/a/mezDsmZ

I have doubts with qemu agent, does it have to be installed on the machine that is being deployed? or in proxmox server?
I have tried to do the same with packer and it fails with the same error.

I have seen that libguestfs-tools allows to insert qemu-guest-agent in the image, should I use this?


thanks
 
you have to install the guest agent on the VM. Please have a look at our documentation, section 10.2.17. Qemu Guest Agent
 
you have to install the guest agent on the VM. Please have a look at our documentation, section 10.2.17. Qemu Guest Agent
but if I want to automate the whole process of deploying virtual machines, how can I do this? because according to the documentation it modifies it when the machine is already created
 
I'm not sure what you mean by "it modifies it", but why not install the guest agent on the template?
 
Before you make it a template, boot the VM and install the guest agent using the method described in our docs.
If you want to use your existing template, that's not possible. But you can clone the template (that makes it a VM again), install it there, and make a template out of the new VM.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!