KVMifying an old distro

My linode is old (just passed it's 11th birthday; oh how it's grown from the small linode64… getting a linode is one of the best choices I ever made!). The root disk is a full disk; there's no partition table or boot sector. And, yeah, it's a 32bit distro (CentOS 5… I know; I know… I'll have to rebuild as CentOS 7 some day!)

What would I need to do to convert this to boot KVM using my distro kernel?

2 Replies

To use the kernel provided by your distro using KVM I guess you would need to do this:

  • Install whatever package in your distro provides the kernel.

  • Make sure you never use disk names in a hardcoded way. For example, if you have /dev/xvdb somewhere in /etc/fstab

and KVM makes the disk to become /dev/sdb, you will have a problem. Use UUID= everywhere.

  • Create a grub1-style menu.lst which is suitable for your system. The easy way to do that is to install the grub-legacy package itself if it's available.

  • In the Linode dashboard, change the boot method to pv-grub-x86_32 (as you said your system was 32-bit).

  • If your (still) Xen system boots this way, congratulations, you should be ready to switch to KVM using your own kernel, as you asked.

  • Open a support ticket to ask that your linode is changed to KVM.

  • Select grub-legacy as the boot method in the Linode dashboard. The external grub-legacy will read your menu.lst and will load and boot your kernel.

Note: I have not tested the KVM linodes myself, so take everything I said with a grain of salt…

Edit: I have edited this post after realizing that pv-grub follows grub1 syntax.

Tested it today.

You may happily forget about grub-legacy. It is a lot easier if you switch to KVM as the first step. Installing grub2 and your distro-provided kernel may be done after that.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct