Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to make remote/kvm system rebootable if kernel crashes?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
PM17E5
Apprentice
Apprentice


Joined: 10 Feb 2009
Posts: 241

PostPosted: Fri Jun 16, 2017 2:00 pm    Post subject: How to make remote/kvm system rebootable if kernel crashes? Reply with quote

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.
Back to top
View user's profile Send private message
kikko
Apprentice
Apprentice


Joined: 29 Apr 2014
Posts: 260
Location: Milan, IT

PostPosted: Thu Jun 22, 2017 4:25 pm    Post subject: Re: How to make remote/kvm system rebootable if kernel crash Reply with quote

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)
_________________
Regards

root is the root of all evil
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7127
Location: almost Mile High in the USA

PostPosted: Thu Jun 22, 2017 5:26 pm    Post subject: Reply with quote

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.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Fri Jun 23, 2017 12:30 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7127
Location: almost Mile High in the USA

PostPosted: Sat Jun 24, 2017 10:07 pm    Post subject: Reply with quote

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.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum