Wednesday, November 19, 2008

KVM "TCP/IP error: VNC"

I got an error when attempting to use virt-manager to connect to the console of a virtual machine. TCP/IP error: VNC connection to hypervisor host got refused or disconnected! This seem to be from spawning a new console too fast after closing a console to the same machine. Here's a work-around:
[root@adama qemu]# virsh vncdisplay valk-b
[root@adama qemu]# vncviewer
This assumes you have X Window support.


  1. This comment has been removed by a blog administrator.

  2. Hi, and first thank you for the tip.

    I just like to give an other eventual solution that actually worked for me : Verify that in virt-manager application you have a local connection to qemu enabled. To do such a thing :

    File/Add Connection...
    Hypervisor=QEMU and Connection=LOCAL


  3. Right-click your hostname at the top. Click 'disconnect', then re-connect. That fixed it for me. Though, I'm curious why this would happen in the first place...

  4. i got the same error by accidentally delete "localhost" from my /etc/hosts file,none of virtual machines worked,so i put it back where it was, n works fine,.. let me know if it works for you redhat6 localhost localhost.localdomain localhost4 localhost4.localdomain4


  5. my virtual machine give me message vnc connection to hyperwiser host got refused give me please give me solution my email id