Hello,
i encountered a strange problem with VBoxManage.
With the following steps i am able to reproduce the problem:
# Start a VM via VirtualBox GUI under your normal user (user that is in group: vboxusers)
# Check that VM is up and running: VBoxManage list runningvms (shows running vm)
# Become root on your linux system (su) via Terminal
# Issue: VBoxManage --version (gives version number)
# Try to check that VM is up and running again via root: su - <username> -c "VBoxManage list runningvms" -> doesn't show any output even the VM is still running
# Cancel root mode: exit
#Try to check that VM is up and running again via user: VBoxManage list runningvms -> still doesn't show any output even the VM is still running
When i shutdown the VM via GUI, close the Virtualbox GUI and open it again everything is working fine.
Do you agree that this could a possible bug or do i harm some rules with my steps described above?
VBoxVersion: 5.1.30 r118389
Linux Host: Oracle Linux 7.4
Kernel: 3.10.0-693.5.2.el7.x86_64
thanks for your help
VBoxManage does not show running vms (after Userswitch)
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: VBoxManage does not show running vms (after Userswitch)
VirtualBox is designed to run in user space ( only for the user that installed it ). It does its best to prevent anyone else from using/seeing the guest/s by placing them in the user space. So what you are seeing is normal.
Re: VBoxManage does not show running vms (after Userswitch)
Thanks for your quick reply.
So you mean that it is not good practice to execute a VBox command as root or other user with: ?
If that's true, i agree that Step 1 till Step 5 (explained above) works as designed but why cant I see the running VM when i have an active Terminal-Session as User that is owner of the VM (after going through Step 1 - Step 5) ? That still seems to be a bug for me.
Thanks
So you mean that it is not good practice to execute a VBox command as root or other user with:
Code: Select all
su - <user that is owner of vbox-vms> -c "VBoxManage <command>"
If that's true, i agree that Step 1 till Step 5 (explained above) works as designed but why cant I see the running VM when i have an active Terminal-Session as User that is owner of the VM (after going through Step 1 - Step 5) ? That still seems to be a bug for me.
Thanks
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: VBoxManage does not show running vms (after Userswitch)
That's the way it has always been. By switching the user you change the VBOX_USER_HOME environment to a different user and one which does not have access. You need to manually set this back (export) or reboot.
Re: VBoxManage does not show running vms (after Userswitch)
I understand.
Thanks for your help
Thanks for your help