# How to make remote/kvm system rebootable if kernel crashes?

## PM17E5

Apologies in advance if this is a stupid question and has been answered before I would appreciate some pointers as far as how to make a system rebootable under remote KVM in the event that a kernel setting or some other reason prevents it from booting and is no longer responsive to ctrl alt del? I have a machine that has remote kvm but does not have remote power management so if I'm testing something I don't want to keep bugging datacenter techs to do a reboot.

Edit:

I believe I may have just found the solution while configuring my kernel, I see a feature called CONFIG_PANIC_TIMEOUT and I set it to 5. Maybe someone can help chime in if this is the correct solution or if this covers most of the lockups that I can experience.

----------

## kikko

Hi PM17E5,

 *PM17E5 wrote:*   

> I have a machine that has remote kvm

 

What do you mean? Which is the hypervisor (Qemu/Libvirt/Xen)? Furthermore, are you worried about host or guest kernel panic?

I can assume you are trying to do something with Qemu guests running on KVM-enabled remote host. If this is the case, i guess you can simply kill the qemu process and start it over again.

 *PM17E5 wrote:*   

> I see a feature called CONFIG_PANIC_TIMEOUT

 

This will automatically reboot the machine if a kernel panic occurs, which can be useful in the case of a panic but not if the remote machine "freezes" for other issues (e.g. becomes unreachable)

----------

## eccerr0r

I was about to make a warning about "KVM" meaning "Keyboard Video Mouse" (i.e. console multiplexer) versus "Kernel Virtual Machine"...

In either case on run of the mill x86 machines, it is a serious limitation.  On server class (general) and server class x86 machines with lights out monitors, this can be mitigated.  Even Intel's Management Engine and their older IPMI is helpful in this case, which is available on some higher end machines.

----------

## szatox

 *Quote:*   

> I believe I may have just found the solution while configuring my kernel, I see a feature called CONFIG_PANIC_TIMEOUT and I set it to 5. Maybe someone can help chime in if this is the correct solution or if this covers most of the lockups that I can experience.

 Yes, this will make your machine reboot after kernel panic.

The downside is you can't make a photo of your screen anymore, but if it's a server, you usually want to keep it up,

Now, KV* terminals usually have a reset button on them too, so that manual reset should be one click away from you.

Also, datacenters tend to provide you options for hardware reset in their management panel provided via website. This one is particularly useful, since it does not even require you to start KV session.

* to avoid confusion between remote terminal and hypervisor, I suggest sticking to _old_ terminology for the terminal. The old one is Keyboard-Video (without Mouse), hence KV

----------

## eccerr0r

I believe many keyboard-video-mouse setups will pass the magic sysrq key, so enabling that option in the kernel can let you use this hotkey to force a reboot if the user deems the machine unrecoverable.  It is not as failsafe as having hardware LOM support.

Not all KVM setups will pass through the key sequence, however.

----------

