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.

  • 1
    Support for domhostname is dependent on the hypervisor. I do not think KVM supports it. – sciurus Feb 28 '14 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.