[SOLVED] PVE 5.3 and Mikrotik CHR VM 6.41.2: Shutdown issues

cosmos

Well-Known Member
Apr 1, 2013
104
2
58
I've been running a Mikrotik CHR VM version 6.41.2 for some time now, only for the record of using the embedded TheDude network monitoring package. Since I've been having problems with shutting the VM down before taking a backup from PVE, I've been searching for a way to notify the VM. This was not always a problem, problems have started appearing about 1-2 months ago. The error during shutdown is TASK ERROR: VM quit/powerdown failed

This could be accomplished if the VM supported the QEMU Agent. According to https://wiki.mikrotik.com/wiki/Manual:CHR#KVM, CHR VMs do support this feature. However even though my hypervisor (Proxmox 5.3) does support it as well and I've enabled the "Qemu agent" in the respective VM settings, proxmox still can not connect to the Qemu agent on CHR: from the proxmox gui, it is noted that "Guest Agent is not running".

Should I enable the Qemu agent in the CHR VM in some way?

Do note, that trying to use the command to enable chr.provision-agent (which I don't know what it is for, presumably opening a TCP/IP channel for comms? ) works, but then gives an error when I try to bring the VM up...

FYI, VM config is the following (I've added a second disk to hold graphs, data etc):
Code:
agent: 1
balloon: 0
boot: cdn
bootdisk: ide0
cores: 1
ide0: local:106/vm-106-disk-1.qcow2,size=128M
memory: 128
name: thedude.mydomain
net0: virtio=52:XX:XX:XX:XX:XX,bridge=vmbr0
numa: 0
onboot: 1
ostype: l26
scsi0: images:vm-106-disk-1,size=20G
scsihw: pvscsi
smbios1: uuid=94dac97d-18f6-4132-b27f-cbbef3fd315f
sockets: 1

Backup log too:
Code:
2019-01-27 02:10:18 INFO: Starting Backup of VM 106 (qemu)
2019-01-27 02:10:18 INFO: status = running
2019-01-27 02:10:19 INFO: update VM 106: -lock backup
2019-01-27 02:10:19 INFO: backup mode: stop
2019-01-27 02:10:19 INFO: ionice priority: 7
2019-01-27 02:10:19 INFO: VM Name: thedude.mydomain
2019-01-27 02:10:19 INFO: include disk 'ide0' 'local:106/vm-106-disk-1.qcow2' 128M
2019-01-27 02:10:19 INFO: include disk 'scsi0' 'images:vm-106-disk-1' 20G
2019-01-27 02:10:19 INFO: stopping vm
2019-01-27 02:20:20 INFO: VM quit/powerdown failed
2019-01-27 02:20:21 ERROR: Backup of VM 106 failed - command 'qm shutdown 106 --skiplock --keepActive --timeout 600' failed: exit code 255
 
Last edited:
qemu agent was enabled from proxmox gui. However:
Code:
qemu agent 106 ping
fails with a "QEMU agent is not running message".

I can't really understand what should be setup, from what I've read so far the CHR VM has qemu enabled as per the mikrotik wiki here: https://wiki.mikrotik.com/wiki/Manual:CHR#KVM

On that same link are some proxmox specific instructions but I do not understand under which circumstances those are needed (plus, VM startup produced an error with those instructions).
 
Hi,

you have to check inside the VM if the qemu-ga is running.
 
I don't know the Microtik OS so I can't tell you.
If Mikrotik OS use systemd
use
Code:
systemctl status qemu-guest-agent
Also, you can use "ps" to lock if the service is running.
 
Thanks for the response, unfortunately the mikrotik VM hides its Linux shell. Instead it provides a RouterOS command line interface.

As for the Mikrotik OS, I do not know it as well, but I hoped that taking a look at https://wiki.mikrotik.com/wiki/Manual:CHR#KVM could be easily understood by you (it certainly is Greek to me :) ).
 
Answering my own question, 6.41.2 did not support qemu from the looks of it. 6.44 is just fine.
 
I have similar problem with a VM Mikrotik CHR. Sometimes it simply crash. I can't identify nothing relevant on the logs. I can't even shutdown it through the buttons, just forcing it on command line. The CHR it's already up-to-date, v6.44.3. If somebody already passed through this problem, please let me know.
 
I have similar problem with a VM Mikrotik CHR. Sometimes it simply crash. I can't identify nothing relevant on the logs. I can't even shutdown it through the buttons, just forcing it on command line. The CHR it's already up-to-date, v6.44.3. If somebody already passed through this problem, please let me know.
Perhaps you'd like to open a different thread, since the issue here was not related to crashes but rather to the inability to shutdown the 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!