UNIX socket path is too long
Host environment
- Operating system: macOS (currently reported, might affect other *NIX OSes)
- OS/kernel version: N/a
- Architecture: N/a
- QEMU flavor:
qemu-system-x86_64
andqemu-system-aarch64
(currently reported) - QEMU version: at least 7.2.0 onwards up until 8.0.0
- QEMU command line:
qemu-system-x86_64 -cpu qemu64,+pdpe1gb,-vmx,-svm -daemonize -device pvpanic -display none -kernel /Users/__USERNAME__/.local/share/kraftkit/runtime/6c767bcc-6ce4-443a-b80d-9d4876ae8a25/unikraft/bin/kernel -machine pc -m size=64M -monitor unix:/Users/__USERNAME__/.local/share/kraftkit/runtime/6c767bcc-6ce4-443a-b80d-9d4876ae8a25/qemu_mon.sock,server,nowait -name 6c767bcc-6ce4-443a-b80d-9d4876ae8a25 -nographic -no-reboot -S -parallel none -pidfile /Users/__USERNAME__/.local/share/kraftkit/runtime/6c767bcc-6ce4-443a-b80d-9d4876ae8a25/machine.pid -qmp unix:/Users/__USERNAME__/.local/share/kraftkit/runtime/6c767bcc-6ce4-443a-b80d-9d4876ae8a25/qemu_control.sock,server,nowait -qmp unix:/Users/__USERNAME__/.local/share/kraftkit/runtime/6c767bcc-6ce4-443a-b80d-9d4876ae8a25/qemu_events.sock,server,nowait -rtc base=utc -serial file:/Users/__USERNAME__/.local/share/kraftkit/runtime/6c767bcc-6ce4-443a-b80d-9d4876ae8a25/machine.log -smp cpus=1,threads=1,sockets=1 -vga none
Emulated/Virtualized environment
- Operating system: Not applicable
- OS/kernel version: N/a
- Architecture: N/a
Description of problem
At Unikraft we facilitate the construction and also runtime lifecycle management of ultra-lightweight virtual machine unikernels. We have developed kraft
, an open-source tool which facilitates this across a number of different virtual machine monitors, including QEMU.
We are receiving increased reports of the following error from our users:
could not start and wait for QEMU process: qemu-system-x86_64: -qmp unix:/Users/__USERNAME__/.local/share/kraftkit/runtime/37a7691a-d402-4760-b493-692bb8d0460a/qemu_control.sock,server,nowait: UNIX socket path '/Users/__USERNAME__/.local/share/kraftkit/runtime/37a7691a-d402-4760-b493-692bb8d0460a/qemu_control.sock' is too long
We systematically build the relevant QEMU process command line and arguments with flags via our Go SDK and include what has become an erroneously long UNIX path for the QAPI control socket which we use to manage instantiated VM instances.
This issue tracks the increasing of maximum path length for the -qmp
(and maybe other) flags which accept paths.
Steps to reproduce
- Install
kraft
, Unikraft's companion command-line client; - Update KraftKit's config file to include an arbitrarily long path for
runtime_dir
by editing~/.config/kraftkit/config.yaml
; - Start a QEMU unikernel instance with
kraft run --arch x86_64 --plat qemu unikraft.org/helloworld:latest