Closed mpas closed 4 months ago
I think it maybe related to the fact eib is not supported on arm64 (yet), see https://github.com/suse-edge/edge-image-builder/issues/68
Just in case, can you run the same command with debug enabled?
Note: maybe we need to check the architecture and fail gracefully instead of letting libvirt fail 😅 /cc @jdob
Will run with debug enabled..
What I actually want to achieve is to run eib on my Arm machine and create a x64 ISO image. That is something we have been doing with previous SLE Micro versions / setups that worked nicely.
In that setup we added the following docker arguments to produce compatible ISO images.
PLATFORM_ARG="--platform linux/amd64"
BUILD_CMD="docker buildx build"
So if there are any tips on how to achieve this, then that would be great!
Have run with debug enabled like in the linked issue.
# eib-build.log
2024-02-05T14:19:05.346Z INFO combustion/network.go:50 Configuring network component...
2024-02-05T14:19:05.346Z INFO combustion/network.go:54 Skipping network component, configuration is not provided
2024-02-05T14:19:05.346Z INFO combustion/rpm.go:32 Skipping RPM component. Configuration is not provided
2024-02-05T14:19:05.346Z INFO combustion/elemental.go:29 Skipping elemental registration component, configuration is not provided
2024-02-05T14:19:05.347Z INFO combustion/certificates.go:28 skipping certificate configuration, no certificates provided
2024-02-05T14:19:24.390Z FATAL eib/main.go:96 An error occurred building the image: modifying the raw image inside of the ISO: running the image modification script: exit status 1
main.main
/src/cmd/eib/main.go:96
runtime.main
/usr/lib64/go/1.21/src/runtime/proc.go:267
# raw-build.log
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: create: flags = 0, handle = 0xaaab14666f90, program = guestfish
libguestfs: trace: add_drive "/eib/_build/build-Feb06_08-19-46/raw-extract/SLE-Micro.raw" "format:raw"
libguestfs: trace: add_drive = 0
libguestfs: trace: is_config
libguestfs: trace: is_config = 1
libguestfs: trace: launch
libguestfs: trace: max_disks
libguestfs: trace: max_disks = 255
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 48, release: 6, extra: , >
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
libguestfs: launch: program=guestfish
libguestfs: launch: version=1.48.6
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfsbRgghY
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu aarch64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.2.2
supermin: rpm: detected RPM version 4.14
supermin: rpm: detected RPM architecture aarch64
supermin: rpm: detected zypper version 1.14.66
supermin: package handler: opensuse/rpm
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: build: /usr/lib64/guestfs/supermin.d
supermin: reading the supermin appliance
supermin: build: visiting /usr/lib64/guestfs/supermin.d/base.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/daemon.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/excludefiles type uncompressed excludefiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/hostfiles type uncompressed hostfiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/init.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/packages type uncompressed packages
supermin: build: visiting /usr/lib64/guestfs/supermin.d/udev-rules.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/zz-scripts.tar.gz type gzip base image (tar)
supermin: mapping package names to installed packages
supermin: resolving full list of package dependencies
supermin: build: 133 packages, including dependencies
supermin: build: 6092 files
supermin: build: 4306 files, after matching excludefiles
supermin: build: 4307 files, after adding hostfiles
supermin: build: 4298 files, after removing unreadable files
supermin: build: 4305 files, after munging
supermin: kernel: looking for kernel using environment variables ...
supermin: kernel: looking for kernels in /lib/modules/*/vmlinuz ...
supermin: kernel: looking for kernels in /boot ...
supermin: kernel: kernel version of /boot/vmlinux-5.14.21-150500.55.44-default.gz = 5.14.21-150500.55.44-default (from filename)
supermin: kernel: picked modules path /lib/modules/5.14.21-150500.55.44-default
supermin: kernel: kernel version of /boot/Image-5.14.21-150500.55.44-default = 5.14.21-150500.55.44-default (from filename)
supermin: kernel: picked modules path /lib/modules/5.14.21-150500.55.44-default
supermin: kernel: picked vmlinuz /boot/vmlinux-5.14.21-150500.55.44-default.gz
supermin: kernel: kernel_version 5.14.21-150500.55.44-default
supermin: kernel: modpath /lib/modules/5.14.21-150500.55.44-default
supermin: ext2: creating empty ext2 filesystem '/var/tmp/.guestfs-0/appliance.d.taysixy4/root'
supermin: ext2: populating from base image
supermin: ext2: copying files from host filesystem
supermin: ext2: copying kernel modules
supermin: ext2: creating minimal initrd '/var/tmp/.guestfs-0/appliance.d.taysixy4/initrd'
supermin: ext2: wrote 44 modules to minimal initrd
supermin: renaming /var/tmp/.guestfs-0/appliance.d.taysixy4 to /var/tmp/.guestfs-0/appliance.d
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: checking for previously cached test results of /usr/bin/qemu-system-aarch64, in /var/tmp/.guestfs-0
libguestfs: command: run: /usr/bin/qemu-system-aarch64
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -help
libguestfs: command: run: /usr/bin/qemu-system-aarch64
libguestfs: command: run: \ -display none
libguestfs: command: run: \ -machine virt,accel=kvm:tcg
libguestfs: command: run: \ -device ?
libguestfs: command: run: echo '{ "execute": "qmp_capabilities" }' '{ "execute": "query-qmp-schema" }' '{ "execute": "quit" }' | QEMU_AUDIO_DRV=none "/usr/bin/qemu-system-aarch64" -display none -machine "virt,accel=kvm:tcg" -qmp stdio
libguestfs: did not understand QMP monitor output from /usr/bin/qemu-system-aarch64 (ignored)
libguestfs: command: run: echo '{ "execute": "qmp_capabilities" }' '{ "execute": "query-kvm" }' '{ "execute": "quit" }' | QEMU_AUDIO_DRV=none "/usr/bin/qemu-system-aarch64" -display none -machine "virt,accel=kvm:tcg" -qmp stdio
libguestfs: did not understand QMP monitor output from /usr/bin/qemu-system-aarch64 (ignored)
libguestfs: saving test results
libguestfs: QMP parse error: '[' or '{' expected near end of file (ignored)
libguestfs: QMP parse error: '[' or '{' expected near end of file (ignored)
libguestfs: qemu version: 7.1
libguestfs: qemu mandatory locking: yes
libguestfs: qemu KVM: enabled
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "force_kvm"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/tmp"
libguestfs: finished testing qemu features
libguestfs: trace: get_backend_setting "gdb"
libguestfs: trace: get_backend_setting = NULL (error)
/usr/bin/qemu-system-aarch64 \
-global virtio-blk-pci.scsi=off \
-no-user-config \
-nodefaults \
-display none \
-machine virt,gic-version=host,accel=kvm:tcg \
-cpu host \
-m 1280 \
-no-reboot \
-rtc driftfix=slew \
-kernel /var/tmp/.guestfs-0/appliance.d/kernel \
-initrd /var/tmp/.guestfs-0/appliance.d/initrd \
-object rng-random,filename=/dev/urandom,id=rng0 \
-device virtio-rng-pci,rng=rng0 \
-device virtio-scsi-pci,id=scsi \
-drive file=/eib/_build/build-Feb06_08-19-46/raw-extract/SLE-Micro.raw,cache=writeback,format=raw,id=hd0,if=none \
-device scsi-hd,drive=hd0 \
-drive file=/var/tmp/.guestfs-0/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none \
-device scsi-hd,drive=appliance \
-device virtio-serial-pci \
-serial stdio \
-chardev socket,path=/tmp/libguestfsw1Hf2W/guestfsd.sock,id=channel0 \
-device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
-append "panic=1 console=ttyAMA0 earlyprintk=pl011,,0x9000000 ignore_loglevel efi-rtc=noprobe edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=UUID=3f1e326b-a98a-4bbd-9c8a-4ac276bd2297 selinux=0 guestfs_verbose=1 TERM=xterm"
Could not access KVM kernel module: No such file or directory
qemu-system-aarch64: failed to initialize kvm: No such file or directory
qemu-system-aarch64: falling back to tcg
qemu-system-aarch64: gic-version=host requires KVM
libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages
libguestfs: child_cleanup: 0xaaab14666f90: child process died
libguestfs: sending SIGTERM to process 177
libguestfs: error: /usr/bin/qemu-system-aarch64 exited with error status 1, see debug messages above
libguestfs: error: guestfs_launch failed, see earlier error messages
libguestfs: trace: launch = -1 (error)
libguestfs: trace: close
libguestfs: closing guestfs handle 0xaaab14666f90 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsbRgghY
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsw1Hf2W
Related to the message that Could not access KVM kernel module: No such file or directory
. I tried setting the option LIBGUESTFS_BACKEND_SETTINGS=force_tcg
inside the modify-raw-image.sh.tpl
. But this gives another error..
I found this option reading the thread below. https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1740696.html
Thanks for the interest in this. Unfortunately, the initial release will not support aarch64 but we're definitely looking into introducing it at a later point.
Closing as a duplicate of the feature request for aarch #193
I am running the builder with the minimal example on a Mac M1 and get an
libguestfs
error. Not sure what is causing this.I am building the image using the following configuration:
Please let me know if any other info is needed!