Java Web Services ACPI shut down Aborted State error

Discussion about using the VirtualBox API, Tutorials, Samples.

Java Web Services ACPI shut down Aborted State error

Postby Regression » 28. May 2013, 20:49

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   Expand viewCollapse view
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();
        }
    }

Regression
 
Posts: 9
Joined: 27. Jun 2012, 16:58

Re: Java Web Services ACPI shut down Aborted State error

Postby noteirak » 28. May 2013, 21:15

Moving to Virtualbox API forum.

Your code seems fine, do you get an exception?
Hyperbox - Virtual Infrastructure Manager - https://kamax.io/hbox/
Manage your VirtualBox infrastructure the free way!
noteirak
Site Moderator
 
Posts: 5198
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7

Re: Java Web Services ACPI shut down Aborted State error

Postby Regression » 28. May 2013, 22:03

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
Regression
 
Posts: 9
Joined: 27. Jun 2012, 16:58

Re: Java Web Services ACPI shut down Aborted State error

Postby noteirak » 29. May 2013, 00:01

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://kamax.io/hbox/
Manage your VirtualBox infrastructure the free way!
noteirak
Site Moderator
 
Posts: 5198
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7


Return to The VirtualBox API

Who is online

Users browsing this forum: No registered users and 1 guest