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"
(copying all randisk modules into the initrd image) |
(article updated to use update-env and enable virtio during boot.) |
||
Line 1: | Line 1: | ||
{{ | {{fancywarning | This article is still in development}} | ||
Funtoo is [[KVM]]/[[wikipedia:Qemu | Qemu]] ready. | Funtoo is [[KVM]]/[[wikipedia:Qemu | Qemu]] ready. | ||
Line 29: | Line 29: | ||
=== Step 5: Continue with [[Funtoo_Linux_Installation#Installing_a_Bootloader | Funtoo Linux Installation]] Guide === | === Step 5: Continue with [[Funtoo_Linux_Installation#Installing_a_Bootloader | 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 [[wikipedia:GNU_GRUB | GRUB]] determine the fs type. | |||
;real_rootflags | |||
:This flag adds the [[BTRFS_Fun | 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. | |||
to | Please, remember to run [[Package:Boot-Update | 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 == | == Reference == |
Revision as of 08:55, June 6, 2014
This article is still in development
In order for it to work, you need to make sure that you've enabled Virtio support on the kernel.
Pre-Requisites
- You are following the Funtoo Linux Installation Guide.
- You figured out how to use Genkernel by reading the Genkernel Quick Start Tutorial.
- You are using the most current vanilla-sources
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.
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