Public bug reported:

1) The release of Ubuntu you are using, via 'lsb_release -rd' or System
-> About Ubuntu

Description:    Ubuntu 22.04.4 LTS
Release:        22.04

2) The version of the package you are using, via 'apt-cache policy
pkgname' or by checking in Software Center

5.38ubuntu1~22.04.1

3) What you expected to happen

I want to be able to pass additional kernel command line arguments to
QEMU using the "-append" argument (the image is being booted with
"-kernel" and "-initrd"), 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.

4) What happened instead

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']

** Affects: autopkgtest (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2109713

Title:
  autopkgtest-virt-qemu: cannot pass "-append" in "--qemu-options"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autopkgtest/+bug/2109713/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to