No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Yann Weber 257a8fb5e0 First version of scripts 4 weeks ago
scripts First version of scripts 2 weeks ago
.gitignore Initial commit 4 weeks ago
Makefile First version of scripts 2 weeks ago
README First version of scripts 2 weeks ago
config.mk.inc First version of scripts 2 weeks ago

README

Linux VZ5 :
===========

Compile test & install kernel image for vz5's VM.

Dependencies :
==============

- expect
- qemu/kvm
- `apt build-dep linux-image-amd64`
- `apt install linux-source`

Optionnal dependencies :
------------------------
- virsh
- debvm

Install & config :
==================

Copy sample config `cp config.mk.inc config.mk`
Edit configuration file to meet your needs `editor config.mk`

Then you will need kernel sources & kernel configuration.

Kernel sources :
-----------------

* Automatic method (debian based) :

Run `make upgrade`
Will fetch the last kernel source in /usr/src

* Manual method :

Decompress kernel sources and create a symlink `linux-source` pointing to it.

Kernel config :
---------------

Kernel configuration are versionned in a separetd git repository in kernel-config/ directory.
In order to seed config file with yours run :
```
mkdir kernel-config
git -C kernel-config/ init
cp /path/to/.config kernel-config/kernel.config
git -C kernel-config add kernel.config
git -C kernel-config commit -m 'Initial kernel config'
```

Usage :
=======

Get current status with `make`

Compile a kernel `make kernel`

Test a kernel on virsh vm `make test`
If make test is run with root, we will try to start TEST_VM_NAME with virsh
If make test is run without privileges, a disk image will be built using debvm
and the tests will be run using qemu.
NOTE : the user needs access to /dev/kvm (adduser username kvm)

Install kernel `make install`

Commit tested kernel config `make commit-config`

Notes :
=======

All scripts & tests are designed for monolitic kernel without initrd.

Kernel config should contains :
```
# CONFIG_BLK_DEV_INITRD=n
# CONFIG_MODULES=n
```

KVM has a documentation about kernel tuning for guest that can be found here :
https://www.linux-kvm.org/page/Tuning_Kernel#Kernel_for_guest_with_paravirtualization

The script `scripts/checkconfig.sh` check that kernel config fits basic needs.