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

Discussion in 'Proxmox VE: Installation and configuration' started by cosmos, Jan 30, 2019.

  1. cosmos

    cosmos Member

    Joined:
    Apr 1, 2013
    Messages:
    82
    Likes Received:
    1
    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
    
     
    #1 cosmos, Jan 30, 2019
    Last edited: Jan 30, 2019
  2. cosmos

    cosmos Member

    Joined:
    Apr 1, 2013
    Messages:
    82
    Likes Received:
    1
    (bump) fellas, someone?
     
  3. sb-jw

    sb-jw Active Member

    Joined:
    Jan 23, 2018
    Messages:
    445
    Likes Received:
    37
  4. cosmos

    cosmos Member

    Joined:
    Apr 1, 2013
    Messages:
    82
    Likes Received:
    1
    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).
     
  5. wolfgang

    wolfgang Proxmox Staff Member
    Staff Member

    Joined:
    Oct 1, 2014
    Messages:
    4,697
    Likes Received:
    310
    Hi,

    you have to check inside the VM if the qemu-ga is running.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. cosmos

    cosmos Member

    Joined:
    Apr 1, 2013
    Messages:
    82
    Likes Received:
    1
    Sorry for the delay, just read this. How can I check it?
     
  7. wolfgang

    wolfgang Proxmox Staff Member
    Staff Member

    Joined:
    Oct 1, 2014
    Messages:
    4,697
    Likes Received:
    310
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. cosmos

    cosmos Member

    Joined:
    Apr 1, 2013
    Messages:
    82
    Likes Received:
    1
    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 :) ).
     
  9. cosmos

    cosmos Member

    Joined:
    Apr 1, 2013
    Messages:
    82
    Likes Received:
    1
    Answering my own question, 6.41.2 did not support qemu from the looks of it. 6.44 is just fine.
     
  10. Thales Moises

    Thales Moises New Member

    Joined:
    Friday
    Messages:
    2
    Likes Received:
    0
    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.
     
  11. cosmos

    cosmos Member

    Joined:
    Apr 1, 2013
    Messages:
    82
    Likes Received:
    1
    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.
     
  12. Thales Moises

    Thales Moises New Member

    Joined:
    Friday
    Messages:
    2
    Likes Received:
    0
    Ok, i'll try it, thanks!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice