Read guest variables from a VM

The variable location will depend on the method of guest setup that you are using for your VM. Here are some general guidelines.

CloudMethodVariable location
PrivateCloud-init
  • The variables are stored on the cloud-init ISO, which has the label "config-2".
  • The variables file is "openstack/latest/vm-variables.rc"
PrivateHypervisor tools

On ESXi, run the following command in the guest to get the value of a variable:

vmtoolsd --cmd "info-get guestinfo.abiquo.<variable-name>"
PrivateHypervisor toolsFor vCloud Director, hypervisor tools does not support variables
PublicCloud-initThe variables are stored in the /opt/abiquo-env.rc file
AmazonCloudbase-init
ec2launchv2
ec2lanch
ec2config
On Windows, the variables are stored in the C:\ProgramData\Abiquo\abiquo-env.rc file
AzureCloud-init

On Windows, according to the Azure documentation on custom data

Custom data is placed in %SYSTEMDRIVE%\AzureData\CustomData.bin as a binary file, but it is not processed.
If you wish to process this file, you will need to build a custom image, and write code to process the CustomData.bin..

On Linux, you can use cloud-init to read the variables from custom data.


Copyright © 2006-2022, Abiquo Holdings SL. All rights reserved