Nelem wrote:I am presuming that putenv sets an environment variable inside the VM.
You should have a searchable PDF included with your installation (C:\Program Files\Oracle\VirtualBox\doc). Take advantage of that fact, and use it to search the PDF for the terms that interest you. "putenv" in your example.
Although in this case, something is not right, you might have discovered an omission (or two). Because although the "startvm" from the command line mentions the "
[-E|--putenv <NAME>[=<VALUE>]]" option, in the section
8.12 VBoxManage startvm there's not a single mention of that option or what it does.
On the other hand, if you look at section
8.34 VBoxManage guestcontrol, you see the exact same "
[-E|--putenv <NAME>[=<VALUE>]]" option, only this time it explains that this option will modify the environment of the guest, prior to running a command inside the guest.
Nelem wrote:How can I retrieve the environment variable?
How you retrieve the variable depends on the guest. For an Ubuntu guest for example, getting the searchable path is a matter of doing:
Nelem wrote:I am hoping to start multiple instances of the same VM (on different hosts) and set some different configuration on each instance. Can it be done this way?
I'm not sure what you have in mind, or how you envision things getting implemented, or what "configuration" you're thinking of changing. But there's also the "guestproperty" option that you could look at. Ch.
8.33 VBoxManage guestproperty for the details.
Edit: On an Ubuntu 16.04-32bit, I couldn't get the variable that I passed with the startvm option. |