Skip to content

Tags Mechanism

Introduction

Tags mechanism allows controlling selection of a storage to place secondary disk on creation via API, migration, restoring from backup.

Details on tags:

  • Tag is a string marker created by the admin user. It can contain digits, letters, underscore or be empty.
  • Tag is assigned to storage in the Storage Manager on the storage creation, or on the storage editing. Same tag cannot be assigned twice to storages of the single KVM node.
  • Tag is assigned to secondary disks on the disk creation in UI or via API.

Tags Mechanism invocation scenarios:

Secondary disk creation via API

On secondary disk creation via API vserver-secondary-disk-create SolusVM administrator can control the disk location using input parameter 'tag' of the API call.

Following steps are performed to select storage for the disk:

  1. If parameter 'tag' passed in the API call SolusVM checks if the tag attached to some storage on the target node. If such storage found, the disk is created there and the tag is assigned to the disk.
  2. If 'tag' is not passed or if storage is not found by the tag, SolusVM checks value of system setting KVM Storage Tag Policy:

    tags_policy

    Do not fail new disk creation/migration/restore - disk is created on the default storage. If parameter 'tag' passed in the API call, it is assigned to the disk.

    Fail new disk creation/migration/restore - disk creation is interrupted with error.

disk_creation_api

Secondary disk creation in Admin UI

When new secondary disk is created in Admin UI, admin user selects target storage. If the storage tagged, the tag is assigned to the new disk.

disk_creation_UI

Migration and restoring from backup

On VM migration or restoring from backup SolusVM administrator also can control selection of the storage for disks creation.

Main disk is always restored on the default storage. Following steps are performed to select storage for secondary disk:

  1. If the disk has tag, SolusVM checks if the tag attached to some storage on the target node. If such storage found, the disk is created there.
  2. If disk has no tag or if storage is not found by the tag, SolusVM checks value of system setting KVM Storage Tag Policy:

Do not fail new disk creation/migration/restore - SolusVM creates disk on the default storage after confirmation by the user who launched the operation. If there is a tag on the disk, it remains the same.

Fail new disk creation/migration/restore - disk creation is interrupted with error.

migration_restore_flow

Disk tags

SolusVM administrator can find current disk tag and change it in section Secondary Disks in Admin UI > Virtual Servers > Server :

tags_disk_change

Back to top