Skip to content

Environment Variables

Environment variables can be used inside a virtfile, for example:

Example usage of environment vars

default:
  machine:
  - vcpu: ${CPUS:2}
  - memory: ${MEM:2048}
  • Environment variables can be used like $VAR or ${VAR}
  • To define a default value, use ${VAR:default} such as in the above example
  • For a literal "$" symbol, use $$.