Skip to content

command line option (fw_cfg) not being treated as opaque and generates error "short-form boolean option 'x' deprecated"

Host environment

  • Operating system: Proxmox 8.x
  • OS/kernel version: 6.2.16-6-pve
  • Architecture: x86_64
  • QEMU flavor: qemu-system-x86_64
  • QEMU version: QEMU emulator version 8.0.2 (pve-qemu-kvm_8.0.2-4)
  • QEMU command line: as below

Emulated/Virtualized environment

n/a as the VM fails to start due to command line evaluation failing

Description of problem

I'm trying to run qemu with fw_cfg arguments. With a full example I am trying to provide an ignition configuration a flatcar VM using a 'string' parameter which is JSON (rather than a file parameter).

Running qemu with command line options where the fields have arbitrary data that should be opaque to qemu are being interpreted and cause the command line argument parsing the fail. I have tried putting quotes and double quotes around various parts of the command without success.

Sorry, but I haven't tested this with latest (v8.1.0.rc4 / v8.0.4)

Examples:

qemu-system-x86_64: -fw_cfg name=z,string=a,b: warning: short-form boolean option 'b' deprecated
Please use b=on instead
qemu-system-x86_64: -fw_cfg name=z,string=a,b: Invalid parameter 'b'

Single quotes around the string value:

# qemu-system-x86_64 -fw_cfg name=z,string='a,b'
qemu-system-x86_64: -fw_cfg name=z,string=a,b: warning: short-form boolean option 'b' deprecated
Please use b=on instead
qemu-system-x86_64: -fw_cfg name=z,string=a,b: Invalid parameter 'b'

Double quotes around the string value

# qemu-system-x86_64 -fw_cfg name=z,string="a,b"
qemu-system-x86_64: -fw_cfg name=z,string=a,b: warning: short-form boolean option 'b' deprecated
Please use b=on instead
qemu-system-x86_64: -fw_cfg name=z,string=a,b: Invalid parameter 'b'

Double quotes around the whole fw_cfg option value:

# qemu-system-x86_64 -fw_cfg "name=z,string=a,b"
qemu-system-x86_64: -fw_cfg name=z,string=a,b: warning: short-form boolean option 'b' deprecated
Please use b=on instead
qemu-system-x86_64: -fw_cfg name=z,string=a,b: Invalid parameter 'b'
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information