[vbox-dev] VB xml format
snetile at cox.net
Fri Nov 5 00:28:10 UTC 2021
Why am I getting this?
Please stop and take me off of this feed!
Sent from my iPhone
> On Nov 4, 2021, at 11:04 AM, Klaus Espenlaub <klaus.espenlaub at oracle.com> wrote:
> Hi Bernard,
>> On 2021-11-04 09:11, Bernard Giannetti wrote:
>> Hi Stéphane, fth0, Klaus,
>> Thanks for your responses. I have done some digging/reading...
>> Looking at
>> and the functions prefixToString() and optionToString(), I see the characters that define group and machine, but there are some other characters which don't make sense...but that I don't believe affects my situation. That 'gc' and 'go' both refer to groups, that fixes my immediate issue.
>> Longer term, I will ditch parsing the XML configuration file as this is chasing my tail at best! After some investigation, I believe I can use:
>> VBoxManage list vms --long
>> to give me each machine's name, UUID and group. Hopefully this works as expected as this is preferable to calling the API via a COM wrapper or the web server interface.
> My recommendation would be using the Python API bindings since that's rather convenient, balancing flexibility with pretty limited impact from API changes (that said, the Python API bindings may not be available in a certain VirtualBox installation, depending on how annoying the support of a specific Linux distro's Python 2/3 migration strategy is).
> If you insist using "VBoxManage" (one of the main source of useless error reports e.g. from Vagrant fans) then I would at least hope you go for an approach which will be a little more reliable ("VBoxManage list vms --long" produces human readable output, i.e. it can change relatively arbitrarily): go for a two-stage approach. First get the list of VM UUIDs with "VBoxManage list vms", and then get the detail information you need with "VBoxManage showvminfo uuid --machinereadable". The output of the latter should be a lot easier to process. It is kind of a list of shell variables (anything with an all lowercase name is the associated VBoxManage modifyvm option name, anything mixed case has no direct correspondence), with string values possibly containing spaces in "".
> In principle this could be also offered with "VBoxManage list vms --long", but so far no one has thought of this and therefore it wouldn't work for existing VirtualBox releases.
>> Thanks again for the help,
> vbox-dev mailing list
> vbox-dev at virtualbox.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vbox-dev