0

The company where i start working for 2 months ago have an old hypervisor running with a few virtual machines. I logged in into one of the machines (at that point i did not know it was a virtual one) and changed some network settings and restarted the network services. Since that moment i'm not able to get access that machine over the network anymore so i think i made a mistake with the configuration. Where i start searching to the fysical server i found out that it was a VM.

I do have access to the VM via SSH and can see that the VM is still running (virsh list) but cannot access the machine with virsh console machinename as it hangs on Escape character is ^].

Off course i googled this error and found out that it has something to do with the ?? virtual serial port configuration ?? and/or some ?? grub settings ??, both on the VM. The solutions are all based on the fact that i can login into the VM but i can't....

Is there a way to get access to the VM via the hypervisor SSH connection?

Some info about the hypervisor. Don't blame the versions as this hypervisor (and VM's) will be replaced soon:

  • OS: CentOS release 6.4 (Final)
  • Using library: libvirt 0.10.2
  • Used API: QEMU 0.10.2
  • Running Hypervisor: QEMU 0.12.1

result of yum info qemu-kvm

Installed Packages
Name        : qemu-kvm
Arch        : x86_64
Epoch       : 2
Version     : 0.12.1.2
Release     : 2.506.el6_10.7

I have no idea if this is enough information to help me out but i have also no idea what information could be required more. Please let met know when something is missing, thanks for the help in advance!

2 Answers 2

2

Running virsh console machinename is connecting to a console on the system, for example, like connecting a serial cable and dumb terminal to a physical host. If your VM doesn’t have a getty listening on that console port, then you shouldn’t expect to see anything.

Depending on the configuration of the host, it might auto detect a virtual console if you add a console=ttyS0 to the kernel arguments for the bootloader (assuming it’s the first serial console).

Also, you can manually start it on the VM with systemctl start [email protected] if you can log in some other way.

1
  • But if you can't, you have to trash the entire VM, recreate it and then make sure to setup all this? Commented Mar 21, 2022 at 17:27
1

I had no access to the VM's in some way as i made a mistake in the network configuration and virsh console machinename did not work as explained in my question.

After searching a long time i found the tool Virtual Machine Manager (https://virt-manager.org/). I installed it on an Ubuntu desktop machine and was able to connect the tool to the Hypervisor. The tool provides an ssh interfaces for the virtual machines which actually did work. This way i was able to fix the network settings and configure a serial interface.

I would say, problem solved

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .