I am trying to start a vm in paused mode, but running into issues. I'm able to connect to the API and start vms normally, but I cannot seem to get the params part right for staring paused.

In this example, vm is the virtual machine object obtained from the api with the vm in question.

from ovirtsdk.xml import params

vm.start(params.Action.set_pause()) This gives me a "TypeError: unbound method set_pause() must be called with Action instance as first argument (got nothing instead)"

self.vm.start(params.Action.set_pause(pause=True)) This gets me the same thing.


For future searches. I found the answer. I was setting the flag correctly, but I never pushed the update, so the flag would never actually set.


The important part. This triggers the update in ovirt. You will actually see an entry in events.

self.vm.start() # This will power on the vm in it's paused state.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.