2457f22baf
The Makefile In tests/ could help build a VM image using Fedora cloud image as base image, or, user can specify a base image using BASE_IMAGE=<path/to/file>. The current repo will be packeged and installed in the image, so the image could be used as a test image to test kexec-tools. The image building is splited into two steps: The first step, it either convert the base image to qcow2 or create a snapshot on it, and install basic packages (dracut, grubby, ...) and do basic setups (setup crashkernel=, disable selinux, ...). See tests/scripts/build-scripts/base-image.sh for detail. The second step, it creates a snapshot on top of the image produced by the previous step, and install the packaged kexec-tools of current repo. See tests/scripts/build-scripts/test-base-image.sh for detail. In this way, if repo's content is changes, `make` will detect it and only rebuild the second snapshot which speed up the rebuild by a lot. The image will be located as tests/output/test-base-image, and in qcow2 format. And default user/password is set to root/fedora. Signed-off-by: Kairui Song <kasong@redhat.com> Acked-by: Dave Young <dyoung@redhat.com>
12 lines
405 B
Bash
Executable File
12 lines
405 B
Bash
Executable File
#!/bin/sh
|
|
|
|
img_inst_pkg grubby\
|
|
dnsmasq\
|
|
openssh openssh-server\
|
|
dracut-network dracut-squash squashfs-tools ethtool snappy
|
|
|
|
img_run_cmd "grubby --args systemd.journald.forward_to_console=1 systemd.log_target=console --update-kernel ALL"
|
|
img_run_cmd "grubby --args selinux=0 --update-kernel ALL"
|
|
img_run_cmd "grubby --args crashkernel=224M --update-kernel ALL"
|
|
img_run_cmd "mkdir -p /kexec-kdump-test"
|