mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-11 20:00:28 +00:00
Update moby tool and qemu fixes
- no longer uses several of the `mkimage-*` tools in favour of dogfooding with `linuxkit` and using the `mkimage` package. - fix the qemu docker container fallbacks to work better when multiple paths are used for disks and the image. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
@@ -17,13 +17,14 @@ clean_up() {
|
||||
|
||||
trap clean_up EXIT
|
||||
|
||||
moby build -output tar,kernel+initrd,iso-bios,iso-efi,img-gz,qcow2,vmdk -name "${NAME}" test.yml
|
||||
moby build -disable-content-trust -output tar,kernel+initrd,iso-bios,iso-efi,img,img-gz,qcow2,vmdk -name "${NAME}" test.yml
|
||||
[ -f "${NAME}.tar" ] || exit 1
|
||||
[ -f "${NAME}-kernel" ] || exit 1
|
||||
[ -f "${NAME}-initrd.img" ] || exit 1
|
||||
[ -f "${NAME}-cmdline" ] || exit 1
|
||||
[ -f "${NAME}.iso" ] || exit 1
|
||||
[ -f "${NAME}-efi.iso" ] || exit 1
|
||||
[ -f "${NAME}.img" ] || exit 1
|
||||
[ -f "${NAME}.img.gz" ] || exit 1
|
||||
[ -f "${NAME}.qcow2" ] || exit 1
|
||||
# VHD currently requires a lot of memory, disable for now
|
||||
|
23
test/cases/010_platforms/000_qemu/040_run_raw/test.sh
Normal file
23
test/cases/010_platforms/000_qemu/040_run_raw/test.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Check that raw image boots in qemu
|
||||
# LABELS:
|
||||
|
||||
set -e
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
NAME=qemu-raw
|
||||
|
||||
clean_up() {
|
||||
# remove any files, containers, images etc
|
||||
rm -rf ${NAME}* || true
|
||||
}
|
||||
|
||||
trap clean_up EXIT
|
||||
|
||||
moby build -output img -name "${NAME}" test.yml
|
||||
[ -f "${NAME}.img" ] || exit 1
|
||||
linuxkit run qemu "${NAME}.img" | grep -q "Welcome to LinuxKit"
|
||||
exit 0
|
14
test/cases/010_platforms/000_qemu/040_run_raw/test.yml
Normal file
14
test/cases/010_platforms/000_qemu/040_run_raw/test.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
kernel:
|
||||
image: "linuxkit/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:1b8a7e394d2ec2f1fdb4d67645829d1b5bdca037
|
||||
- linuxkit/runc:3a4e6cbf15470f62501b019b55e1caac5ee7689f
|
||||
- linuxkit/containerd:deaf5bf838bf7f131c2287ecff3ed9835b0497e2
|
||||
onboot:
|
||||
- name: poweroff
|
||||
image: "linuxkit/poweroff:7404cf2295df89ccfa2dda41997a28307a90cf28"
|
||||
command: ["/bin/sh", "/poweroff.sh", "10"]
|
||||
trust:
|
||||
org:
|
||||
- linuxkit
|
Reference in New Issue
Block a user