Gentoo 10.1 Installation in kvm guest

Preliminary

To perform a net install of Gentoo in a virtual machine called "gentiane" - with 8 GB disk, bridge, sound support and virtio - to a remote host called "bareil", use the following syntax:

# vm-create -c bareil -s 8 -S -b br0 -V -u gentoo gentiane
Pool install refreshed

Starting install...
Allocating 'gentiane.img'                           | 8.0 GB     00:00     
Creating domain...                                  |   0  B     00:00

You can use the option -t to print the whole command to be passed to virt-install to standard output before executing it:

# vm-create -t -c bareil -s 8 -S -b br0 -V -u gentoo gentiane
virt-install 
--connect=qemu+ssh://bareil/system 
--ram=512 
--arch=i386 
--vcpus=1 
--video=vga 
--soundhw=default 
--description="gentiane (gentoo) - vm guest on host bareil" 
--os-variant=virtio26 
--disk vol=install/install-x86-minimal-20110222.iso,device=cdrom 
--boot=cdrom,hd,network 
--disk pool=default,size=8 
--network bridge=br0 
--vnc 
--vnclisten=0.0.0.0 
--name=gentiane

iso URL: ftp://ftp.osuosl.org/pub/gentoo/releases/x86/current-iso/install-x86
-minimal-20110308.iso

A detailled description of the vm-create script has been posted in the openSUSE forum: vm-create : create kvm virtual machines.

* Notice that the option --boot=cdrom,hd,network is not available on virt-install version prior to 5003.

Booting Gentoo

Booting Gentoo Setting Gentoo Setting Gentoo Setting Gentoo

You can use the mousewheel to navigate in the slideshow

Installing Gentoo

Normally the vm should have got an IP already, which you can check with ifconfig. Otherwise you can run net-setup eth0 or configure the network manually.

create partitions sfdisk /dev/vda mke2fs /dev/vda1 mkfs.ext4 /dev/vda3 Download stage3 Extract stage3 Dowload and extract portage snapshot Select mirror Gentoo Download Mirrors Gentoo RSYNC Mirrors chrooting emerge gentoo-sources emerge gentoo-sources emerge gentoo-sources emerge gentoo-sources emerge genkernel emerge genkernel emerge genkernel enable virtio compile kernel configure system emerge system tools emerge system tools emerge system tools emerge system tools emerge grub emerge grub install grub emerge mc emerge mc emerge vim emerge vim emerge gentoolkit emerge gentoolkit exit chroot and shut down

You can use the mousewheel to navigate in the slideshow