vboxmanage doesnt see running VM

Discussions related to using VirtualBox on Linux hosts.

vboxmanage doesnt see running VM

Postby Rupat » 12. May 2021, 08:35

Hi,
i had the problem that vboxmanage didnt show the Linux VMs that are currently running.
Also the GUI didnt see them.
I could SSH into the guests and everything inside the VM was working.

When I clicked in the GUI to show me the output it did start the VM while it was already running, so i got a broken filesystem after a reboot of the guest
After that I did shutdown all guests and restartet them. now it looks ok.

What can I do in this case? I have a nightly script that powers down the VM, copies the files and restarts them.
I fear that when vboxmanage doesnt see the running VM that it copies the files of an active VM and also tries to start an already running VM.

the host is a Centos Stream and i use the vbox service to start the VMs during boot.

any ideas?
Rupat
 
Posts: 11
Joined: 15. Dec 2020, 10:53

Re: vboxmanage doesnt see running VM

Postby scottgus1 » 12. May 2021, 16:06

If you are running these VMs with autostart or through a service or a "Task Scheduler", they are probably starting in a different account than the account you log in with. The VbxSVC service used by the logged-in account cannot see VMs running under another account.

Either work out a way to run the VMs under the account you will log in with, log in on the account running the VMs, or run the VMs after logging in.

Some VM-running services, such as 3rd-party VboxVMservice, have command-line actions to stop the VMs controlled by the service so the logged-in account can then run the VMs through the main Virtualbox window. These command could be scripted into the backup routine, if your chosen autostart method has such command.
scottgus1
Site Moderator
 
Posts: 12016
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: vboxmanage doesnt see running VM

Postby Rupat » 17. May 2021, 08:46

Hello,

the service starts the VMS as the User which whom I log in and work.
I think that is defined in /etc/vbox/virtualbox.cfg:

Code: Select all   Expand viewCollapse view
default_policy = deny
itsupport = {
allow = true
}


usually the VMS appear when I run vboxmanage list runningvms as this user.
I can manually start and stop the VMs as this user.
Rupat
 
Posts: 11
Joined: 15. Dec 2020, 10:53


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 9 guests