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.