Package: autopkgtest
Version: 5.28
Severity: normal
X-Debbugs-Cc:
isaac@is.having.coffee
I want to pass additional kernel command line arguments to QEMU using the "-append" argument (the image is being booted with "-kernel" and "-initrd", so I cannot pass additional arguments using the bootloader), using the "--qemu-option" argument. E.g:
autopkgtest bash -- qemu --qemu-options "-append 'root=/dev/vda init=/sbin/init plus additional parameters' -kernel /boot/vmlinuz -initrd /boot/initrd.img" --boot none image.img
This should result in the command line option "-append 'root=/dev/vda init=/sbin/init plus additional parameters'" being added to QEMU.
However, the value passed to "--qemu-option" is cut up into individual arguments using the Python function split() ("qemu_options=args.qemu_options.split()" in autopkgtest-virt-qemu). This causes the quoted section to be ignored and split up into
additional arguments (irrelevant output removed):
autopkgtest-virt-qemu: DBG: full qemu command-line: ['qemu-system-aarch64', ... '-append', "'root=/dev/vda", 'init=/sbin/init', 'plus', 'additional', "parameters'", '-kernel', '/boot/vmlinuz', '-initrd', '/boot/initrd.img']
Each individual element of the "-append" argument is interpreted as an individual argument which is then additionally passed to qemu-system, as opposed to just being a single argument.
The output should look more like this:
autopkgtest-virt-qemu: DBG: full qemu command-line: ['qemu-system-aarch64', ... '-append', 'root=/dev/vda init=/sbin/init plus additional parameters', '-kernel', '/boot/vmlinuz', '-initrd', '/boot/initrd.img']
-- System Information:
Debian Release: 12.10
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.12+bpo-amd64 (SMP w/28 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages autopkgtest depends on:
ii apt-utils 2.6.1
ii libdpkg-perl 1.21.22
ii procps 2:4.0.2-3
ii python3 3.11.2-1+b1
ii python3-debian 0.1.49
Versions of packages autopkgtest recommends:
ii autodep8 0.28
ii fakeroot 1.31-1.2
Versions of packages autopkgtest suggests:
ii docker.io 20.10.24+dfsg1-1+deb12u1
pn fakemachine <none>
pn lxc <none>
pn lxd <none>
ii ovmf 2022.11-6+deb12u2
pn ovmf-ia32 <none>
pn podman <none>
ii python3-distro-info 1.5+deb12u1
ii qemu-efi-aarch64 2022.11-6+deb12u2
ii qemu-efi-arm 2022.11-6+deb12u2
ii qemu-system 1:7.2+dfsg-7+deb12u12
ii qemu-utils 1:7.2+dfsg-7+deb12u12
ii schroot 1.6.13-3+b2
ii util-linux 2.38.1-5+deb12u3
ii vmdb2 0.27+really.0.26-1+deb12u1
ii zerofree 1.1.1-1
-- no debconf information
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)