Flavio Vinicius wrote:
> Bellow is the output from VBoxManage, the simplest way to reproduce 
> this behaviour is to start a vm and then execute `VBoxManage controlvm 
> machine poweroff && VBoxManage startvm machine`.
>
> Output:
> [!] FAILED calling virtualBox->OpenRemoteSession(session, uuid, 
> sessionType, env, progress.asOutParam()) at line 4306!
> [!] Primary RC  = 0x80070005
> [!] Full error info present: true , basic error info present: true
> [!] Result Code = 0x80070005
> [!] Text        = A session for the machine 'ourgrid-scilinux' is 
> currently open (or being opened or closed)
> [!] Component   = Machine, Interface: IMachine, 
> {31f7169f-14da-4c55-8cb6-a3665186e35e}
> [!] Callee      = IVirtualBox, {76b25f3c-15d4-4785-a9d3-adc6a462beec}

This is what I  told you about: you (VBoxManage startvm machine) are 
trying to open a new session before the previous session is actually 
closed (as a result of VBoxManage controlvm machine poweroff). The 
poweroff command only sends the poweroff request to the VM and waits for 
its completion, it doesn't wait until the VM process has closed the 
session after it was externally powered off.
> A similar behaviour occurs when `VBoxManage startvm machine && 
> VBoxManage controlvm machine poweroff` is executed, this yields the 
> following output:
>
> [!] FAILED calling console->PowerDown() at line 4388!
> [!] Primary RC  = 0x80004005
> [!] Full error info present: true , basic error info present: true
> [!] Result Code = 0x80004005
> [!] Text        = Cannot power off the machine as it is not running or 
> paused (machine state: 3)
> [!] Component   = Console, Interface: IConsole, 
> {1dea5c4b-0753-4193-b909-22330f64ec45}
> [!] Callee      = IConsole, {1dea5c4b-0753-4193-b909-22330f64ec45}

Same as above (except the opposite operation order).

> I do not understand how the internals of VirtualBox work, but 
> apparently the problem is that the VBoxManage command returns before 
> the session is closed of opened.

Right, and it's not a bug, it's the current implementation. Please feel 
free to open a feature request in the bug database if you think it 
should be improved.

> Another issue occurred with the use of the VBoxManage command, last 
> night I had some scripts executing VirtualBox and when the `VBoxManage 
> controlvm name poweroff` command was invoked, the machine did not 
> poweroff and remained online. When I returned this morning the GUI 
> indicated that the machine was "stopping". I could not use the VM nor 
> control it, apparently VirtualBox had crashed and a I had to kill the 
> process. On the VBox.log there exists some error messages that I do 
> not fully understand. This log is attached to the email.
This is different and looks like some sort of deadlock. We have fixed a 
couple of deadlock conditions since 1.5 was released, it may be one of 
them. If you can build an SVN version and try to reproduce, we will be 
very thankful for your help. Anyway feel free to provide more details on 
how to reproduce if you've got them.

-- 
Regards,
Dmitry A. Kuminov



_______________________________________________
vbox-users mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-users

Reply via email to