Virtual Server Metadata

The metadata of a virtual server can be used to send arbitrary information from the Danube Cloud GUI or API into the guest operating system. Bidirectional communication between the hypervisor and the virtual server is provided through an emulated serial link. The metadata is stored as key=value string pairs. Each key can be maximum 128 characters long and the total size of all values cannot exceed 2 MB.

See also

Metadata of a virtual server can be modified via the virtual server’s setting page in the GUI.

Common Virtual Server Metadata

Danube Cloud uses following virtual server metadata for post-configuration of virtual servers installed from its images:

  • root_authorized_keys - List of public SSH keys separated by newlines (\n) that are automatically added to a virtual server from the virtual server’s owner profile.
  • cloud-init:user-data - Cloud-init configuration directive used to change the root password for KVM virtual servers.
  • user-script - A post-configuration script used to update the root’s authorized_keys on SunOS zones.
  • hostname - A full VM OS hostname that can be picked up and set by cloud-init’s default scripts.


Following virtual server metadata is reserved by Danube Cloud:

  • resize_needed

Managing Virtual Server Metadata via the API

user@laptop:~ $ es login -username admin -password $PW

user@laptop:~ $ es set /vm/ \
    -mdata parameter1:value1,parameter2:value2,parameter3:value3

user@laptop:~ $ es set /vm/

Retrieving and Manipulating Metadata on a Running Virtual Server


The mdata-list, mdata-get, mdata-put and mdata-delete command line programs are used to read, update and delete metadata within a virtual server. These tools are part of the mdata-client package.

Reading Metadata on a Running Virtual Server

[root@myserver ~] mdata-list

[root@myserver ~] mdata-get parameter1

Updating Metadata on a Running Virtual Server


Users inside a virtual server may at any time modify the metadata, which may affect applications that use these metadata.

[root@myserver ~] mdata-put parameter4 value4

[root@myserver ~] mdata-delete parameter3

user@laptop:~ $ es set /vm/ -force  # Update VM configuration to see the changed metadata in Danube Cloud