Note

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "User:Renich/Funtoo on KVM/Qemu and Virtio"

From Funtoo
Jump to navigation Jump to search
(article updated to use update-env and enable virtio during boot.)
m (wikilinks whitespace elimination)
 
Line 1: Line 1:
{{fancywarning | This article is still in development}}
{{fancywarning | This article is still in development}}


Funtoo is [[KVM]]/[[wikipedia:Qemu | Qemu]] ready.  
Funtoo is [[KVM]]/[[wikipedia:Qemu|Qemu]] ready.  


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


;real_rootfstype
;real_rootfstype
:This flag helps [[wikipedia:GNU_GRUB | GRUB]] determine the fs type.
:This flag helps [[wikipedia:GNU_GRUB|GRUB]] determine the fs type.


;real_rootflags
;real_rootflags
:This flag adds the [[BTRFS_Fun | BtrFS]] flags we need in case we used a sub volume for the root fs.
:This flag adds the [[BTRFS_Fun|BtrFS]] flags we need in case we used a sub volume for the root fs.


;doload
;doload
: Will take of loading the virtio drivers needed for your image to be functional.
: Will take of loading the virtio drivers needed for your image to be functional.


Please, remember to run [[Package:Boot-Update | Boot-Update]] once you're done.  
Please, remember to run [[Package:Boot-Update|Boot-Update]] once you're done.  


== Testing ==
== Testing ==

Latest revision as of 08:57, June 6, 2014

   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.

Pre-Requisites

Procedure

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.

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

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

Testing

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

Troubleshooting

Reference