How to rename VM ( virtual machine ) name label on XenServer

Objective

The objective is to set a new name label on a existing XenServer’s VM ( virtual machine ).

Requirements

Privileged access to XenServer’s command line as well as configured ISO image storage containing an ISO image of the Linux distribution you wish to install.

Difficulty

EASY

Instructions

Identify VM’s UUID

In order to set/rename VM’s name label we fisrt need to identify its UUID. List all VM’s and take a note of a relevant UUID. Example:

# xe vm-list
uuid ( RO)           : bad8e456-df88-435d-ba12-3f0f6e54b2c6
     name-label ( RW): Control domain on host: xenserver
    power-state ( RO): running


uuid ( RO)           : 699dcb0c-e897-5bd4-30c1-ab1dd9a3ca4e
     name-label ( RW): Debian Jessie 8.0
    power-state ( RO): halted

Shutdown VM

If applicable shutdown your VM:

# xe vm-shutdown uuid=699dcb0c-e897-5bd4-30c1-ab1dd9a3ca4e

Rename VM

Now, we are ready to rename virtual machine label. For example we set new label name to Debian Jessie 8.5:

# xe vm-param-set name-label="Debian Jessie 8.5" uuid="699dcb0c-e897-5bd4-30c1-ab1dd9a3ca4e"

Confirm new label name change:

# xe vm-list
uuid ( RO)           : bad8e456-df88-435d-ba12-3f0f6e54b2c6
     name-label ( RW): Control domain on host: xenserver
    power-state ( RO): running


uuid ( RO)           : 699dcb0c-e897-5bd4-30c1-ab1dd9a3ca4e
     name-label ( RW): Debian Jessie 8.5
    power-state ( RO): halted


Comments and Discussions
Linux Forum