of them might have extra ones. Note that all counts are
zero-based.
+Since Ganeti version 2.5, the environment will be cleaned up before
+being passed to scripts, therefore they will not inherit the environment
+in with which the ganeti node daemon was started. If you depend on any
+environment variables (non-Ganeti), then you will need to define or
+source them appropriately.
+
OS_API_VERSION
The OS API version that the rest of the environment conforms to.
The hypervisor of this instance.
DISK_COUNT
- The number of disks the instance has. The actual disk defitions are
+ The number of disks the instance has. The actual disk definitions are
in a set of additional variables. The instance's disk will be
numbered from 0 to this value minus one.
This is how the hypervisor will export the instance disks: either
read-write (``rw``) or read-only (``ro``).
+DISK_%N_UUID
+ The uuid associated with the N-th disk of the instance.
+
+DISK_%N_NAME
+ (Optional) The name, if any, associated with the N-th disk of the instance.
+
DISK_%N_FRONTEND_TYPE
(Optional) If applicable to the current hypervisor type: the type
of the device exported by the hypervisor. For example, the Xen HVM
NIC_%N_MAC
The MAC address associated with this interface.
+NIC_%N_UUID
+ The uuid associated with the N-th NIC of the instance.
+
+NIC_%N_NAME
+ (Optional) The name, if any, associated with the N-th NIC of the instance.
+
NIC_%N_IP
The IP address, if any, associated with the N-th NIC of the
instance.
NIC_%N_MODE
- The NIC mode, either routed or bridged
+ The NIC mode, routed, bridged or openvswitch
NIC_%N_BRIDGE
The bridge to which this NIC will be attached. This variable is
defined only when the NIC is in bridged mode.
NIC_%N_LINK
- If the NIC is in bridged mode, this is the same as
- ``NIC_%N_BRIDGE``. If it is in routed mode, the routing table
- which will be used by the hypervisor to insert the appropriate
- routes.
+ In bridged or openvswitch mode, this is the interface to which the
+ NIC will be attached (same as ``NIC_%N_BRIDGE`` for bridged). In
+ routed mode it is the routing table which will be used by the
+ hypervisor to insert the appropriate routes.
NIC_%N_FRONTEND_TYPE
(Optional) If applicable, the type of the exported NIC to the
instance, this can be one of: ``rtl8139``, ``ne2k_pci``,
``ne2k_isa``, ``paravirtual``.
+NIC_%d_NETWORK_NAME
+ (Optional) If a NIC network is specified, the network's name.
+
+NIC_%d_NETWORK_UUID
+ (Optional) If a NIC network is specified, the network's uuid.
+
+NIC_%d_NETWORK_FAMILY
+ (Optional) If a NIC network is specified, the network's family.
+
+NIC_%d_NETWORK_SUBNET
+ (Optional) If a NIC network is specified, the network's IPv4 subnet.
+
+NIC_%d_NETWORK_GATEWAY
+ (Optional) If a NIC network is specified, the network's IPv4
+ gateway.
+
+NIC_%d_NETWORK_SUBNET6
+ (Optional) If a NIC network is specified, the network's IPv6 subnet.
+
+NIC_%d_NETWORK_GATEWAY6
+ (Optional) If a NIC network is specified, the network's IPv6
+ gateway.
+
+NIC_%d_NETWORK_MAC_PREFIX
+ (Optional) If a NIC network is specified, the network's mac prefix.
+
+NIC_%d_NETWORK_TAGS
+ (Optional) If a NIC network is specified, the network's tags, space
+ separated.
+
OSP_*name*
Each OS parameter (see below) will be exported in its own
variable, prefixed with ``OSP_``, and upper-cased. For example, a
The ``INSTANCE_REINSTALL`` variable is set to ``1`` when this create
request is reinstalling an existing instance, rather than creating
-one anew. This can be used, for example, to preserve some data in the
+a new one. This can be used, for example, to preserve some data in the
old instance in an OS-specific way.
export
environment, and output diagnostic messages in case the validation
fails.
-.. highlight:: sh
-
For the ``dhcp`` parameter given as example above, a verification
-script could be::
+script could be:
+
+.. code-block:: bash
#!/bin/sh
variants for this OS, one per line. If this file is missing or empty,
then the OS won't be considered to support variants.
+Empty lines and lines starting with a hash (``#``) are ignored.
+
parameters.list
~~~~~~~~~~~~~~~
The rename script has been added. If you don't want to do any
changes on the instances after a rename, you can migrate the OS
-definition to version 5 by creating the rename script simply as::
+definition to version 5 by creating the rename script simply as:
+
+.. code-block:: bash
#!/bin/sh