Ce contenu n'est pas disponible dans la langue sélectionnée.

20.28. Retrieving Guest Virtual Machine Information


20.28.1. Getting the Domain ID of a Guest Virtual Machine

The virsh domid command returns the guest virtual machine's ID. Note that this changes each time the guest starts or restarts. This command requires either the name of the virtual machine or the virtual machine's UUID.

Example 20.67. How to retrieve the domain ID for a guest virtual machine

The following example retrieves the domain ID of a guest virtual machine named guest1:
# virsh domid guest1
8
Copy to Clipboard Toggle word wrap
Note, domid returns - for guest virtual machines that are in shut off state. To confirm that the virtual machine is shutoff, you can run the virsh list --all command.

20.28.2. Getting the Domain Name of a Guest Virtual Machine

The virsh domname command returns the name of the guest virtual machine given its ID or UUID. Note that the ID changes each time the guest starts.

Example 20.68. How to retrieve a virtual machine's ID

The following example retrieves the name for the guest virtual machine whose ID is 8:
# virsh domname 8
guest1
Copy to Clipboard Toggle word wrap

20.28.3. Getting the UUID of a Guest Virtual Machine

The virsh domuuid command returns the UUID or the Universally Unique Identifier for a given guest virtual machine or ID.

Example 20.69. How to display the UUID for a guest virtual machine

The following example retrieves the UUID for the guest virtual machine named guest1:
# virsh domuuid guest1
r5b2-mySQL01 4a4c59a7-ee3f-c781-96e4-288f2862f011
Copy to Clipboard Toggle word wrap

20.28.4. Displaying Guest Virtual Machine Information

The virsh dominfo command displays information on that guest virtual machine given a virtual machine's name, ID, or UUID. Note that the ID changes each time the virtual machine starts.

Example 20.70. How to display guest virtual machine general details

The following example displays the general details about the guest virtual machine named guest1:
# virsh dominfo guest1
Id:             8
Name:           guest1
UUID:           90e0d63e-d5c1-4735-91f6-20a32ca22c48
OS Type:        hvm
State:          running
CPU(s):         1
CPU time:       32.6s
Max memory:     1048576 KiB
Used memory:    1048576 KiB
Persistent:     yes
Autostart:      disable
Managed save:   no
Security model: selinux
Security DOI:   0
Security label: system_u:system_r:svirt_t:s0:c552,c818 (enforcing)
Copy to Clipboard Toggle word wrap
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2026 Red Hat
Retour au début