Page 1 of 1

automatic init procedure required

Posted: 23. Mar 2013, 23:04
by itiodo
Hallo,
now I use virtualbox for some monthes to have access to a linux guest system. Yes but I miss something.
Is not it possible to do this procedure automatically in a way:
Start virtualbox, start the linux guest machine, (unfreeze in case), mount (you call that different: make them availabel for the vm) one or two distinguished USB-devices and than on the linux guest trigger an initialization script (as root user) in order to mount certain filesystem and encrypted containers?

As my system is - slow - I loose much time and concentration doing that once and once again manually in the gui.

Any idea, comment will be thanked

Re: automatic init procedure required

Posted: 24. Mar 2013, 01:17
by itiodo
Hallo,
let me add something to the above post:
In manual ch08.html I fount that there is a command line interface. Furthermore I found
options that could meet my needs:

Code: Select all

 startvm                   <uuid>|<name>...
                            [--type gui|sdl|headless]

 controlvm                 <uuid>|<name>
                            pause|resume|

                  	    usbattach <uuid>|<address> |
                            usbdetach <uuid>|<address> |

 guestcontrol <vmname>|<uuid> exec[ute]
            --image <path to program> --username <name>
            [--passwordfile <file> | --password <password>]
So let me modify my question:
Do you think it is possible to acchieve my aims with the above options?
Can you give a hint or an example, maybe a batch script somewhere for studying how to use them?
Thanks in advance

Re: automatic init procedure required

Posted: 24. Mar 2013, 19:43
by itiodo

Code: Select all

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe guestcontrol linux exec
 --image "/sbin/ifconfig" --username root --password "sgfsf"


VBoxManage.exe: error: The guest execution service is not ready (yet).

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe list runningvms
"linux" {6b245cae-6968-40f8-a191-a8b8952e175d}

Here
-/ticket/10221
say that it might be a bug.

I use Version 4.1.20

What can I do? Waiting for a new version? Choosing another program?

I really would be glad if I got a hint.

Tia