VBoxManage guestcontrol execute: XP to Linux Not Working

Discussions about using Linux guests in VirtualBox.
Post Reply
__LEO__
Posts: 7
Joined: 3. Feb 2012, 01:33
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Red Hat Linux (RHEL 5.7)

VBoxManage guestcontrol execute: XP to Linux Not Working

Post by __LEO__ »

1st off - it is my 2nd day using virtualbox. What a great tool! Great Job to all who contributed!

My problem:

I can not run a program/script on my guest OS from my host OS.

I type the following code into a cmd prompt:

Code: Select all

VBoxManage --nologo guestcontrol "Red Hat Linux" execute --image "/bin/ls" --username root --password 12345 --wait-exit --wait-stdout -- -l /usr
I get the following error:
VBoxManage: error: The guest execution service is not ready (yet).

When I check the log file on the VM I see the following "verr_not_found" -> Not sure what this means.

My Setup

Host OS Windows XP SP3
Guest OS Red Hat Linust (RHEL) 5.7
VirtualBox 4.1.8 for Windows hosts
Guest Additions Installed (Verified because I can share a folder from Host OS to Guest OS no problems)
Guest OS Network is working with NAT.

Additional
I have the VM up when running the above command. I launched it using the GUI. Linux is running without any problems.
I can share files using the SHARED FOLDER option in guest additions. So i know guest additions are installed.
I do everything as "root"
I ran VBoxManage list runningvms and even used the UUID -> no luck
I don't have a Internet connection, the Host and Guest OS are on an isolated network.
I put in a bogus user name and I got the same error.

I hope I gave enough information. If not, ask. I appreciate any insight you can offer. I spent all of day #2 on this one issue :|
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VBoxManage guestcontrol execute: XP to Linux Not Working

Post by Perryg »

Code: Select all

$ VBoxManage --nologo guestcontrol "Oracle-Linux-6.1" execute --image "/bin/ls" --username ***** --password ***** \
--wait-exit --wait-stdout -- -l /usr
total 180
dr-xr-xr-x.   2 root root 57344 Nov 29 11:46 bin
drwxr-xr-x.   2 root root  4096 Jun 24  2010 etc
drwxr-xr-x.   2 root root  4096 Jun 24  2010 games
drwxr-xr-x.  69 root root  4096 Nov 29 11:46 include
dr-xr-xr-x. 125 root root 69632 Nov 29 11:46 lib
drwxr-xr-x.  25 root root 12288 Nov 29 11:28 libexec
drwxr-xr-x.  11 root root  4096 Nov 29 08:49 local
dr-xr-xr-x.   2 root root 12288 Nov 29 09:58 sbin
drwxr-xr-x. 224 root root  4096 Nov 29 11:45 share
drwxr-xr-x.   4 root root  4096 Nov 29 09:58 src
lrwxrwxrwx.   1 root root    10 Nov 29 08:49 tmp -> ../var/tmpperry@perry-desktop:~$ 

Code: Select all

$ VBoxManage list runningvms
"Oracle-Linux-6.1" {05da1101-521e-4c28-a946-dbfd576e599e}
Does VBoxManage produce anything if you type it in the Windows command window? Just VBoxManage, not thing else.

But I never run as root! Never! Bad practice in my book.
__LEO__
Posts: 7
Joined: 3. Feb 2012, 01:33
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Red Hat Linux (RHEL 5.7)

Re: VBoxManage guestcontrol execute: XP to Linux Not Working

Post by __LEO__ »

Sorry for the late response. I couldn’t post due to “This site is currently in read-only mode due to SSO transition!”

My following cmd

Code: Select all

VboxManage guestcontrol “Linux Red Hat” execute –image “/bin/ls” –username root –password 12345
VBoxManage.exe error: The guest execution service is not ready (yet)
.

When I type VBoxManage on its own.

Code: Select all

VBoxManage
Oracle VM Virtual Box Command Line Management Interface Version 4.1.8
(C) 2005-2011 Oracle Corporation
All rights reserved:
 
Usage:
*omitted rest of output*

More information:

Here is the output from the virtualBox Log Viewer

**
03:09:10.843 Executing guest process “/bin/ls” as user “root” ...
03:09:10.843 Executing guest process “/bin/ls” as user “root” failed with VERR_NOT_FOUND


Side note - My task and why root:

I agree running as root is not ideal. However I must run as root. I’ll quickly explain the task: From a windows machine, take a LINUX OS tarball and upload it (using NFS only) to a Linux server so another machine can be booted remotely using the files from the server. To boot remotely, the tarball must be untarred where user and group are both root.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VBoxManage guestcontrol execute: XP to Linux Not Working

Post by Perryg »

Since VBoxManage produces output it is installed and working properly, but if VBoxManage list runningvms produces nothing then VirtualBox does not see the guest as running which it must be for the guestcontrol to work.
__LEO__
Posts: 7
Joined: 3. Feb 2012, 01:33
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Red Hat Linux (RHEL 5.7)

Re: VBoxManage guestcontrol execute: XP to Linux Not Working

Post by __LEO__ »

The VM is currently running. Here is the output:

Code: Select all

C:\Program Files\Oracle\VirtualBox>VBoxManage list runningvms
"Red Hat Linux" {07a1f39d-bf93-406c-a840-1f86ace08636}
I also have "shared folders" working. I am able to mount a shared folder on the host OS from the Linux guest OS.

Thoughts???
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VBoxManage guestcontrol execute: XP to Linux Not Working

Post by Perryg »

Not really. The only other time I have seen this reported was when the user had not started the VM AFAIK. After I made note of this to them they did not reply. For myself, I have never seen the issue.

You might post a ticket at bugtracker but be sure to post as much information as you can.
__LEO__
Posts: 7
Joined: 3. Feb 2012, 01:33
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Red Hat Linux (RHEL 5.7)

Re: VBoxManage guestcontrol execute: XP to Linux Not Working

Post by __LEO__ »

Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: VBoxManage guestcontrol execute: XP to Linux Not Working

Post by Technologov »

My test results show which "Guest Exec" command I used.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VBoxManage guestcontrol execute: XP to Linux Not Working

Post by Perryg »

Care to point us a little closer to the actual command you say you are using? I skimmed your link and could not find it. Way too much clutter. You should think about organising it a little better for readability.

Plus the command that the OP posted should work fine unless they are having other issues. Its the same one that is in the users manual and the exact same on I posted as well that does work for me.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: VBoxManage guestcontrol execute: XP to Linux Not Working

Post by Technologov »

Basically you did according to official docs, which should work:

Code: Select all

VBoxManage --nologo guestcontrol "Red Hat Linux" execute --image "/bin/ls" --username root --password 12345 --wait-exit --wait-stdout -- -l /us
I did:

Code: Select all

VBoxManage guestcontrol "my VM" execute --image "/bin/uname" --username root --password 123456 --wait-stdout -- -a
Documented inside the XLS.
__LEO__
Posts: 7
Joined: 3. Feb 2012, 01:33
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Red Hat Linux (RHEL 5.7)

Re: VBoxManage guestcontrol execute: XP to Linux Not Working

Post by __LEO__ »

@Perryg - I'll try and do a better job with targeting in on the issue. I run the VBoxManage guestcontrol command and get errors.

Code: Select all

VboxManage guestcontrol “Linux Red Hat” execute –image “/bin/ls” –username root –password 12345
VBoxManage.exe error: The guest execution service is not ready (yet)
@Technologov - I retried the command you suggested but it still does not work. Here is the output:

Code: Select all

VboxManage guestcontrol “Linux Red Hat” execute –image “/bin/ls” –username root –password 12345 --wait-stdout -- -a
VBoxManage.exe error: The guest execution service is not ready (yet)
What are your Host OS and Guest OS? I am using Host OS windows XP SP3 and Guest OS Linux 5.7 32bit server.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VBoxManage guestcontrol execute: XP to Linux Not Working

Post by mpack »

__LEO__ wrote:The guest execution service is not ready (yet)
While I've never had a need for this feature myself, I interpret the error message as meaning that the VM has no Guest Additions installed, or else the GAs are not of the version which supports the guestcontrol service.

Your stated method of verifying that the GAs are installed in not really enough to satisfy me. It leaves me with the doubt that you could be using network shared folders, plus it doesn't establish the GA version. Posting the output of "VBoxManage showvminfo <vmname>" would be more decisive IMHO.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: VBoxManage guestcontrol execute: XP to Linux Not Working

Post by Technologov »

To check G.A. version do:
(from VM windows)
machine->session info->runtime->guest additions ver
__LEO__
Posts: 7
Joined: 3. Feb 2012, 01:33
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Red Hat Linux (RHEL 5.7)

Re: VBoxManage guestcontrol execute: XP to Linux Not Working

Post by __LEO__ »

VBoxManage guestcontrol is now Working!

The guest additions were installed but not successfully. Meaning, I was able to use shared folders but the graphics portion of guest additions was not working. In a dialogue with a co-worker we discovered I compiled the guest additions against a xen kernel by accident. When I compiled again against a non-xen kernel everything worked.

In other words, kernel 2.6.18-274.el5-xen-i686 did not work with the installation of guest additions. Kernel 2.6.18-274.el5-i686 did work. The xen kernel was corrupted and I had to run the non-xen one.

I will close out the bug I created. The solution was "Do not install guest additions against a *xen* kernel".
bleve97
Posts: 17
Joined: 16. Jun 2011, 14:10
Primary OS: OpenSolaris other
VBox Version: OSE other
Guest OSses: XP, windows SBS

Re: VBoxManage guestcontrol execute: XP to Linux Not Working

Post by bleve97 »

for what it's worth and for googlers ... I had the same problem with a Linux (CentOS 6.2) host and windows guest, a reinstall of the guest additions seems to have fixed it.
Post Reply