# Retreiving the real hostname of VMs under KVM using Virsh

In KVM Support, virsh list --all lists all the domain name created and not the real host name of the VM. i.e it will list only the display name which will be specified during the creation of VMs.

However as very well known thing is, user can change the real hostname of the VM which is under KVM, after the change is made the domain name which was specified during the creation remains the same.

virsh list --all lists the same domain name and not the real hostname of VM

So how can i retrieve the real hostname of the VM under KVM using virsh command?

virsh man page says that hostname can be displayed with virsh domhostname <domain> command. libvirt version 0.9.12 does not support this, but with libvirt version 1.2.1 this option is available.