Tiny Core Linux
General TC => Tiny Core on Virtual Machines => Topic started by: Duncan on March 13, 2012, 08:41:52 AM
-
Hi, has anyone got the guest execution VBoxManage API to work with the virtualbox additions module?
I've installed the additions module and got shared folders to work fine but whenever I fire up a VboxManage command such as:
VBoxManage guestcontrol <machineid> exec --image /bin/ls --username tc --password <password>
I get:
VBoxManage.exe: error: The guest execution service is not ready (yet).
even though the machine itself obviously is ready.
Thanks!
-
I haven't had a need for this feature so far, therefore I had to do a bit of RTFM followed by some "poking around". But in the end its pretty simple: Apart from having the virtualbox-ose-additions.tcz extension installed one also needs to ensure that the "active component on the inside" is running. I therefore started it via sudo VBoxService, and following this 'VBoxManage guestcontrol' worked for me.
Some further remarks:- to be able to "see" the 'stdout' output the '--wait-stdout' option has to be added to the 'VBoxManage guestcontrol' command,
- to be able to "see" the 'stderr' output the '--wait-stderr' option has to be added to the 'VBoxManage guestcontrol' command; doing this OTOH prevented me to "see" the 'stdout' output and even adding '--wait-stdout' as well did not change the outcome,
- any arguments for the remote command execution need to be added at the end of the 'VBoxManage guestcontrol' command (preceded by '--').
So all together: if one wants to run 'ls -lRa /home/tc/.local' (in a VM called 'TC4') this could be done like this: C:\>VBoxManage guestcontrol TC4 exec --image /bin/ls --username tc --wait-stdout -- -lRa /home/tc/.local
/home/tc/.local:
total 0
drwxr-sr-x 3 tc staff 60 Mar 13 22:02 .
drwxr-sr-x 3 tc staff 120 Mar 13 22:02 ..
drwxr-sr-x 2 tc staff 40 Mar 13 22:02 bin
/home/tc/.local/bin:
total 0
drwxr-sr-x 2 tc staff 40 Mar 13 22:02 .
drwxr-sr-x 3 tc staff 60 Mar 13 22:02 ..
-
Maro, that is brilliant! thank you very much! ;D