"Virtualbox --startvm vm-name" no longer works (#18257)

Discussions related to using VirtualBox on Linux hosts.
Post Reply
jimoe
Posts: 126
Joined: 20. Jul 2009, 05:59
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: os/2, win-xp, win-10

"Virtualbox --startvm vm-name" no longer works (#18257)

Post by jimoe »


ModEdit; related ticket: #18257: VirtualBoxVM not accessible on Linux hosts
VirtualBox v6.0.0
Opensuse 15.0

I did the usual for a new major release: deleted the old version (5.2.22), installed the new (v6.0.0).

Now the command to start a VM no longer works: VirtualBox --startvm os2v4.52. It has worked since, well, forever.
I get the message:

Code: Select all

--startvm is an option for the VirtualBox VM runner (VirtualBoxVM) application, not the VirtualBox Manager.
Hmm. There is no VirtualBoxVM. A conundrum.
The VM starts from the Virtualbox GUI, no problem.

Where do I find (or create) the purported "VirtualBoxVM"?
Last edited by socratis on 31. Dec 2018, 21:42, edited 1 time in total.
Reason: Added ticket related information.
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: "Virtualbox --startvm vm-name" no longer works

Post by andyp73 »

I haven't updated my Linux host to VirtualBox 6.0.0 but in the previous versions binaries got installed into /usr/lib/virtualbox with links in /usr/bin. What does the output of the following commands show:
ls -la /usr/lib/virtualbox
ls -la /usr/bin/V*
-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
jimoe
Posts: 126
Joined: 20. Jul 2009, 05:59
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: os/2, win-xp, win-10

Re: "Virtualbox --startvm vm-name" no longer works

Post by jimoe »

I see that "VirtualBoxVM" is invisible to not-root. It is set as executable for group and world, but since there is no read permission, that seems not helpful. Is there a missing symbolic link? Is this a defect?

Code: Select all

$ ls -la /usr/lib/virtualbox
total 130984
drwxr-xr-x 1 root root     2100 Dec 28 15:57 ./
drwxr-xr-x 1 root root    24230 Dec 28 06:53 ../
drwxr-xr-x 1 root root        0 Dec 18 06:15 additions/
-rwxr-xr-x 1 root root     7926 Dec 18 06:12 check_module_dependencies.sh*
-rwxr-xr-x 1 root root    11456 Dec 18 06:15 chrpath*
drwxr-xr-x 1 root root      164 Dec 28 15:54 components/
-rwxr-xr-x 1 root root   407352 Dec 18 06:15 DbgPlugInDiggers.so*
drwxr-xr-x 1 root root       22 Dec 28 15:54 dtrace/
drwxr-xr-x 1 root root       70 Dec 28 15:58 ExtensionPacks/
-rwxr-xr-x 1 root root   494008 Dec 18 06:15 kchmviewer*
-rwxr-xr-x 1 root root   126104 Dec 18 06:15 libvboxjxpcom.so*
-rwxr-xr-x 1 root root     4026 Dec 18 06:12 postinst-common.sh*
-rwxr-xr-x 1 root root     2725 Dec 18 06:12 prerm-common.sh*
-rwxr-xr-x 1 root root    12487 Dec 10 08:50 routines.sh*
drwxr-xr-x 1 root root       16 Dec 28 15:54 sdk/
drwxr-xr-x 1 root root      428 Dec 28 15:54 UnattendedTemplates/
-rwxr-xr-x 1 root root    27136 Dec 18 06:15 VBoxAuthSimple.so*
-rwxr-xr-x 1 root root    10464 Dec 18 06:15 VBoxAuth.so*
-rwxr-xr-x 1 root root   101728 Dec 18 06:15 VBoxAutostart*
-rwxr-xr-x 1 root root     3338 Dec 18 06:12 vboxautostart-service.sh*
-rwxr-xr-x 1 root root   147240 Dec 18 06:15 VBoxBalloonCtrl*
-rwxr-xr-x 1 root root     6498 Dec 18 06:12 vboxballoonctrl-service.sh*
-rwxr-xr-x 1 root root    77088 Dec 18 06:15 VBoxBugReport*
-rwxr-xr-x 1 root root     1505 Nov 22  2017 VBoxCreateUSBNode.sh*
-rwxr-xr-x 1 root root   171296 Dec 18 06:15 VBoxDbg.so*
-rwxr-xr-x 1 root root   358368 Dec 18 06:15 VBoxDD2.so*
-rw-r--r-- 1 root root   265336 Dec 18 06:15 VBoxDDR0.r0
-rw-r--r-- 1 root root   188824 Dec 18 06:15 VBoxDDRC.rc
-rwxr-xr-x 1 root root  3878096 Dec 18 06:15 VBoxDD.so*
-rwxr-xr-x 1 root root   422464 Dec 18 06:15 VBoxDDU.so*
-rwxr-xr-x 1 root root    35192 Dec 18 06:15 VBoxDragAndDropSvc.so*
-rwxr-xr-x 1 root root    18545 Dec 18 06:12 vboxdrv.sh*
-rwxr-xr-x 1 root root    10480 Dec 18 06:15 VBoxDTrace*
-rw-r--r-- 1 root root  2097152 Dec 18 06:14 VBoxEFI32.fd
-rw-r--r-- 1 root root  2097152 Dec 18 06:14 VBoxEFI64.fd
-rwxr-xr-x 1 root root    52616 Dec 18 06:15 VBoxExtPackHelperApp*
-rwxr-xr-x 1 root root  5973656 Dec 18 06:15 VBoxGlobal.so*
-rwxr-xr-x 1 root root    26944 Dec 18 06:15 VBoxGuestControlSvc.so*
-rwxr-xr-x 1 root root    35360 Dec 18 06:15 VBoxGuestPropSvc.so*
-r-s--x--x 1 root root   154104 Dec 18 06:15 VBoxHeadless*
-rwxr-xr-x 1 root root   101376 Dec 18 06:15 VBoxHeadless.so*
-rwxr-xr-x 1 root root    18568 Dec 18 06:15 VBoxHostChannel.so*
-rwxr-xr-x 1 root root  1616848 Dec 18 06:15 vbox-img*
-rwxr-xr-x 1 root root    70128 Dec 18 06:15 VBoxKeyboard.so*
-rwxr-xr-x 1 root root  1069288 Dec 18 06:15 VBoxManage*
-r-s--x--x 1 root root    23120 Dec 18 06:15 VBoxNetAdpCtl*
-r-s--x--x 1 root root   154096 Dec 18 06:15 VBoxNetDHCP*
-rwxr-xr-x 1 root root   179672 Dec 18 06:15 VBoxNetDHCP.so*
-r-s--x--x 1 root root   154096 Dec 18 06:15 VBoxNetNAT*
-rwxr-xr-x 1 root root   278736 Dec 18 06:15 VBoxNetNAT.so*
-rwxr-xr-x 1 root root   196440 Dec 18 06:15 VBoxOGLhostcrutil.so*
-rwxr-xr-x 1 root root   156632 Dec 18 06:15 VBoxOGLhosterrorspu.so*
-rwxr-xr-x 1 root root   172688 Dec 18 06:15 VBoxOGLrenderspu.so*
-rwxr-xr-x 1 root root   205464 Dec 18 06:15 VBoxPython2_7.so*
-rwxr-xr-x 1 root root   205464 Dec 18 06:15 VBoxPython.so*
-rwxr-xr-x 1 root root   747824 Dec 18 06:15 VBoxREM.so*
-rwxr-xr-x 1 root root  3346576 Dec 18 06:15 VBoxRT.so*
-r-s--x--x 1 root root   154096 Dec 18 06:15 VBoxSDL*
-rwxr-xr-x 1 root root   171608 Dec 18 06:15 VBoxSDL.so*
-rwxr-xr-x 1 root root    47688 Dec 18 06:15 VBoxSharedClipboard.so*
-rwxr-xr-x 1 root root  1088512 Dec 18 06:15 VBoxSharedCrOpenGL.so*
-rwxr-xr-x 1 root root    51792 Dec 18 06:15 VBoxSharedFolders.so*
-rwxr-xr-x 1 root root   122031 Jul 12 01:38 vboxshell.py*
-rwxr-xr-x 1 root root  5994080 Dec 18 06:15 VBoxSVC*
-rwxr-xr-x 1 root root   244448 Dec 18 06:15 VBoxSVGA3D.so*
-rwxr-xr-x 1 root root    96992 Dec 18 06:15 VBoxTestOGL*
-rwxr-xr-x 1 root root  3885104 Dec 18 06:15 VBoxVMM.so*
-r-s--x--x 1 root root    10440 Dec 18 06:15 VBoxVolInfo*
-rwxr-xr-x 1 root root     6399 Dec 18 06:12 vboxweb-service.sh*
-rwxr-xr-x 1 root root 25340440 Dec 18 06:15 vboxwebsrv*
-rwxr-xr-x 1 root root    43712 Dec 18 06:15 VBoxXPCOMC.so*
-rwxr-xr-x 1 root root    27384 Dec 18 06:15 VBoxXPCOMIPCD*
-rwxr-xr-x 1 root root  1130792 Dec 18 06:15 VBoxXPCOM.so*
-rwxr-xr-x 1 root root 33079568 Dec 18 06:15 VirtualBox*
-rw-r--r-- 1 root root    11857 Dec 18 06:15 VirtualBox.spec
-r-s--x--x 1 root root   154104 Dec 18 06:15 VirtualBoxVM*
-rwxr-xr-x 1 root root 32455072 Dec 18 06:15 VirtualBoxVM.so*
-rw-r--r-- 1 root root  2367976 Dec 18 06:15 VMMR0.r0
-rw-r--r-- 1 root root  1596456 Dec 18 06:15 VMMRC.rc

$ ls -la /usr/bin/V*
-rwxr-xr-x 1 root root  4589 Nov 22  2017 /usr/bin/VBox*
lrwxrwxrwx 1 root root     4 Dec 18 06:15 /usr/bin/VBoxAutostart -> VBox*
lrwxrwxrwx 1 root root     4 Dec 18 06:15 /usr/bin/VBoxBalloonCtrl -> VBox*
lrwxrwxrwx 1 root root     4 Dec 18 06:15 /usr/bin/VBoxBugReport -> VBox*
lrwxrwxrwx 1 root root     4 Dec 18 06:15 /usr/bin/VBoxDTrace -> VBox*
lrwxrwxrwx 1 root root     4 Dec 18 06:15 /usr/bin/VBoxHeadless -> VBox*
lrwxrwxrwx 1 root root     4 Dec 18 06:15 /usr/bin/VBoxManage -> VBox*
lrwxrwxrwx 1 root root     4 Dec 18 06:15 /usr/bin/VBoxSDL -> VBox*
-rwxr-xr-x 1 root root 10456 Dec 18 06:15 /usr/bin/VBoxTunctl*
lrwxrwxrwx 1 root root     4 Dec 18 06:15 /usr/bin/VBoxVRDP -> VBox*
lrwxrwxrwx 1 root root     4 Dec 18 06:15 /usr/bin/VirtualBox -> VBox*
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: "Virtualbox --startvm vm-name" no longer works

Post by andyp73 »

jimoe wrote:I see that "VirtualBoxVM" is invisible to not-root. It is set as executable for group and world, but since there is no read permission, that seems not helpful.
I have installed VirtualBox 6.0.0 onto a Fedora 27 system. The permissions on VirtualBoxVM are OK, they are the same as the 5.x.x versions set on the VirtualBox application from where the functionality has been split.
jimoe wrote:Is there a missing symbolic link?
I think the issue is that most users won't have /usr/lib/virtualbox in their path and so the VirtualBoxVM executable won't be picked up. I have managed to work around this as follows (as root):
cd /usr/bin
ln -s VBox VirtualBoxVM
Then using your favourite text editor add the following two lines into the case "$APP" in statement that starts on line 109:
VirtualBox|virtualbox)
        exec "$INSTALL_DIR/VirtualBox" "$@"
        ;;
    VirtualBoxVM|virtualboxvm)
        exec "$INSTALL_DIR/VirtualBoxVM" "$@"
        ;;
    VBoxManage|vboxmanage)
        exec "$INSTALL_DIR/VBoxManage" "$@"
        ;;
-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
jimoe
Posts: 126
Joined: 20. Jul 2009, 05:59
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: os/2, win-xp, win-10

Re: "Virtualbox --startvm vm-name" no longer works

Post by jimoe »

There is a defect report for this: https://www.virtualbox.org/ticket/18207
I think the issue is that most users won't have /usr/lib/virtualbox in their path and so the VirtualBoxVM executable won't be picked up. I have managed to work around this as follows (as root):
cd /usr/bin
ln -s VBox VirtualBoxVM
... etc.
Thank you. That fixed it for me.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: "Virtualbox --startvm vm-name" no longer works

Post by socratis »

jimoe wrote:There is a defect report for this: https://www.virtualbox.org/ticket/18207
I thought I had already included the link, but apparently not. :o
But the issue that you've inadvertently discovered is a different one. I think someone should do the honors and open a new ticket for this...

Andy, since you already found the solution as well? ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: "Virtualbox --startvm vm-name" no longer works

Post by andyp73 »

socratis wrote:Andy, since you already found the solution as well?
I'm on it... ticket is #18257

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: "Virtualbox --startvm vm-name" no longer works (#18257)

Post by socratis »

Updated title and first post to reflect it. Thanks Andy!

And a Happy New Year to everyone! :D
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
bashM0nkey
Posts: 2
Joined: 5. Jan 2019, 22:40

Re: "Virtualbox --startvm vm-name" no longer works (#18257)

Post by bashM0nkey »

andyp73 wrote: I think the issue is that most users won't have /usr/lib/virtualbox in their path and so the VirtualBoxVM executable won't be picked up. I have managed to work around this as follows (as root):
cd /usr/bin
ln -s VBox VirtualBoxVM
Then using your favourite text editor add the following two lines into the case "$APP" in statement that starts on line 109:
VirtualBox|virtualbox)
        exec "$INSTALL_DIR/VirtualBox" "$@"
        ;;
    VirtualBoxVM|virtualboxvm)
        exec "$INSTALL_DIR/VirtualBoxVM" "$@"
        ;;
    VBoxManage|vboxmanage)
        exec "$INSTALL_DIR/VBoxManage" "$@"
        ;;
-Andy.
Which file are you referring to here? I had some trouble finding an actual text file.

I just changed this:

/usr/lib/virtualbox/VirtualBox --comment "vm name" --startvm "{***********************************************}"

into this:

/usr/lib/virtualbox/VirtualBoxVM --comment "vm name" --startvm "{***********************************************}"

and it seemed to do the trick.

I am still a little curious about the script you were referring to tho..? Thanks a ton guys!
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: "Virtualbox --startvm vm-name" no longer works (#18257)

Post by andyp73 »

If you don't use full paths for the executable files VirtualBox and VirtualBoxVM then you will find that the latter can't be found as you won't have /usr/lib/virtualbox in your path.

Most people access the files (especially from the command line) via the corresponding files in /usr/bin which are all soft links to /usr/bin/VBox which is the script file I suggested editing.

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
bashM0nkey
Posts: 2
Joined: 5. Jan 2019, 22:40

Re: "Virtualbox --startvm vm-name" no longer works (#18257)

Post by bashM0nkey »

I see...

Thanks for the tip on the location of the script file!
Last edited by socratis on 6. Jan 2019, 21:39, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
Post Reply