Java Web Services ACPI shut down Aborted State error

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
Regression
Posts: 9
Joined: 27. Jun 2012, 16:58

Java Web Services ACPI shut down Aborted State error

Post by Regression »

I recently added some powerButton (ACPI) code to my Java Virtualbox web services code but after calling this method, the Windows 7 VM goes into an "Aborted State" and can only be resolved by restarting the web server.

I would like to see if anyone can tell me if I'm missing something in my code that would cause this Aborted State to occur.
Java Virtualbox 4.2.12 is the current build running on Windows
Thanks

Code: Select all

public void powerDownVMPowerButton(VirtualBoxManager oJavaVirtualBoxMgr, IVirtualBox oVirtualBoxInstance, String sVMName){
        ISession oSession = null;
        IConsole oConsole = null;
        IMachine oMachine = null;
        try{
        	oMachine = oVirtualBoxInstance.findMachine(sVMName);
        	oSession = oJavaVirtualBoxMgr.getSessionObject();
        	oMachine.lockMachine(oSession,  LockType.Shared);
        	oConsole = oSession.getConsole();
            oConsole.powerButton();
            oSession.unlockMachine();
        }catch (VBoxException e)
        {
            e.printStackTrace();
        }
    }

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: Java Web Services ACPI shut down Aborted State error

Post by noteirak »

Moving to Virtualbox API forum.

Your code seems fine, do you get an exception?
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Regression
Posts: 9
Joined: 27. Jun 2012, 16:58

Re: Java Web Services ACPI shut down Aborted State error

Post by Regression »

Thanks for the quick reply.
We're attempting to reproduce this now...

I'll post any exception when it goes into the Aborted State

Thanks
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: Java Web Services ACPI shut down Aborted State error

Post by noteirak »

To be clear : Your code looks fine as far as I can see.

I would look for two things : an exception is being thrown in your code, and I would check the vboxweb server log, the vboxsvc log and the VM log file.
If the VM ended up in Aborted, one of them will contain the precise error.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply