Tiny Core Linux

General TC => Tiny Core on Virtual Machines => Topic started by: Duncan on March 13, 2012, 08:41:52 AM

Title: Virtualbox Additions Guestcontrol
Post 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!
Title: Re: Virtualbox Additions Guestcontrol
Post by: maro on March 13, 2012, 03:14:27 PM
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:
So all together: if one wants to run 'ls -lRa /home/tc/.local' (in a VM called 'TC4') this could be done like this:
Code: [Select]
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 ..
Title: Re: Virtualbox Additions Guestcontrol
Post by: Duncan on March 14, 2012, 04:36:47 AM
Maro, that is brilliant! thank you very much!  ;D