Closed brean closed 6 years ago
Have you tried calling the methods on session.machine
instead of machine
?
Also have you tried create_session(LockType.write)
?
I tried create_session(LockType.write)
which did not work but using session.machine
instead of machine
did the trick. Thank you very much!
I'm glad I was able to help. :)
ENVIRONMENT
master
branch?SUMMARY
I want to create a whole VM from scratch using just python, I don't know how/when to create my medium. When I run attach_device before I register the machine I get "0x80020009 (Cannot attach storage devices to an unregistered machine)" and when I run it after register_machine I get the error message "0x80020009 (The machine is not mutable or running (state is PoweredOff))" although I create and lock a session.
STEPS TO REPRODUCE
Create a new machine, attach storage controller and call machine.attach_device. For my exact code take a look at this as well as this config
EXPECTED RESULTS
I should be able to attach the device somehow either before or after I register the machine.
ACTUAL RESULTS