Closed ghost closed 7 years ago
Hi, I'm having a hard time restoring a machine from a snapshot. This is one of the many things that I've tried, and this has gotten me the closest:
`import virtualbox
vm = virtualbox.VirtualBox().find_machine('test') vm.restoreSnapshot()`
but then I get the error: AttributeError: 'IMachine' object has no attribute 'restoreSnapshot'
AttributeError: 'IMachine' object has no attribute 'restoreSnapshot'
and by reading this page on the documentation (https://www.virtualbox.org/sdkref/interface_i_machine.html#a5b696740ceccb14750718e2648d6928c) it seems as though iMachine does have an attribute of restoreSnapshot. Any ideas?
You can't use it directly on a machine, you have to use it from a session. Check out MachinePool in pool.py for an example.
pool.py
Hi, I'm having a hard time restoring a machine from a snapshot. This is one of the many things that I've tried, and this has gotten me the closest:
`import virtualbox
vm = virtualbox.VirtualBox().find_machine('test') vm.restoreSnapshot()`
but then I get the error:
AttributeError: 'IMachine' object has no attribute 'restoreSnapshot'
and by reading this page on the documentation (https://www.virtualbox.org/sdkref/interface_i_machine.html#a5b696740ceccb14750718e2648d6928c) it seems as though iMachine does have an attribute of restoreSnapshot. Any ideas?