I have installed KVM server and all works fine. while I reading the book I need to connect virtual machine through the console. I mean, with virsh console machine.

but when I do it, the virsh hangs on Escape character is ^]

Connected to domain <vm name>
Escape character is ^]

Use virt-manager to view your machine if using KVM.

  1. install xming on your local System/Desktop.
  2. Enable X11 forwarding yes on your ssh configuration file of KVM server. Reload sshd service.
  3. Open putty--> enable x11 --> enter KVM server ip--> Login with user.
  4. In terminal use virt-manager & to open a graphical console of Vm's.
  5. After You would need to define a tty to be used as a virtual console. In case you have access to your vm either using vnc or ssh create the following file

    vi /etc/init/ttyS0.conf**
  6. The content should be something like

    start on stopped rc RUNLEVEL=[2345]
    stop on runlevel [!2345]
    exec /sbin/getty -L 38400 ttyS0 vt102  # This is your term type vt102
  7. Save these settings and subsequently from your host machine

    virsh shutdown {domain-id, domain-name or domain-uuid}; service libvirtd stop; service libvirtd start; virsh start {domain-id, domain-name or domain-uuid}
  8. virsh console {domain-id, domain-name or domain-uuid}

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.