Restoring snapshot in Java - Exception 0x800706be (and others, see post)

Discussions related to using VirtualBox on Windows hosts.
Post Reply
debugs-bunny
Posts: 6
Joined: 12. Jun 2017, 17:30

Restoring snapshot in Java - Exception 0x800706be (and others, see post)

Post by debugs-bunny »

Hi,

I'm using the VirtualBox Java API (Version VirtualBoxSDK-5.1.22-115126) on a Windows Host with the VirtualBox Web Service (VBoxWebSrv.exe).

I wrote a method to restore a certain snapshot for a given machine.

Most times it works, but sometimes I get the exception with the error code 0x800706be when I call IProgress.waitForCompletion() after I called IMachine.restoreSnapshot().

The affected lines:

Code: Select all

[...]
	progress = session.getMachine().restoreSnapshot(snapshot);
	progress.waitForCompletion(20000); // <- Here the exception occurs
[...]
The full stack trace:

Code: Select all

org.virtualbox_5_1.VBoxException: VirtualBox error: rc=0x800706be
	at org.virtualbox_5_1.IProgress.waitForCompletion(IProgress.java:531)
	at VboxApiVmCtrl.restoreSnap(VboxApiVmCtrl.java:654)
	at Main.main(Main.java:79)
Caused by: org.virtualbox_5_1.jaxws.RuntimeFaultMsg: VirtualBox error: rc=0x800706be
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:135)
	at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(StubHandler.java:238)
	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:189)
	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:276)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:104)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
	at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
	at com.sun.proxy.$Proxy35.iProgressWaitForCompletion(Unknown Source)
	at org.virtualbox_5_1.IProgress.waitForCompletion(IProgress.java:523)
	... 2 more
Here is the full code of my method:

(The method first stops the machine, then restores the snapshot and then starts the machine again.)

Code: Select all

	public boolean restoreSnap(String vmUid, String snapUid) {

		// get Session
		ISession session = mgr.getSessionObject();

		try {

			// get VM
			IMachine vm = mgr.getVBox().findMachine(vmUid);

			// Lock VM to Session
			vm.lockMachine(session, LockType.Shared); // >>> LOCKED!

			// get Console to manage the VM
			IConsole console = session.getConsole();

			IProgress progress = null;

			// -------------- STOP MACHINE (IF RUNNING) --------------

			System.out.println("TRY TO STOP THE MACHINE...");

			// Console is NULL, if Machine is not running
			if (console != null) {

				// Stop machine
				progress = console.powerDown();
				progress.waitForCompletion(20000);
			} else {
				System.out.println("MACHINE NOT RUNNING.");
			}

			// -------------- RESTORE SNAPSHOT --------------

			// get Snapshot by UUID
			ISnapshot snapshot = vm.findSnapshot(snapUid);

			System.out.println("TRY TO RESTORE SNAPSHOT: " + snapshot.getName());

			progress = session.getMachine().restoreSnapshot(snapshot);
			progress.waitForCompletion(20000); // <- Here: ERROR 0x800706be

			// Wait until session isn't locked else -> else BUSY excpetion when try to start.
			int waitCount = 0;
			while (session.getState() == SessionState.Locked && (waitCount < 10)) {
				waitMs(150); // wait 150 ms
				waitCount++;
			}

			// -------------- START VM --------------

			// start machine if it is not running
			if (vm.getState() != MachineState.Running) {

				// UNLOCK IF SESSION IS LOCKED
				if (session.getState() == SessionState.Locked) {
					System.out.println("SESSION LOCKED -> UNLOCK...");
					session.unlockMachine();
				}

				// WAIT...
				waitCount = 0;
				while (vm.getSessionState() == SessionState.Locked && (waitCount < 10)) {
					waitMs(150); // wait 150 ms
					waitCount++;
				}

				System.out.println("STARTING MACHINE...");

				// Without waiting, here occurs :
				// org.virtualbox_5_1.VBoxException: VirtualBox error: rc=0x80bb0007 The given session is busy
				progress = vm.launchVMProcess(session, "gui", "");
				progress.waitForCompletion(20000);

				return true;
			} else {
				System.out.println("MACHINE IS ALREADY RUNNING. DON'T START...");
			}

		} catch (VBoxException e) {
			printErrorInfo(e); // Method that prints some error infos
			e.printStackTrace();
		} finally {

			// After everything is done, unlock session.

			System.out.println("TRY TO UNLOCK SESSION...");

			if (session.getState() == SessionState.Locked) {

				// Unlock
				System.out.println("Unlock Machine from Session.");
				session.unlockMachine(); // UNLOCK!!!! <<<<<<<<<<<<
				System.out.println("Session State: " + session.getState());
			} else {
				System.out.println("DON'T UNLOCK, BECAUSE SESSION IS NOT LOCKED.");
			}
		}

		return false;
	}

I put the wait-loops in there, because without them I received other exceptions.

The guest machine with which I'm testing the method is a Windows 7 machine.


I would be really happy, if someone could help me! :)
Last edited by debugs-bunny on 29. Jun 2017, 17:30, edited 1 time in total.
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Restoring snapshot in Java - Exception 0x800706be

Post by noteirak »

It seems you print out more error info on top of the stacktrace, I'm guessing like the actual error message. Please provide those too, as the error code is COM generic, so we need to know what's happening exactly.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
debugs-bunny
Posts: 6
Joined: 12. Jun 2017, 17:30

Re: Restoring snapshot in Java - Exception 0x800706be

Post by debugs-bunny »

Hi,

I took the printErrorInfo() method from the in the SDK provided Java example.

This is the method:

Code: Select all

	private void printErrorInfo(VBoxException e) {

		System.out.println();

		System.out.println("-------------------- ERROR INFOS --------------------");

		System.out.println();

		System.out.println("VBox error: " + e.getMessage());
		System.out.println("Error cause message: " + e.getCause());
		System.out.println("Overall result code: " + Integer.toHexString(e.getResultCode()));
		int i = 1;
		for (IVirtualBoxErrorInfo ei = e.getVirtualBoxErrorInfo(); ei != null; ei = ei.getNext(), i++) {
			System.out.println("Detail information #" + i);
			System.out.println("Error mesage: " + ei.getText());
			System.out.println("Result code:  " + Integer.toHexString(ei.getResultCode()));
			// optional, usually provides little additional information:
			System.out.println("Component:    " + ei.getComponent());
			System.out.println("Interface ID: " + ei.getInterfaceID());
		}

		System.out.println("-----------------------------------------------------");

		System.out.println();
	}


============================================================================
Error 1 (0x800706be) (the error for which I created this post. 2 other, new errors are further below.)
============================================================================



This is the printed info you asked for:

Code: Select all

-------------------- ERROR INFOS --------------------

VBox error: VirtualBox error: rc=0x800706be
Error cause message: org.virtualbox_5_1.jaxws.RuntimeFaultMsg: VirtualBox error: rc=0x800706be
Overall result code: 800706be
-----------------------------------------------------

oh, and i saw, that in the VBoxWebSrv.exe Log also a message appeared:

Code: Select all

00:03:22.365886 SQPmp    Request 443 on socket 1280 queued for processing (1 items on Q)
00:03:22.372887 SQW02    Processing connection from IP=127.0.0.1 socket=1280 (1 out of 2 threads idle)
00:03:24.321134 SQW02    API method name:            IProgress::WaitForCompletion
00:03:24.333136 SQW02    API return code:            0x800706be (RPC_S_CALL_FAILED 0x800706BE)
and another one from the VBoxWebSrv.exe Log, that was a little different to the previous one:

Code: Select all

00:23:29.782623 SQPmp    Request 3993 on socket 2472 queued for processing (1 items on Q)
00:23:29.786624 SQW01    Processing connection from IP=127.0.0.1 socket=2472 (1 out of 3 threads idle)
00:23:32.319445 SQW01    API method name:            IProgress::WaitForCompletion
00:23:32.335447 SQW01    API return code:            0x800706be (RPC_S_CALL_FAILED 0x800706BE)
00:23:32.381453 SQPmp    Request 3994 on socket 2472 queued for processing (1 items on Q)
00:23:32.385954 SQW02    Processing connection from IP=127.0.0.1 socket=2472 (2 out of 3 threads idle)
00:23:32.389454 SQPmp    Request 3995 on socket 2472 queued for processing (1 items on Q)
00:23:32.392455 SQW02    Processing connection from IP=127.0.0.1 socket=2472 (2 out of 3 threads idle)
00:23:32.397455 SQPmp    Request 3996 on socket 2472 queued for processing (1 items on Q)
00:23:32.399956 SQW01    Processing connection from IP=127.0.0.1 socket=2472 (2 out of 3 threads idle)
00:23:32.404956 SQPmp    Request 3997 on socket 2472 queued for processing (1 items on Q)
00:23:32.407456 SQW01    Processing connection from IP=127.0.0.1 socket=2472 (2 out of 3 threads idle)
00:23:45.089687 VBoxSVCWatcher VirtualBoxClient: detected unresponsive VBoxSVC (rc=RPC_S_SERVER_UNAVAILABLE 0x800706BA)
00:23:45.094687 VBoxSVCWatcher VBoxSVC became unavailable
00:24:16.880505 VBoxSVCWatcher VirtualBoxClient: detected working VBoxSVC (rc=ERROR_SUCCESS)
00:24:16.883506 VBoxSVCWatcher VBoxSVC became available


============================================================================
Error 2 (0x80070005) (occured during the tests)
============================================================================



During the tests to reproduce error 1 I had another error.

It occured in the line:

Code: Select all

   progress = session.getMachine().restoreSnapshot(snapshot)
The stack trace of this error:

Code: Select all

org.virtualbox_5_1.VBoxException: VirtualBox error: rc=0x80070005 The object is not ready (0x80070005)
	at org.virtualbox_5_1.IMachine.restoreSnapshot(IMachine.java:6935)
	at VboxApiVmCtrl.restoreSnap(VboxApiVmCtrl.java:652)
	at Main.main(Main.java:79)
Caused by: org.virtualbox_5_1.jaxws.RuntimeFaultMsg: VirtualBox error: rc=0x80070005 The object is not ready (0x80070005)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:135)
	at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(StubHandler.java:238)
	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:189)
	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:276)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:104)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
	at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
	at com.sun.proxy.$Proxy35.iMachineRestoreSnapshot(Unknown Source)
	at org.virtualbox_5_1.IMachine.restoreSnapshot(IMachine.java:6926)
	... 2 more

Error infos:

Code: Select all

-------------------- ERROR INFOS --------------------

VBox error: VirtualBox error: rc=0x80070005 The object is not ready (0x80070005)
Error cause message: org.virtualbox_5_1.jaxws.RuntimeFaultMsg: VirtualBox error: rc=0x80070005 The object is not ready (0x80070005)
Overall result code: 80070005
Detail information #1
Error mesage: The object is not ready
Result code:  80070005
Component:    SessionMachine
Interface ID: b2547866-a0a1-4391-8b86-6952d82efaa0
-----------------------------------------------------

From the VBoxWebSrv.exe Log:

Code: Select all

00:06:13.951896 SQPmp    Request 1299 on socket 1328 queued for processing (1 items on Q)
00:06:13.953896 SQW02    Processing connection from IP=127.0.0.1 socket=1328 (1 out of 2 threads idle)
00:06:13.957897 SQW02    API method name:            IMachine::RestoreSnapshot
00:06:13.959897 SQW02    API return code:            0x80070005 (E_ACCESSDENIED)
00:06:13.961897 SQW02    COM error info result code: 0x80070005 (E_ACCESSDENIED)
00:06:13.963897 SQW02    COM error info text:        The object is not ready
00:06:14.034901 SQPmp    Request 1300 on socket 1328 queued for processing (1 items on Q)
00:06:14.037901 SQW02    Processing connection from IP=127.0.0.1 socket=1328 (1 out of 2 threads idle)


============================================================================
Error 3 (0x80bb0007) (occured during the tests a short time after error 2)
============================================================================



...and another one.... :lol: :shock:

the line that created the exception:

Code: Select all

   progress = vm.launchVMProcess(session, "gui", "");

stack trace:

Code: Select all

org.virtualbox_5_1.VBoxException: VirtualBox error: rc=0x80bb0007 The machine 'win' is already locked by a session (or being locked or unlocked) (0x80bb0007)
	at org.virtualbox_5_1.IMachine.launchVMProcess(IMachine.java:3888)
	at VboxApiVmCtrl.restoreSnap(VboxApiVmCtrl.java:861)
	at Main.main(Main.java:80)
Caused by: org.virtualbox_5_1.jaxws.RuntimeFaultMsg: VirtualBox error: rc=0x80bb0007 The machine 'win' is already locked by a session (or being locked or unlocked) (0x80bb0007)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:135)
	at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(StubHandler.java:238)
	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:189)
	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:276)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:104)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
	at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
	at com.sun.proxy.$Proxy35.iMachineLaunchVMProcess(Unknown Source)
	at org.virtualbox_5_1.IMachine.launchVMProcess(IMachine.java:3879)
	... 2 more
error infos:

Code: Select all

-------------------- ERROR INFOS --------------------

VBox error: VirtualBox error: rc=0x80bb0007 The machine 'win' is already locked by a session (or being locked or unlocked) (0x80bb0007)
Error cause message: org.virtualbox_5_1.jaxws.RuntimeFaultMsg: VirtualBox error: rc=0x80bb0007 The machine 'win' is already locked by a session (or being locked or unlocked) (0x80bb0007)
Overall result code: 80bb0007
Detail information #1
Error mesage: The machine 'win' is already locked by a session (or being locked or unlocked)
Result code:  80bb0007
Component:    MachineWrap
Interface ID: b2547866-a0a1-4391-8b86-6952d82efaa0
-----------------------------------------------------
 
(unfortunately I closed the VBoxWebSrv.exe window accidentally and thus couldn't copy the Log messages from it :oops:)


Error 2 + 3 do not occur often, I think it was the first time I got those.. Error 1 unfortunately occurs everytime sooner or later.


*************
EDIT:
*************

another new error just occured:


============================================================================
Error 4 (0x8000ffff)
============================================================================



code line:

Code: Select all

	progress = session.getMachine().restoreSnapshot(snapshot);
stack trace:

Code: Select all

org.virtualbox_5_1.VBoxException: VirtualBox error: rc=0x8000ffff The session is not locked (session state: Unlocked) (0x8000ffff)
	at org.virtualbox_5_1.ISession.getMachine(ISession.java:187)
	at VboxApiVmCtrl.restoreSnap(VboxApiVmCtrl.java:829)
	at Main.main(Main.java:80)
Caused by: org.virtualbox_5_1.jaxws.RuntimeFaultMsg: VirtualBox error: rc=0x8000ffff The session is not locked (session state: Unlocked) (0x8000ffff)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:135)
	at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(StubHandler.java:238)
	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:189)
	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:276)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:104)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
	at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
	at com.sun.proxy.$Proxy35.iSessionGetMachine(Unknown Source)
	at org.virtualbox_5_1.ISession.getMachine(ISession.java:178)
	... 2 more
error infos:

Code: Select all

-------------------- ERROR INFOS --------------------

VBox error: VirtualBox error: rc=0x8000ffff The session is not locked (session state: Unlocked) (0x8000ffff)
Error cause message: org.virtualbox_5_1.jaxws.RuntimeFaultMsg: VirtualBox error: rc=0x8000ffff The session is not locked (session state: Unlocked) (0x8000ffff)
Overall result code: 8000ffff
Detail information #1
Error mesage: The session is not locked (session state: Unlocked)
Result code:  8000ffff
Component:    SessionWrap
Interface ID: 7844aa05-b02e-4cdd-a04f-ade4a762e6b7
-----------------------------------------------------

VBoxWebSrv.exe Log:

Code: Select all

00:04:33.690259 SQPmp    Request 1362 on socket 852 queued for processing (1 items on Q)
00:04:33.692759 SQW03    Processing connection from IP=127.0.0.1 socket=852 (2 out of 3 threads idle)
00:04:33.695259 SQW03    ERROR [COM]: aRC=E_UNEXPECTED (0x8000ffff) aIID={7844aa05-b02e-4cdd-a04f-ade4a762e6b7} aComponent={SessionWrap} aText={The session is not locked (sess
ion state: Unlocked)}, preserve=false aResultDetail=0
00:04:33.703260 SQW03    API method name:            ISession::COMGETTER(Machine)
00:04:33.705261 SQW03    API return code:            0x8000ffff (E_UNEXPECTED)
00:04:33.706761 SQW03    COM error info result code: 0x8000ffff (E_UNEXPECTED)
00:04:33.708761 SQW03    COM error info text:        The session is not locked (session state: Unlocked)

If it helps, I could provide you my whole code.
It's a little test application which restores random snapshots of a VM in an endless loop.
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Restoring snapshot in Java - Exception 0x800706be

Post by noteirak »

so all these errors only point to one thing: VirtualBox is crashing on your system, so this not related to the API itself.
Make sure you don't overcommit the host in term of RAM or CPU cores.

Could you post the VBox.log of the VM for which you tried to restore a snapshot, when one of those error occured please? especially the 0x800706be
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
debugs-bunny
Posts: 6
Joined: 12. Jun 2017, 17:30

Re: Restoring snapshot in Java - Exception 0x800706be

Post by debugs-bunny »

noteirak wrote:so all these errors only point to one thing: VirtualBox is crashing on your system, so this not related to the API itself.
Make sure you don't overcommit the host in term of RAM or CPU cores.

Could you post the VBox.log of the VM for which you tried to restore a snapshot, when one of those error occured please? especially the 0x800706be
Sorry for the late answer!

OK!

I just got a new error, when I tried to reproduce the error:


============================================================================
Error 5 (0x80004005)
============================================================================


code line:

Code: Select all

	progress = vm.launchVMProcess(session, "gui", "");
stack trace:

Code: Select all

org.virtualbox_5_1.VBoxException: VirtualBox error: rc=0x80004005
	at org.virtualbox_5_1.IMachine.launchVMProcess(IMachine.java:3888)
	at VboxApiVmCtrl.restoreSnap(VboxApiVmCtrl.java:861)
	at Main.main(Main.java:80)
Caused by: org.virtualbox_5_1.jaxws.RuntimeFaultMsg: VirtualBox error: rc=0x80004005
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:135)
	at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(StubHandler.java:238)
	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:189)
	at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:276)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:104)
	at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
	at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
	at com.sun.proxy.$Proxy35.iMachineLaunchVMProcess(Unknown Source)
	at org.virtualbox_5_1.IMachine.launchVMProcess(IMachine.java:3879)
	... 2 more
error infos:

Code: Select all

-------------------- ERROR INFOS --------------------

VBox error: VirtualBox error: rc=0x80004005
Error cause message: org.virtualbox_5_1.jaxws.RuntimeFaultMsg: VirtualBox error: rc=0x80004005
Overall result code: 80004005
-----------------------------------------------------

VBoxWebSrv.exe Log:

Code: Select all

00:01:09.460241 SQPmp    Request 235 on socket 996 queued for processing (1 items on Q)
00:01:09.462742 SQW02    Processing connection from IP=127.0.0.1 socket=996 (1 out of 2 threads idle)
00:01:09.466242 SQW02    API method name:            IMachine::LaunchVMProcess
00:01:09.468743 SQW02    API return code:            0x80004005 (E_FAIL)

After this error I couldn't do anything with the Machine anymore.

In the VirtualBox GUI the "Start" and "Change" buttons are greyed out for the Machine like on this picture (I use the german version of VirtualBox):

Image

When I try to restore another Snapshot via the GUI it also fails with error 0x80004005.


When I call my restoreSnapshot() method again, it fails with the same error, but this time already on the following line:

Code: Select all

	vm.lockMachine(session, LockType.Shared); // >>> LOCKED!
A call of IMachine.getState() on the Machine tells me that it is in state "RestoringSnapshot".

To get the Machine out of this state, so I be able to work with it again, I have to kill VBoxSVC.exe and restart VirtualBox again.

After I did this, everything is fine again.

Ok. After 124 times of restoring random snapshots successfully, I got error 0x8000ffff again. All infos are exactly the same as in my post above.
After this, 51 went through successfull and then error 0x80070005 again. Infos are the same as above too.
And now finally after 44 restores we got our favorite error again. Infos coincide with the above too.


And here is the VBox.log:

*** I attached it, because it was too big to post it directly ***

I also got the files VBox.log.1, VBox.log.2, VBox.log.3 and VBoxHardening.log.
If you are interested in them, I could post them too.
Attachments
VBox.log
(97.03 KiB) Downloaded 4 times
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Restoring snapshot in Java - Exception 0x800706be

Post by noteirak »

Well it's clear this has nothing to do with the API, this is a general VirtualBox problem, I'll move your post in the Windows section so someone else can ask you more appropriate questions
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
debugs-bunny
Posts: 6
Joined: 12. Jun 2017, 17:30

Re: Restoring snapshot in Java - Exception 0x800706be

Post by debugs-bunny »

noteirak wrote:Well it's clear this has nothing to do with the API, this is a general VirtualBox problem, I'll move your post in the Windows section so someone else can ask you more appropriate questions
Ok, thanks for your help! I hope the people in this section are as ambitous as you are! :)

So I just tried my code on another computer (Windows 10 Host) with another Machine (Windows 7 Guest again) and got a corrupted Machine after about 30 restores with the exception 0x80004005 like in my last post.

Exactly like last time, after killing VBoxSVC.exe and starting it again, everything worked fine again.

So do you have any ideas why VirtualBox behaves like this, when I try to restore a Machine?
Post Reply