Ticket #9223 (new defect)

Opened 8 years ago

Last modified 2 years ago

A running VM is listed as Powered Off

Reported by: mlw Owned by:
Component: VM control Version: VirtualBox 4.0.10
Keywords: Cc:
Guest type: other Host type: other

Description (last modified by frank) (diff)

I have a VM that has been running for 11 days, but VBoxManage showvminfo and the VirtualBox Manager window both report that is it powered off.

The machine is working perfectly AFAICT (its console is alive and processes are running in it).

# ps -wwo lstart,command 6686


Wed Jul 6 12:45:57 2011 /usr/lib/virtualbox/VirtualBox --comment barker --startvm 91b05e8b-b485-49cb-849c-eb5dfed6dcf6 --no-startvm-errormsgbox

# VBoxManage showvminfo barker | grep State State: powered off (since 2011-07-06T10:44:00.000000000)

The log contains thousands of messages like this:

199:10:30.740 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={12f4dcdb-12b2-4ec1-b7cd-ddd9f6c5bf4d} aComponent={Session} aText={Failed to query the session machine (NS_ERROR_CALL_FAILED)}, preserve=false


VBox.log.gz Download (201.1 KB) - added by mlw 8 years ago.
compressed log (uncompressed is 13MB)

Change History

Changed 8 years ago by mlw

compressed log (uncompressed is 13MB)

comment:1 follow-up: ↓ 2 Changed 8 years ago by samwisekoi

Identical problem and symptoms.

VirtualBox Host:
- CentOS 5.7 64-bit
- VirtualBox version 4.1.2 r73507

Virtual Machines
- CentOS 5.7
- Debian 6
- Ubuntu 11.04

Problem occurs on Host servers with Xeon, i3, and i7 CPUs.

VMs were all built and started using VirtualBox GUI interface.


vbox@host01:~$ VBoxManage showvminfo "deb64_wiki01'
State:           powered off (since 2011-09-30T04:21:23.000000000)
root@wiki01:~# uptime
 16:28:55 up 1 day, 18:58,  2 users,  load average: 0.00, 0.00, 0.00

vbox@host01:~$ VBoxManage showvminfo "cent53_db"
State:           aborted (since 2011-09-29T01:20:45.000000000)
[root@db ~]# uptime
 16:32:15 up 2 days, 20:22,  2 users,  load average: 0.00, 0.00, 0.00

vbox@host01:~$  VBoxManage list runningvms

vbox@host01:~$  VBoxManage list vms
"cent53_db" {b279b9f8-9f59-4188-a8c4-ecf7ca07a500}
"cent57_baseline" {80b85e42-7386-4966-9002-615bcd2d0eaa}
"cent57_vanilla" {50b40551-946f-48fb-872c-4bddec8acc45}
"cent57_nilmon" {437d9eb8-6043-4909-b548-271a0cddbe05}
"cent57_amimon" {45216538-7132-4742-98c0-8bc1a37ebf93}
"deb64_baseline" {684dcf2f-a466-4e87-a1a5-17fd786833e3}
"ubi32_wiki" {ce795256-3ab0-4dea-8cb9-403dca217e09}
"deb32_wiki" {738c47f0-651a-451e-9bec-507a37fe3ce9}
"deb64_wiki01" {070e7a15-e07d-43a4-837b-a5e1688ad65c}

comment:2 in reply to: ↑ 1 Changed 8 years ago by samwisekoi

Samwise here again.

Tracked the problem down to a location between the chair and keyboard.

Basically VBoxManage, the VBox console, and vboxtool all report accurate data, PROVIDED THAT the same user session is used to start the VMs.

If I start a session using the VBox console, then ssh in -- even as the same user -- VBoxManage et al will be confused. Or if you are using VNC carelessly; same issue.

To determine if this is the issue, simply run "users" on the host. If you see your name multiple times, one of the other logins actually knows about the running instances.

However, I have now moved to strict use of a single user and vboxtool to start VMs, and either use sudo poweroff from WITHIN the VM or vboxtool stop vmname. All under the same user, with clean logouts OR the use of screen.

After moving to this model, I can report 100% of the problems are eliminated, and I have never had a VM go missing again.

I am happy to provide details to whomever would like them.

  • Sam :D

Replying to samwisekoi:

Identical problem and symptoms.

VirtualBox Host:
- CentOS 5.7 64-bit
- VirtualBox version 4.1.2 r73507

Virtual Machines
- CentOS 5.7
- Debian 6
- Ubuntu 11.04


comment:3 Changed 6 years ago by arb

I'm not sure I would be so quick to place the problem with the user. I have experienced the same symptoms and would say the problem is with VirtualBox. As long as I login again to the same user account I should see the VMs which I started, it's as simple as that. If I don't then VirtualBox is broken. I am currently experiencing this problem so if the developers would like my assistance to troubleshoot it then I can help right now.

comment:4 Changed 6 years ago by mark1ewis

This ticket may possibly be related to #12250

comment:5 Changed 5 years ago by repadelft

I am having the same trouble, running VirtualBox (currently 4.3.8) under Fedora. It wasn't always there, though.

I set up a Windows XP virtualbox to print for me, to a printer that is windows only. I created a cups script that checks whether the VM is running, all using runuser, starts the VM if not, with "VBoxManage startvm 'Windows XP' --type headless", pushes a print file there and starts a print command, through gsview.

When I initially set it up, a few years ago, (don't remember exactly when) this would be clearly visible; the VirtualBox graphical interface would show that the virtual machine was started, then stopped again.

Now that no longer works, and if I am not careful i.e. running the virtual machine and then printing, the VM is started twice and corruption is the result. Long live snapshots!

Somehow the mechanism through which VirtualBox communicates with the VM's might have been changed, either through the OS or through VirtualBox itself.

Are there any options that can be used to connect to a virtualbox started in another session?

comment:6 Changed 5 years ago by frank

  • Description modified (diff)

The communication mechanism didn't change. If you start a VM and the VirtualBox GUI does not list this VM as started then this usually means that the VBoxSVC service crashed for some unknown reason. So please check if that's the case. If so, you can probably provide a core dump?

comment:7 Changed 3 years ago by Rock242

My VirtualBox is on Win-7 as host. And created two VMs and installed rhel6.7 on both vm's.

Now I start both VM (linux-vm-1 & linux-vm-2) and then did ssh from linux-vm-1 to Win-7 (host), VBoxManage is showing both vm's are in power-off state. If I run VBoxManage from cmd of win-7, it shows correct info.

Now I powered-off linux-vm-1. linux-vm-2 left in running state. ssh from linux-vm-2 to win-7, start the linux-vm-1. check the status, status is correct.

Now ssh from linux-vm-1 to win-7, check the status, status is still correct.

Now I check the status from win-7's cmd: it is showing power-off. Also the status in VBox Manager GUI, it is showing as power-off while linux-vm is running and I can do the ssh.

So even I started the vm after ssh from linux-vm-1, it is showing the correct status if I ssh from linux-vm-2 but on host it-self it's showing wrong status.

comment:8 Changed 3 years ago by klaus

Rock242: that's the wrong ticket for you. Better create a new ticket, but with the explanation below I hope you understand that there won't be an easy fix. The original report was for a unix type OS which is a very different problem than what you get.

On Windows it's COM making a mess out of services which run in the user's context. They get started once for each login session, which is creating a mess, as we assume that the service is started once per user (there's a 10 year old KB article about this, and Microsoft states there are no workarounds and the age shows that it probably won't ever be fixed). Seems that you use ssh on Win7 host (which is a non-standard tool, and from my experience the session handling there is to be called at least questionable), which presumably creates new sessions for each login. With several API services which can't cooperate this will lead to the inconsistent VM state.

comment:9 Changed 2 years ago by G-DE

For anyone who comes across this on Windows 8 or higher, the issue may be related to how you are running your terminal/executing VBoxManage.

Windows 8 and upwards treats programs executed using "Run as administrator" as essentially running as a different user. There also seems to be a limitation with VBoxManage that it can only detect VMs which are running under the same user account. This means that if you started the VM using your normal account but are running your console as administrator, the console can't "see" that the VM is running.

Note that this is the case even if you have "disabled" user account control.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use