nixpkgs/nixos
Maximilian Bosch 60e731d1ce
nixos/qemu-vm: fix running VM with QEMU_NET_OPTS
I realized quite recently that running a test VM - as documented in the
manual - like

    QEMU_NET_OPTS='hostfwd=tcp::8080-:80'  ./result/bin/nixos-run-vms

doesn't work anymore on `master`. After bisecting I realized that the
introduction of a forward-port option[1] is the problem since it adds a
trailing comma even if no forwarding options are specified via
`virtualisation.forwardPorts`. In that case, the networking options
would look like `-netdev user,id=user.0,,hostfwd=tcp::8080-:80' which
confused QEMU and thus the VM refused to start.

Now, the trailing comma is only added if additional port forwards are
specified declaratively.

[1] b8bfc81d5b
2021-10-06 22:40:30 +02:00
..
doc nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
lib nixos/lib/make-options-doc: implement literalDocBook 2021-10-03 17:59:44 +02:00
maintainers Merge pull request #136909 from ncfavier/cleanup-defaults-examples 2021-10-04 20:37:42 +02:00
modules nixos/qemu-vm: fix running VM with QEMU_NET_OPTS 2021-10-06 22:40:30 +02:00
tests Merge pull request #140159 from Ma27/nextcloud-misc 2021-10-01 21:08:31 +02:00
COPYING
default.nix nixos: fix "nixos-rebuild build-vm-with-bootloader" for EFI systems 2021-01-08 19:36:10 +01:00
README treewide: use https for nixos.org and hydra.nixos.org 2020-05-03 22:14:21 -07:00
release-combined.nix release-combined.tested: Add the Sway test 2021-05-27 13:36:48 +02:00
release-small.nix Merge pull request #104322 from grahamc/amazon-image 2020-11-19 18:45:07 -05:00
release.nix NixOS/amazonImageZfs: init 2021-08-25 10:42:35 -04:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
https://nixos.org/nixos and in the manual in doc/manual.