XCP-ng

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Shutting down "Protect from accidental shutdown" VMs from command line

    Xen Orchestra
    1
    1
    433
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z
      Zevgeny last edited by

      Hi, yesterday I got myself into a silly predicament when the VM I was using to run Xen Orchestra got stuck during its shutdown. It had been set to block accidental shutdowns, so I was unable to force shutdown using XCP-NG Centre, or the regular shutdown command on CLI. As far as I can tell, XCP-NG Centre is unable to toggle the "protect from accidental shutdown" setting, so I was pretty much stuck.

      Google search turned up this thread:
      https://xcp-ng.org/forum/topic/3885/cli-ssh-delete-vms-that-were-set-as-protect-from-accidental-deletion-in-xo

      There's a post in there that mentioned "xe vm-param-cleaner", but that command doesnt exist.

      As a guess, I tried this command instead, and it was able to clear the setting so I could do a force shutdown from command line:

      xe vm-param-clear uuid=<vm_uuid> param-name=blocked-operations
      

      Just posting this as a reference for future generations.

      Maybe there should be a CLI command for "really force shutdown like I really really mean it", that ignores the "Protect" setting? With a confirmation prompt or something?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post