Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Add VM variables

Edit variable values

To edit a variable:

  • Click the pencil edit button next to the Value
  • Click ok
  • for the VM template.

    Excerpt
    nameAdd VM variables

    Before you deploy a VM, you can set guest variables to pass user data to your VM. This functionality uses cloud-init and requires appropriate templates. In private cloud, the templates must have the guest setup flag set to cloud init. The administrator can add default variables

    Include Page
    Add VM variablesAdd VM variables
    Tip

    This functionality is available through the API. The platform stores variables in the VirtualMachine variables attribute, which is a dictionary of keys and values. See “Update a virtual machine” in VirtualMachinesResource

    Info

    You can modify VM variables before you deploy the VM

    Note

    Check your cloud providers' documentation for their recommendations about confidential information in variables

    To add VM variables:

    1. Go to Virtual datacenters and edit a VM that is not deployed

    2. Go to Variables

    3. Enter a Key and Value

      1. The length of these can be up to 255 characters each 

    4. Click Add

       Edit a VM and add variablesImage Added
    5. Add more variables as required

    6. To delete a variable click the trash can symbol beside the Key. To edit the Value of a variable, click the pencil edit button beside the Value

    7. To apply changes to variables, and other changes to the VM, click Save

    Delete

    ...

    Read guest variables

    To delete a variable:

    1. Click the X in the left column beside the variable Name.
    2. To apply changes to variables, and other changes to the VM, click Save
    Read Guest Variables

    ...

    Related pages

    ...

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

    Cloud

    Method

    Variable location

    Private

    Cloud-init

    • On the cloud-init ISO, which has the label config-2.

    • The variables file is openstack/latest/vm-variables.rc

    Private

    Hypervisor tools

    On ESXi, run this command on the guest to get the value of a variable:
    vmtoolsd --cmd "info-get guestinfo.abiquo.<variable-name>"

    Private

    Hypervisor tools

    For vCloud Director, hypervisor tools does not support variables

    Public

    Cloud-init

    The variables are stored in the /opt/abiquo-env.rc file

    Amazon

    Cloudbase-init
    ec2launchv2
    ec2lanch
    ec2config

    On Windows, the variables are stored in the
    C:\ProgramData\Abiquo\abiquo-env.rc file

    Azure

    Cloud-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, use cloud-init to read the variables from custom data.