User:Renich/Funtoo on KVM/Qemu and Virtio

From Funtoo
< User:Renich
Revision as of 08:57, 6 June 2014 by Renich (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Warning: This article is still in development

Funtoo is KVM/Qemu ready.

In order for it to work, you need to make sure that you've enabled Virtio support on the kernel.



Carry on until you reach the Configuring and installing the linux kernel section.

Step 1: Install Genkernel

emerge sys-kernel/genkernel

Step 2: Install the vanilla sources

emerge sys-kernel/vanilla-sources

Step 3: Start configuring and building the kernel

genkernel --all-ramdisk-modules --menuconfig all

Step 4: Search and enable the essential Virtio drivers

To be able to search for all Virtio options, just type / on the TUI (Terminal User Interface) and, then, type 'virtio'. Please, consult: KVM's website in order to get a list of options available in the Kernel's config.

Note: The console will let you know what is available. Pay special attention to the location section.

Step 5: Continue with Funtoo Linux Installation Guide

=== Step 6: boot.conf After installing boot-update, edit /etc/boot.conf and make it look something like:

"Funtoo Linux genkernel" {
        kernel kernel[-v]
        initrd initramfs[-v]
        params += real_root=auto
        params += real_rootfstype=btrfs
        params += real_rootflags=subvol=root
        params += doload=virtio_pci,virtio_blk,virtio_net

Basically, we added some parameters so we ensure our virtual machine boots.

This flag helps GRUB determine the fs type.
This flag adds the BtrFS flags we need in case we used a sub volume for the root fs.
Will take of loading the virtio drivers needed for your image to be functional.

Please, remember to run Boot-Update once you're done.


Boot the Guest

You should be able to boot the guest without problems. If you're using virt-manager, then just hit "play" on the Guest. If you're a commandline dude, please, issue the following command:

qemu-kvm -boot c -drive file=/var/lib/libvirt/images/funtoo.img,if=virtio -m 512