Code: Select all
@echo off
set VMNAME=WinXP
set VMNAMESNAP=WinXP_Restore
set PATH=%PATH%;"c:\Program Files\Oracle\VirtualBox"
echo Powerering VM off...
VBoxManage controlvm %VMNAME% poweroff
timeout /t 10 /nobreak
echo Restoring snapshot...
VBoxManage snapshot %VMNAME% restore %VMNAMESNAP%
echo Turning VM on...
VBoxManage startvm %VMNAME%
timeout /t 5
Code: Select all
VBoxManage.exe: error: Could not find a registered machine named 'WinXP'
VBoxManage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee IUnknown
Context: "FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 97 of file VBoxManageControlVM.cpp
Code: Select all
VBoxManage.exe: error: Could not find a registered machine named 'd:\Virtual Box VMs\WinXP\WinXP.vbox'
VBoxManage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee IUnknown
Context: "FindMachine(Bstr(a->argv[0]).raw(), machine.asOutParam())" at line 97 of file VBoxManageControlVM.cpp
Does anyone have an idea how to solve this problem?