Hello There,

I have VM called Win 11 and I create snapshot called "Snapshot1". Then I create 
python file to restore the VM through python script. I got error I can'y 
understand what is it. I search on internet  since three day I don't found  
solution . I tried many example But I got the same error. The error is


"

AttributeError: Failed to find attribute restoreSnapshot in win 8.1
"


My python script is : \



import virtualbox
import time
from virtualbox.library import LockType
vbox = virtualbox.VirtualBox()
session = virtualbox.Session()
vm = vbox.find_machine('win 8.1')
vm.lock_machine(session, LockType.shared)
console = session.console;
machine = session.machine


snapShot = vm.find_snapshot("snapshot 1");

snapShotProgress = machine.restore_snapshot(snapShot);
snapShotProgress.WaitForCompletion(300000);

session.unlock_machine()


Can Any help me and explain to me which is the problem. I snapshot is created 
and the Vm is run correctly. but I cannot restore the snapshot through python.



_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev

Reply via email to