Copyright (C) 2008-2021 Oliver Bohlen.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.

A copy of the license is included in the section entitled "GNU Free Documentation License".


This documentation comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.

Howto: Thinclient - Kernel-based Virtual Machine - KVM for Gentoo Linux

This is a small documentation how I added the Kernel-based Virtual Machine (KVM) Support to the Thinclient.
Before you emerge the software you should make the chages in make.conf and package.keywords.
For creating a 10GB harddiskimage for KVM you can use the following command:

qemu-img create /path/to/your/vmimage.img 10G

For booting a CD/DVD from the physical CD/DVD-Drive i a VM with networking and 1GB RAM you can use the following command
kvm -hda /path/to/your/vmimage.img -cdrom /dev/cdrom -m 1024 -net nic,macaddr=00:1d:92:ab:cd:ef -net tap,ifname=tap0,script=no,downscript=no -name myvm1 -boot d

For Passthrough an USB Device you can add e.g. "-usb -usbdevice host:aaaa:bbbb" to the commandline.
kvm -hda /path/to/your/vmimage.img -cdrom /dev/cdrom -m 1024 -net nic,macaddr=00:1d:92:ab:cd:ef -net tap,ifname=tap0,script=no,downscript=no -name myvm1 -boot d -usb -usbdevice host:aaaa:bbbb

For getting the correct USB ID you cal use the lsusb-command.

If you want to use this solution you need the following howto(s) finished:

Required software

The required software has to be installed with the following command(s):
chroot /gtc/test /bin/bash -c 'env-update &>/dev/null && source /etc/profile && emerge app-emulation/qemu-kvm'

Changes in /gtc/test/etc/thinclient/startup/gtc-startupconfig

File permissions:
Owner: root
Group: root
Permissions: -r-x------

Click here for a download of the complete file: /gtc/test/etc/thinclient/startup/gtc-startupconfig

Changed on 20.04.10
Issued by olli
Beginning line 13

This is for loading the KVM-Drivers automatically at system startup

g_echo_ok "Loading KVM modules"
modprobe kvm >/dev/null 2>&1
modprobe kvm-amd >/dev/null 2>&1
modprobe kvm-intel >/dev/null 2>&1

Please send a feedback to: doc<at>

Howto listing
File Index

Here you can find the official Gentoo Linux Forums where you can find a lot of answers.

Here a link to the official Gentoo Linux Homepage.

Edit Howto

About / Impressum

Click here for About / Impressum


If you want to support my work you can find my Amazon whishlist here