Original draft by Hari Kannan

Introduction

Purpose

This is the requirement/functional specification for a feature to allow users to append the display name of a guest VM to the internal name (the name with which cloudstack creates the VM on the actual hypervisor) of a guest VM. This feature follows a request from the field that admins preferred to have this facility to locate guest VMs easily when fielding customer calls. This helps especially in vmware deployments (vCenter).

Related jira tickets

https://issues.apache.org/jira/browse/CLOUDSTACK-778

Explanation of “Names” in cloudstack

  • Display Name: user can optionally specify a “name” when requesting a VM to be stood up – this name is purely a “GUI” name, as neither the hypervisor nor the OS running the guest VM knows about this name. Cloudstack stores and uses this name only for identification of the VM via the GUI.
  • Hostname: this is a unique UUID generated by CloudStack (‘output of hostname command in the guest VM’, but not the name known to vCenter/hypervisor).
  • Internal Name: created by CS (conforming to a spec) and this is the name known/displayed by vCenter/hypervisor as well. This is the name of the VM as it appears on the hypervisor platform.

Requirement

  • User provided Display Name needs to be appended to the Internal Name (can be seen by vCenter/ESX/other hypervisors).
  • Create a global setting that will enable this functionality, with default value to be false.
  • This setting of user provided instance name is possible only when VM is instantiated (for the first time).
  • This feature must be applicable to all supported hypervisors.

Feature Specifications and Architecture and Design description

New global parameter flag : vm.instancename.flag

Default : false

Behavior: If set to true, and the mgmt server restarted, all new guest VMs that are created with a display name value set to a valid string compliant with RFC 952, will have their instance names on the hypervisor platform in the form i-userid-vmid-display_name

APIs to modify:

None. The changes will be transparent to the existing API to create a guest VM.

Upgrade path:

    • Upgrade from 4.0 ACS to 4.1 ACS will add the global parameter vm.instancename.flag.

Vmsync functionality

The reason we append the display name to the internal name of the VM instead of completely overwriting the instance name with the display name is to preserve the functionality provided by existing vmsync scripts. vmsync is the feature that allows the Cloudstack mgmt server to know the current state of a VM (whether it is up or down). Cloudstack has naming conventions for the VMs that it creates/manages on hypervisors. Router VMs always are named in the format r-value-value. The CPVMs follow the convention v-value-value. SSVMs are named s-value-value, and guest VMs are named i-value-value. vmsync scripts collect information about VMs using this naming convention, and push this data back to the management server periodically (every minute, by default).

  • No labels