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-commands
that there is avm.set
described 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
stop
it makes sense to also blocksuspend
because 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
blockedOperations
are merged with existing ones, if want to remove some entries, passednull
as 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
blockedOperations
are merged with existing ones, if want to remove some entries, passednull
as their values. -
@julien-f Thank you, that's super helpful and even easier than I thought it would be.
-
-