[vbox-dev] Make a program that list all VBoxHeadless process, and VRDE port number, using internal protocol ?
ramshankar.venkataraman at oracle.com
Mon Aug 20 08:39:40 PDT 2012
On 20/08/12 13:43, Oliver Loch wrote:
> something like this should work:
> vms=$(vboxmanage list runningvms | sed -E 's/^\"(.*)\".*/\1/g');
> for i in $vms; do
> read x _enabled x _address x _port x _multiconn x <
> <(vboxmanage showvminfo $i | grep -i vrde:);
> echo "$enabled $address $port $multicon";
While that may work, one must bear in mind that there are many reasons
to choose to use the API instead of using output from VBoxManage. The
output of VBoxManage is subject to change without notification or formal
versioning. Also with "showvminfo" you might want to take a look at the
"--machinereadable" parameter which is typically meant for such scripts.
If you're aware of these limitations and you just want a quick solution,
then the above approach would work.
> Am 20.08.2012 um 11:24 schrieb Aaron Lewis <the.warl0ck.1989 at gmail.com
> <mailto:the.warl0ck.1989 at gmail.com>>:
>> I'm not sure how should this work, I want to list all names of running
>> VMs (that started by VBoxHeadless), and its VRDE port number,
>> Then make a very simple client that utilize rdesktop to connect.
>> I can't just parse the .xml config for the machine, since some machine
>> doesn't specify a port number in its config (that VBoxHeadless will
>> find a random port number).
>> So I'm wondering, if any internal protocol could use here
>> Thanks !
>> Best Regards,
>> Aaron Lewis - PGP: 0xDFE6C29E ( http://keyserver.veridis.com
>> <http://keyserver.veridis.com/> )
>> Finger Print: 9482 448F C7C3 896C 1DFE 7DD3 2492 A7D0 DFE6 C29E
>> vbox-dev mailing list
>> vbox-dev at virtualbox.org <mailto:vbox-dev at virtualbox.org>
> vbox-dev mailing list
> vbox-dev at virtualbox.org
More information about the vbox-dev