nixpkgs-suyu/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
azure-agent.nix azure-agent: add bash to service path. 2018-04-17 16:26:04 +02:00
azure-bootstrap-blobs.nix
azure-common.nix
azure-config-user.nix
azure-config.nix
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
brightbox-config.nix
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
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
ecs-agent.nix
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
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
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-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
xen-dom0.nix xen 4.10: link /etc/xen/oxenstored.conf 2018-03-07 22:39:19 +01:00
xen-domU.nix