0

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.

1 Answer 1

0

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.

self.vm.set_start_paused('true')

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

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.