XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. bobafetthotmail
    3. Posts
    B
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 4
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: CLI/SSH delete VMs that were set as "Protect from accidental deletion" in XO

      @olivierlambert That key is added (or removed) as part of this block of keys

      blocked-operations (MRW): (unknown operation): true; hard_reboot: true; pause: true; suspend: true; hard_shutdown: true; clean_reboot: true; clean_shutdown: true
      

      when I click on the "Protect from accidental shutdown" switch in the Advanced settings of the VM in Xen Orchestra.

      From the version page in XO I see
      xo-server 5.71.1
      xo-web 5.75.0

      And I have XCP-ng at 8.2 and updated packages with yum upgrade.

      posted in Xen Orchestra
      B
      bobafetthotmail
    • RE: CLI/SSH delete VMs that were set as "Protect from accidental deletion" in XO

      @olivierlambert what is a "weird key" here?
      that entry was populated (or cleaned) by clicking on the "Protect from accidental deletion" and "Protect from accidental shutdown" switches in XO on a source build (in a Debian VM) with latest XCP-ng 8.2

      posted in Xen Orchestra
      B
      bobafetthotmail
    • RE: CLI/SSH delete VMs that were set as "Protect from accidental deletion" in XO

      @jedimarcus I just used xe vm-param-set to set all the entries in that parameter as false, I didn't see that there is also xe vm-param-cleaner.
      That works and solves the question, thank you.

      posted in Xen Orchestra
      B
      bobafetthotmail
    • CLI/SSH delete VMs that were set as "Protect from accidental deletion" in XO

      I have seen that in XO, in the VM advanced settings tab I can flip some switches like "Protect from accidental deletion" and "Protect from accidental shutdown".
      This will be reflected in the VM's settings with the "blocked-operations"

      blocked-operations (MRW): (unknown operation): true; suspend: true; hard_shutdown: true; clean_shutdown: true; clean_reboot: true; pause: true; hard_reboot: true; destroy: true
      

      I've tried editing that with xe vm-param-set from SSH connection to the XCP-ng server but even if I set all of them as false I can't shut down the VM or delete it and I only get an error message

      You attempted an operation that was explicitly blocked (see the blocked_operations field of the given object).
      

      Now, I know that I can just flip the switch again from XO and it will remove these locks, then I can delete it from XO or with xe vm-uninstall uuid=<whatever> through CLI

      I was just wondering about how to disable these locks from command line, because I assume the command line interface can do it too, but I didn't find anything about that in the docs.

      posted in Xen Orchestra
      B
      bobafetthotmail