"VBoxManage guestcontrol execute" problem in Mandriva 2010

Discussions about using Linux guests in VirtualBox.
Post Reply
upokatik
Posts: 3
Joined: 14. Jun 2010, 12:05
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Mandriva 2010

"VBoxManage guestcontrol execute" problem in Mandriva 2010

Post by upokatik »

I'm running Mandriva 2010 Linux guest under VirtualBox 3.2.4 that is installed on Windows 7 host system.
Guest Mandriva system successfully starts by executing VBoxManage startvm command:

Code: Select all

C:\Users\DIM>VBoxManage startvm "Mandriva2010"
Oracle VM VirtualBox Command Line Management Interface Version 3.2.4
(C) 2005-2010 Oracle Corporation
All rights reserved.

Waiting for the VM to power on...
VM has been successfully started.
However, when I try to run /bin/ls using VBoxManage guestcontrol execute command, I get the following console output:

Code: Select all

C:\Users\DIM>VBoxManage --nologo guestcontrol execute "Mandriva2010" "/bin/ls" --username user --verbose
Waiting for guest to start process ...
And that waiting process looks never-ending, I do not get any error messages, but that waiting could last for hours. And I didn't notice any changes in guest Mandriva system during that time...
Could you please clarify me what is the reason of that problem? Am I wrong anywhere above? Or VBoxManage guestcontrol execute functionality is not fully implemented by now?
Thanks in advance!
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: "VBoxManage guestcontrol execute" problem in Mandriva 2010

Post by Technologov »

try :
VBoxManage guestcontrol exec "LinuxVM" "/bin/ping" --arg "10.0.2.2 -c 4" --verbose --wait-for stdout --username myuser --password 123456
upokatik
Posts: 3
Joined: 14. Jun 2010, 12:05
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Mandriva 2010

Re: "VBoxManage guestcontrol execute" problem in Mandriva 2010

Post by upokatik »

Technologov wrote:try :
VBoxManage guestcontrol exec "LinuxVM" "/bin/ping" --arg "10.0.2.2 -c 4" --verbose --wait-for stdout --username myuser --password 123456
Oops, I'm sorry to say, that was fully my fault. I used rather old version of VBoxGuestAdditions, and as soon as I updated it to 3.2.4, the problem gone away:

Code: Select all

C:\Users\DIM>VBoxManage guestcontrol execute "Mandriva2010" "/bin/ping" --arg "10.0.2.2 -c 4" --verbose --wait-for stdout --username user
Oracle VM VirtualBox Command Line Management Interface Version 3.2.4
(C) 2005-2010 Oracle Corporation
All rights reserved.

Waiting for guest to start process ...
Process '/bin/ping' (PID: 5006) started
Waiting for process to exit ...
PING 10.0.2.2 (10.0.2.2) 56(84) bytes of data.
64 bytes from 10.0.2.2: icmp_seq=1 ttl=63 time=4.39 ms
64 bytes from 10.0.2.2: icmp_seq=2 ttl=63 time=0.385 ms
64 bytes from 10.0.2.2: icmp_seq=3 ttl=63 time=0.361 ms
64 bytes from 10.0.2.2: icmp_seq=4 ttl=63 time=0.323 ms

--- 10.0.2.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 0.323/1.366/4.396/1.749 ms
Exit code=0 (Status=2 [successfully terminated], Flags=0)
Sorry for my inattention.

The next thing I did: created a simple shell-script ls.sh with the following contents:

Code: Select all

/bin/ls
 
And tried to call it via VBoxManage guestcontrol execute. Unfortunately, command failed, here is console output:

Code: Select all

C:\Users\DIM>VBoxManage --nologo guestcontrol execute "Mandriva2010" "/home/user/ls.sh" --username user --verbose --wait-for stdout
Waiting for guest to start process ...
Process '/home/user/ls.sh' (PID: 5562) started
Waiting for process to exit ...

!!Assertion Failed!!
Expression: <none>
Location  : /mnt/tinderbox/add-3.2/src/VBox/Runtime/r3/posix/process-posix.cpp(396) int RTProcCreateEx(const char*, const char* const*, RTENVINTERNAL*, unsigned
 int, const RTHANDLE*, const RTHANDLE*, const RTHANDLE*, const char*, const char*, RTPROCESS*)
execve returns -1 errno=8


Process error details:
ERROR: Process terminated via signal with status '5'
Details: code E_FAIL (0x80004005), component Guest, interface IGuest, callee

Exit code=5 (Status=3 [terminated by signal], Flags=0)
However, ls.sh successfully works if I call it inside Mandriva guest system.
Is it a known issue?
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: "VBoxManage guestcontrol execute" problem in Mandriva 2010

Post by Technologov »

try to add --password 123456
upokatik
Posts: 3
Joined: 14. Jun 2010, 12:05
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Mandriva 2010

Re: "VBoxManage guestcontrol execute" problem in Mandriva 2010

Post by upokatik »

Added --password 123456 and executed the command like this:

Code: Select all

VBoxManage --nologo guestcontrol execute "Mandriva2010" "/home/user/ls.sh" --username user --password 123456 --verbose --wait-for stdout
But got the same output as earlier, with "Assertion Failed" message...
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: "VBoxManage guestcontrol execute" problem in Mandriva 2010

Post by Technologov »

hmm... it is worth asking other users/vbox team...
mschwartz
Posts: 92
Joined: 18. Oct 2010, 21:01
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: ubuntu

Re: "VBoxManage guestcontrol execute" problem in Mandriva 2010

Post by mschwartz »

Any reason why this wouldn't work under cygwin?

VBoxManage.exe guestcontrol exec 'xanadu maverick' "/bin/ls" --verbose --username mschwartz --password 12345678


Oracle VM VirtualBox Command Line Management Interface Version 3.2.12
(C) 2005-2010 Oracle Corporation
All rights reserved.

ERROR: Could not find a registered machine named 'xanadu maverick'
Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBox, interface IVirtualBox, callee IUnknown
Context: "FindMachine(Bstr(a->argv[0]), machine.asOutParam())" at line 286 of file VBoxManageGuestCtrl.cpp


If I echo $PATH, c:\Program Files\Oracle\VirtualBox is on the path (obviously). The command works from a cmd.exe shell window.
Post Reply