1

Whenever I try to connect to VM using virsh console <vm name> my screen hangs and displays:

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

I have found many solutions on the internet but nothing has worked for me and I am even not able to find the /etc/init directory as CentOS 7 has a different directory structure.

I need /etc/init directory to create a script which I found on the internet as a solution.

I am using only ssh connection and no GUI and I do not have any access to the physical machine.

2

Edit “/etc/sysconfig/grub” Add to end of GRUB_CMD_LINELINUX, “console=ttyS0”

example:

GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto rhgb quiet console=ttyS0"

Run the following commands as root:

stty -F /dev/ttyS0 speed 9600

grub2-mkconfig -o /boot/grub2/grub.cfg

systemctl start getty@ttyS0

Reboot the VM.

Try to run virsh console VMNAME

  • Thanks! I tried with speed 115200 and it worked fine also. I'm not sure if in the KVM realm the serial bit-rate has any meaning. – ndemou Dec 18 '17 at 19:53
1

I had the same issue right after virt-install, then after trying to connect to the guest, too. I tried all the suggested solutions but none of them helped. Then I realized that I forgot to install KVM. A simple 'yum -y install kvm' resolved the whole issue.

0

This also might be corrupted installation. Just faced that problem yesterday. The domain is existing, virsh shows that it is running, but in fact installation is not finished and it hangs up. Read more carefully messages during the installation process.

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.