KVM virsh set and get title and description

desc domain [[--live] [--config] | [--current]] [--title] [--edit] [--new-desc New description or title message]

Show or modify description and title of a domain. These values are user fields that allow to store arbitrary textual data to allow easy identification of domains. Title should be short, although it's not enforced. (See also metadata that works with XML based domain metadata.)

Flags --live or --config select whether this command works on live or persistent definitions of the domain. If both --live and --config are specified, the --config option takes precedence on getting the current description and both live configuration and config are updated while setting the description. --current is exclusive and implied if none of these was specified.

Flag --edit specifies that an editor with the contents of current description or title should be opened and the contents saved back afterwards.

Flag --title selects operation on the title field instead of description.

If neither of --edit and --new-desc are specified the note or description is displayed instead of being modified.

Examples

Set and get title:

# virsh desc fedora-27 'newtitle' --title
Domain title updated successfully

# virsh desc fedora-27 --title           
newtitle

# virsh list --title    
 Id    Name                           State      Title               
----------------------------------------------------------------------------------
 5     fedora-27                      running    newtitle            

Set and get description:

1
2
3
4
5
# virsh desc fedora-27 'newdesc'     
Domain description updated successfully

# virsh desc fedora-27           
newdesc

These changes can also be made with virsh edit domain.

Edit Report
Pub: 11 Mar 2018 08:47 UTC
Edit: 11 Mar 2018 08:47 UTC
Views: 487