I can get everything in my code to work until it hits the IConsole:PowerUp
Code: Select all
var vmName = TextBox.Text;
var vBox = new VirtualBoxClass();
var vm = vBox.FindMachine(vmName);
String[] arr;
Session session = new SessionClass();
vm.LockMachine(session, LockType.LockType_Write);
var console = session.Console;
var snap = vm.FindSnapshot("Base");
var progressSnap = console.RestoreSnapshot(snap);
progressSnap.WaitForCompletion(-1);
--->var progStart = console.PowerUp();<---
progStart.WaitForCompletion(5000);
var state = vm.State.ToString();
state = vm.SessionState.ToString();
var progStop = console.PowerDown();
progStop.WaitForCompletion(5000);
Code: Select all
An unhandled exception of type 'System.StackOverflowException' occurred in VBoxWPF.exe
Another issue I am having is with the vBoxManager.exe.
when I try to copyto in the command line it always errors no matter what the destination is:
Code: Select all
VBoxManage.exe: error: Querying directory existence \"C:\\\" failed: VERR_TIMEOUT.\r\n