Node-Virtualization / node-virtualbox

A JavaScript Library for Interacting with VirtualBox
MIT License
259 stars 68 forks source link

Multiple concurrent instances, stdin/out/err? #23

Closed maboiteaspam closed 9 years ago

maboiteaspam commented 9 years ago

Hi,

Reading the source it seems, only one instance can be run simultaneously ? Is it a limitation if vbox ?

Also, i was looking at exec, it won t give access to stdout / stderr / stdin. Is it a limitation of vbox ?

I m especially looking for windows support.

I d like to spawn some process on the remote and get their standard input/output to process them. I have poor knowledge of virtualbox, for the moment, i hope you can give me some input about what it can do or not.

michaelsanford commented 9 years ago

Hi @maboiteaspam,

I don't know of any reason (off the top of my head) that only one instance could be run at a time: you can refer to virtual machines by name and thereby control any number of them.

child_process.exec() does return stdin/out/err.

Do you mean you're looking to launch a machine and parse the stdin/out/err returned from the vboxmanage command-line? The problem with that, which is a limitation of the current (4.3) implementation of Oracle VM Virtualbox, is that the command to launch (and otherwise manipulate) the virtual machine's doesn't give much useful information.

Example:

$ vboxmanage startvm "demo" --type gui
Waiting for VM "demo" to power on...
VM "demo" has been successfully started.

By the third line, we know that the power button has been pressed, but we don't know anything else about the machine (i.e., whether it booted, or whether the BIOS even loaded). We only know that the machine's configuration didn't prevent it from starting, such as having 3D acceleration enabled on host hardware that doesn't support it.

(Sorry for the delay, I've been :airplane:.)

michaelsanford commented 9 years ago

Assuming issue now resolved.