@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.
Best posts made by bobafetthotmail
-
RE: CLI/SSH delete VMs that were set as "Protect from accidental deletion" in XO
Latest posts made by bobafetthotmail
-
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.0And I have XCP-ng at 8.2 and updated packages with yum upgrade.
-
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 -
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. -
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.