Shaman doesn't show one VM (solved)

Discussion in 'General Questions' started by SteveITS, Apr 19, 2017.

  1. SteveITS

    SteveITS Tera Poster

    Messages:
    253
    Are there limitations on which VMs can use high availability in Virtuozzo 7? We have a FreeBSD based router (running pfSense). The VZ6 VM showed in "shaman stat" but the newly created VZ7 VM does not. Is it because FreeBSD is not officially supported?

    (The VZ6 VM could not be migrated to a VZ7 node because of the unrecognized OS, so I created a new one with VA 7, choosing CentOS as the guest OS since VZ7 has no "other" choice).
     
  2. Pavel

    Pavel A.I. Auto-Responder Staff Member

    Messages:
    475
    Hello,

    There is no limitation within shaman for OSes, it doesn't matter for HA what is inside of the VM.
    Is VM configured for HA? You can check with following command:

    # prlctl list %VMNAME% -o ha_enable
     
  3. SteveITS

    SteveITS Tera Poster

    Messages:
    253
    It does show there:

    # prlctl list vmname -o ha_enable
    HA_ENABLE
    yes

    However:
    # prlctl set vmname --ha-prio 50
    Unable to commit VM configuration: Failed to perform the operation. An error occurred when managing the cluster resource. Contact your system administrator for assistance.
    Failed to configure the virtual machine.

    Any chance this is because it's still a mixed cluster? (6 and 7)
     
  4. Pavel

    Pavel A.I. Auto-Responder Staff Member

    Messages:
    475
    Mixed cluster should not be a problem. Most likely resource is broken for some reason.
    Can you check if current VM location matches one listed in "shaman stat" ?
     
  5. SteveITS

    SteveITS Tera Poster

    Messages:
    253
    That was my original question... this VM doesn't show in shaman stat. :)
     
  6. Pavel

    Pavel A.I. Auto-Responder Staff Member

    Messages:
    475
    Well, yes... Apparently resource is broken.
    try disabling ha_enable and enabling back.
    If it doesn't we'll have to fix it manually.
     
  7. SteveITS

    SteveITS Tera Poster

    Messages:
    253
    Hi Pavel, it didn't work:

    # prlctl set vmname --ha-enable no
    Unable to commit VM configuration: Failed to perform the operation. An error occurred when managing the cluster resource. Contact your system administrator for assistance.
    Failed to configure the virtual machine.

    # prlctl list vmname -o ha_enable
    HA_ENABLE
    yes
     
  8. SteveITS

    SteveITS Tera Poster

    Messages:
    253
    New info: I looked back though my notes. This was the one "in cluster" hardware node we upgraded from 6 to 7. Several days ago while this VM was off, I did notice the hardware node did not have /vz/vmprivate linked to /pstorage/cluster1/vmprivate (it was a local directory), so I created the link and copied the {UUID} directory into /pstorage/cluster1/vmprivate. The VM started just fine. I am guessing now that is related.

    This is also the node that shows the VZ6 roles in shaman stat (http://forum.odin.com/threads/shaman-stat-roles-reversed.341882/). That may also be related, if it thinks it "shouldn't be able to see" a newer style VM.

    For posterity, I found this KB article but it only talks about containers:
    https://help.virtuozzo.com/customer...ecific-node-shaman-does-not-detect-containers
     
    Last edited: Apr 20, 2017
  9. SteveITS

    SteveITS Tera Poster

    Messages:
    253
    I tried to stop and migrate this VM tonight to see if it would work on another node, and the migration failed. /var/log/messages logged:

    Apr 20 21:58:59 hn4 snmpd[2472]: file .shaman/md.8e577260073948b1/resources/vm-vmname does not exists, try seek it in pool
    Apr 20 21:58:59 hn4 snmpd[2472]: pcs_api_open(.shaman/md.8e577260073948b1/pool/vm-vmname) error : -2

    Some searching got me to https://help.virtuozzo.com/customer...-occurred-when-managing-the-cluster-resource" and that led me to create the missing file /pstorage/cluster1/.shaman/md.8e577260073948b1/resources/vm-vmname.

    Immediately after creating the file, the VM shows in shaman stat and I can set its HA priority and I can migrate it.
     
  10. Pavel

    Pavel A.I. Auto-Responder Staff Member

    Messages:
    475
    Recreating the file manually would've been the next step I'd suggest :)
    Good job on figuring this out.

    Note, there's a chance that this VM still has a duplicate "resource" somewhere in "broken" directory or any other node. Invalid resource.
    To make sure there is no duplicates run find:

    Code:
    # find /pstorage/cluster1/.shaman/ -iname vm-vmname
     
  11. SteveITS

    SteveITS Tera Poster

    Messages:
    253
    Just the one file so I think we're OK. /vstorage/cluster1/.shaman/broken/ is empty.

    Thanks,
     
  12. Pavel

    Pavel A.I. Auto-Responder Staff Member

    Messages:
    475
    Yes, looks good. It could have shown up inside any other hardware node, but since "find" showed just one - you're good to go
     

Share This Page