Possible to use "xo-cli vm.set blockedOperarations=<object>"?
-
I'm looking for a way to turn off blocking VM suspend without blocking VM stop. I see from
xo-cli --list-commandsthat there is avm.setdescribed as:vm.set id=<string> [blockedOperations=<object>]I have, so far, been unable to figure out what to pass to blockedOperations to have it change a value. Not sure what it means by <object>.
Passing a json string to it doesn't seem to work. I get an error that it must be an object.
I believe I was able to blow away all blocked operations by passing nothing as that arg but I don't want to remove all of it, just the suspend. I realize that when wanting to block
stopit makes sense to also blocksuspendbecause they, in essence, have the same result. I was hoping to extract an existing object from the vm properties, turn offsuspend, then pass that object back tovm.set. Is my quest hopeless? -
@CodeMercenary Non-string values must be passed as JSON with
xo-cli:xo-cli vm.set id=$id blockedOperations=json:'{ "clean_shutdown": "blocked by Julien" }'Also, entries passed to
blockedOperationsare merged with existing ones, if want to remove some entries, passednullas their values. -
Pinging @julien-f
-
@CodeMercenary Non-string values must be passed as JSON with
xo-cli:xo-cli vm.set id=$id blockedOperations=json:'{ "clean_shutdown": "blocked by Julien" }'Also, entries passed to
blockedOperationsare merged with existing ones, if want to remove some entries, passednullas their values. -
@julien-f Thank you, that's super helpful and even easier than I thought it would be.
-
O olivierlambert marked this topic as a question on
-
O olivierlambert has marked this topic as solved on