VirtualBox

Opened 13 years ago

Last modified 3 years ago

#9223 reopened defect

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 Mehnert)

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

STARTED COMMAND

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

Attachments (1)

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

Download all attachments as: .zip

Change History (14)

by mlw, 13 years ago

Attachment: VBox.log.gz added

compressed log (uncompressed is 13MB)

comment:1 by Ron Gould, 13 years ago

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.

Examples:

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:~$ 

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}
vbox@host01:~$

in reply to:  1 comment:2 by Ron Gould, 12 years ago

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

<skip>

comment:3 by arb, 11 years ago

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 by mark1ewis, 11 years ago

This ticket may possibly be related to #12250

comment:5 by repadelft, 10 years ago

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 by Frank Mehnert, 10 years ago

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 by Rock242, 8 years ago

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 by Klaus Espenlaub, 8 years ago

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 by G-DE, 7 years ago

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.

comment:10 by aeichner, 4 years ago

Resolution: obsolete
Status: newclosed

comment:11 by leonp, 4 years ago

Resolution: obsolete
Status: closedreopened

I am sorry to inform that the problem is still here. VB version 6.1.14 with Ext.Pack 6.1.14 has exactly the same problem (host FC32-64, guest Win7-32):

[root@leonp leonp]# vboxmanage controlvm "Windows7" savestate
VBoxManage: error: Machine 'Windows7' is not currently running


while the VM is perfectly running. Any other command (reset, poweroff, start...) is rejected with the same error message. It may be saved/closed only via GUI.
Any hints for workaround will be highly appreciated...

Last edited 4 years ago by leonp (previous) (diff)

in reply to:  11 ; comment:12 by strobelight, 3 years ago

I am also seeing this issue. I have 2 VMs running, both running Centos8, originally started via the gnome application shortcut to Oracle VM Virtualbox on my opensuse linux desktop, and several snapshots with the same name, a host vboxnet0 network, a NAT, and the manager shows my VMs in Powered Off state, however, they are both running just fine and I can click into them and type within.

It's as if the manager has lost track of the VMs.

VirtualBox version 6.1.14_SUSE r140239.

sudo reboot

performed several times from each, prior to noticing, but I original discovered this as after a sleep of the host and wakeup the next day, the VMs couldn't ping each other until I detached the host-only adapter and reconnected on each.

In my attempts to recover the host-only adapter, I closed the vbox mgr gui, and re-opened, and noticed the states of my vms was powered off. What the heck? I see them, clicked into them, and sure enough they're both up and running and can ping each other.

But the GUI has no knowledge of them any more.

Replying to leonp:

I am sorry to inform that the problem is still here. VB version 6.1.14 with Ext.Pack 6.1.14 has exactly the same problem (host FC32-64, guest Win7-32):

in reply to:  12 comment:13 by bigart, 3 years ago

Replying to strobelight:

I am also seeing this issue. I have 2 VMs running, both running Centos8, originally started via the gnome application shortcut to Oracle VM Virtualbox on my opensuse linux desktop, and several snapshots with the same name, a host vboxnet0 network, a NAT, and the manager shows my VMs in Powered Off state, however, they are both running just fine and I can click into them and type within.

It's as if the manager has lost track of the VMs.

VirtualBox version 6.1.14_SUSE r140239.

sudo reboot

performed several times from each, prior to noticing, but I original discovered this as after a sleep of the host and wakeup the next day, the VMs couldn't ping each other until I detached the host-only adapter and reconnected on each.

In my attempts to recover the host-only adapter, I closed the vbox mgr gui, and re-opened, and noticed the states of my vms was powered off. What the heck? I see them, clicked into them, and sure enough they're both up and running and can ping each other.

But the GUI has no knowledge of them any more.

Replying to leonp:

I am sorry to inform that the problem is still here. VB version 6.1.14 with Ext.Pack 6.1.14 has exactly the same problem (host FC32-64, guest Win7-32):

My solution:

don't use sudo when you register vm, if you did it unregister machine by sudo and register it without sudo

it helps me, and working fine.

I found it when I created new machine by command line using sudo ... machine was created by root! Thats why it's not working and showing wrong vm state.

I hope it will help.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use