KVM Migration Reference

Traducciones al Español
Estamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
Deprecated

This guide has been deprecated and is no longer being maintained.

Create a Linode account to try this guide with a $ credit.
This credit will be applied to any valid services used during your first  days.

Linode’s current virtualization stack is built on KVM. Previously, Linode used Xen, and older Linodes may still be on the Xen platform. Along with the increased performance of KVM virtualization, several details are different between Xen and KVM Linodes.

Note
This guide mentions Xen architecture. However, all Linode instances now use KVM architecture. This guide may be updated or replaced in the future; or it may be retained for historical purposes.

What’s Changed?

Block Device Assignment

Device assignments for Xen Linodes were labeled as:

  • /dev/xvda
  • /dev/xvdb
  • /dev/xvdc

KVM Linodes use the “sd” naming convention:

  • /dev/sda
  • /dev/sdb
  • /dev/sdc

Console

On KVM Linodes, the console device moves from hvc0 in Xen to ttyS0 .

Virtual Machine Mode

Virtual machine mode determines whether devices inside your virtual machine are paravirtualized or fully virtualized. The differences are listed below:

Device TypeParavirtualizationFull-virtualization
BlockVirtio SCSIIDE
NetVirtio Nete1000
SerialttyS0ttyS0
Note
If you’re unfamiliar with these distinctions, choose paravirtualization

Custom Kernel Configuration

If you want to build your own guest kernel, you must include the following modules:

  • KVM Guest
  • Enable Virtio drivers
  • IDE support (for full virtualization)
  • e1000 support (for full virtualization)

For standard paravirtualized KVM Linodes, add the following to your kernel .config file:

CONFIG_KVM_GUEST=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_PCI_LEGACY=y
CONFIG_BLK_DEV_SD=y
CONFIG_SCSI_VIRTIO=y
CONFIG_VIRTIO_NET=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y

For full virtualization, use the following parameters:

CONFIG_E1000=y
CONFIG_ATA_PIIX=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y

You should also move your block device assignments to be sequential, without skipped block devices.

Direct Disk Boot

An upgrade to KVM Linode includes the ability to do Direct Disk booting. Choosing Direct Disk means we will boot the Linode using the Master Boot Record on your boot device:

Direct Disk Boot Mode.

How to Enable KVM

All new Linodes are created as KVM guests. Older Xen Linodes will need to migrate to KVM before receiving other plan upgrades.

If your Linode is currently running on Xen, go to the Linode’s Dashboard page. In the bottom right of the sidebar is an “Upgrade to KVM” link. Click on the link and follow the instructions to upgrade:

The KVM Upgrade Button.

Troubleshooting

There have been a few minor issues reported when upgrading to KVM. If you’re using any of the Linux distributions listed below and encounter an issue, please read on. If you are running a different distribution, or encounter an issue not listed here, please contact Support.

Migration from Xen

If you are using a kernel other than the one provided by Linode and you migrate from Xen to KVM, you may encounter this error on boot:

![KVM Kernel Boot Error: “This isn’t a KVM kernel! Fix your configuration profile.”](kvm-kernel-error.png “KVM Kernel Boot Error: “This isn’t a KVM kernel! Fix your configuration profile.””)

This means your Kernel doesn’t have the necessary virtio drivers. To resolve:

  1. Edit your Linode’s configuration profile to use the Linode-supplied kernel.

  2. Boot your Linode to update the kernel and regenerate initramfs. The steps will differ depending on your distribution. Assuming you’re still using Grub 1 (Legacy Grub), refer to the Run a Distribution-Supplied Kernel with PV-GRUB guide.

  3. Update /boot/grub/menu.lst to use your newly built kernel and initramfs file.

  4. Edit your Linode’s configuration profile back to the previous setting.

Note
Remember to check Glish as well as Lish while testing. Without the grub terminal set to serial, your startup output may only appear on the Glish output.

CentOS 6

There are some reported cases of Linodes running CentOS 6.X that lose network connectivity after upgrading. To resolve this issue, open the LISH Console and run:

rm -f /etc/udev/rules.d/70-persistent-net.rules

Then, reboot the Linode.

Arch Linux

An upstream change to persistent device naming in systemd has resulted in broken connectivity for any Linode running Arch Linux on a KVM host. The latest version of systemd (226-1+) uses “Predictable Network Interface Names,” which prevent the network interface on our platform from being brought online at boot.

You can disable the use of Predictable Network Interface Names with the command below.

ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules

If you have already upgraded and lost connectivity to your Linode, you will need to use the LISH Console to regain access to your Linode to run this command. Once you’ve done so, reboot your system.

This page was originally published on


Your Feedback Is Important

Let us know if this guide was helpful to you.


Join the conversation.
Read other comments or post your own below. Comments must be respectful, constructive, and relevant to the topic of the guide. Do not post external links or advertisements. Before posting, consider if your comment would be better addressed by contacting our Support team or asking on our Community Site.
The Disqus commenting system for Linode Docs requires the acceptance of Functional Cookies, which allow us to analyze site usage so we can measure and improve performance. To view and create comments for this article, please update your Cookie Preferences on this website and refresh this web page. Please note: You must have JavaScript enabled in your browser.