nixpkgs/nixos/modules/virtualisation
aszlig f148c5c4a1
nixos/tests: Fix QEMU flags for SCSI disks
The ability to specify "-drive if=scsi" has been removed in QEMU version
2.12 (introduced in 3e3b39f173).

Quote from https://wiki.qemu.org/ChangeLog/2.12#Incompatible_changes:

> The deprecated way of configuring SCSI devices with "-drive if=scsi"
> on x86 has been removed. Use an appropriate SCSI controller together
> "-device scsi-hd" or "-device scsi-cd" and a corresponding "-blockdev"
> parameter instead.

So whenever the diskInterface is "scsi" we use the new way to specify
the drive and fall back to the deprecated way for the time being. The
reason why I'm not using the new way for "virtio" and "ide" as well is
because there is no simple generic way anymore to specify these.

This also turns the type of the virtualisation.qemu.diskInterface option
to be an enum, so the user knows which values are allowed but we can
also make sure the right value is provided to prevent typos.

I've tested this against a few non-disk-related NixOS VM tests but also
the installer.grub1 test (because it uses "ide" as its drive interface),
the installer.simple test (just to be sure it still works with
"virtio") and all the tests in nixos/tests/boot.nix.

In order to be able to run the grub1 test I had to go back to
8b1cf100cd (which is a known commit where
that test still works) and apply the QEMU update and this very commit,
because right now the test is broken.

Apart from the tests here in nixpkgs, I also ran another[1] test in
another repository which uses the "scsi" disk interface as well (in
comparison to most of the installer tests, this one actually failed
prior to this commit).

All of them now succeed.

[1]: 9b5a119972/tests/system/kernel/bfq.nix

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @edostra, @grahamc, @dezgeg, @abbradar, @ts468
2018-04-30 03:02:59 +02:00
..
amazon-image.nix nixos: introduce boot.growPartition (#33521) 2018-01-06 13:52:51 +00:00
amazon-init.nix nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
amazon-options.nix Fix eval error due to config.ec2.hvm 2017-04-04 13:49:13 +02:00
azure-agent-entropy.patch virtualization/azure: take entropy handling code out of WALA and execute it before SSHD generates the host keys 2016-03-13 13:57:30 +02:00
azure-agent.nix azure-agent: add bash to service path. 2018-04-17 16:26:04 +02:00
azure-bootstrap-blobs.nix add Azure bootstrap blob list 2016-09-15 16:27:47 +03:00
azure-common.nix openssh: support prohibit-password for permitRootLogin 2016-10-01 13:23:56 -04:00
azure-config-user.nix azure-image: provide configuration.nix which allows nixos-rebuild to build a working generation and add helpful comments 2016-03-03 04:03:07 +02:00
azure-config.nix Initial configuration + image generation script for Micro$oft Azure. Work in progress for #3986. 2014-09-06 21:37:46 +02:00
azure-image.nix azure-image: switch to use the common make-disk-image.nix 2017-04-25 02:59:13 +00:00
azure-images.nix Add file with Azure image locations, similar to ec2-amis.nix. Will be used by nixops. 2017-07-18 09:18:51 +00:00
azure-qemu-220-no-etc-install.patch azure: package qemu @ 2.2.0 2016-02-18 21:08:28 -08:00
brightbox-config.nix Add initial Brightbox expression. 2015-08-08 19:50:22 +00:00
brightbox-image.nix nixos: rename config.system.nixos* -> config.system.nixos.* 2018-02-18 12:56:30 +00:00
container-config.nix nixos/containers: Enable use of the network.useHostResolvConf option (#34354) 2018-01-28 14:42:15 +00:00
containers.nix Merge pull request #35541 from xeji/containers-extraflags 2018-04-21 14:16:49 +01:00
docker-image.nix container.nix -> docker-container.nix 2015-04-19 22:06:45 +02:00
docker.nix docker: Allow package selection in module 2017-09-04 19:02:05 -04:00
ec2-amis.nix ec2-amis.nix: add 18.03 images 2018-04-05 11:58:53 +02:00
ec2-data.nix ec2-data: ensure providing a SSH host key is actually optional 2016-02-25 20:11:49 -06:00
ecs-agent.nix nixos/modules: use defaultText/literalExample where applicable 2017-03-07 14:06:08 +01:00
gce-images.nix Add file with GCE image locations, similar to ec2-amis.nix. Will be used by nixops. 2017-07-18 09:16:15 +00:00
google-compute-config.nix Work around infinite recursion issue in nixops. 2015-04-29 09:55:20 +00:00
google-compute-image.nix google-compute-image: provide correct MTU 2018-04-08 08:46:42 +02:00
grow-partition.nix nixos: introduce boot.growPartition (#33521) 2018-01-06 13:52:51 +00:00
hyperv-guest.nix hyperv-daemons: add nixos module 2018-01-04 21:09:01 +08:00
libvirtd.nix libvirt: 3.10.0 -> 4.1.0 2018-03-08 23:45:28 +00:00
lxc-container.nix container.nix -> docker-container.nix 2015-04-19 22:06:45 +02:00
lxc.nix lxd: 2.16 -> 3.0.0 2018-04-14 11:02:24 +01:00
lxcfs.nix lxcfs: remove cgmanager dependency 2017-11-07 11:04:12 +00:00
lxd.nix lxd: 2.16 -> 3.0.0 2018-04-14 11:02:24 +01:00
nova-config.nix nixos: introduce boot.growPartition (#33521) 2018-01-06 13:52:51 +00:00
openvswitch.nix nixos: Move uses of stdenv.shell to runtimeShell. 2018-03-01 14:38:53 -05:00
parallels-guest.nix parallels: add package config option 2018-03-01 17:09:13 -06:00
qemu-vm.nix nixos/tests: Fix QEMU flags for SCSI disks 2018-04-30 03:02:59 +02:00
rkt.nix nixos/treewide: systemd.time is in manvolume 7 2017-03-21 08:28:53 +01:00
virtualbox-guest.nix virtualbox guest module: make x11 optional 2016-12-04 22:24:01 +01:00
virtualbox-host.nix Virtualbox: Fix type error in networking.interfaces.vboxnet0.ipv4.addresses 2018-02-19 17:48:15 +01:00
virtualbox-image.nix nixos: rename config.system.nixos* -> config.system.nixos.* 2018-02-18 12:56:30 +00:00
vmware-guest.nix open-vm-tools: do not pull x dependencies unconditionally 2017-08-15 17:05:30 +08:00
xe-guest-utilities.nix xe-guest-utilities: init at 6.2.0 2016-03-30 09:27:40 -07:00
xen-dom0.nix xen 4.10: link /etc/xen/oxenstored.conf 2018-03-07 22:39:19 +01:00
xen-domU.nix xen: update domU config for pvgrub2 2017-02-12 20:53:54 +01:00