nixpkgs/nixos/modules/virtualisation
nikstur 0bdba6c99b nixos/qemu-vm: use persistent block device names
This change removes the bespoke logic around identifying block devices.
Instead of trying to find the right device by iterating over
`qemu.drives` and guessing the right partition number (e.g.
/dev/vda{1,2}), devices are now identified by persistent names provided
by udev in /dev/disk/by-*.

Before this change, the root device was formatted on demand in the
initrd. However, this makes it impossible to use filesystem identifiers
to identify devices. Now, the formatting step is performed before the VM
is started. Because some tests, however, rely on this behaviour, a
utility function to replace this behaviour in added in
/nixos/tests/common/auto-format-root-device.nix.

Devices that contain neither a partition table nor a filesystem are
identified by their hardware serial number which is injecetd via QEMU
(and is thus persistent and predictable). PCI paths are not a reliably
way to identify devices because their availability and numbering depends
on the QEMU machine type.

This change makes the module more robust against changes in QEMU and the
kernel (non-persistent device naming) and by decoupling abstractions
(i.e. rootDevice, bootPartition, and bootLoaderDevice) enables further
improvement down the line.
2023-06-16 19:36:03 +02:00
..
podman nixos/podman: add example to enable network dns 2023-03-27 08:42:29 +10:00
amazon-ec2-amis.nix add release 23.05 AWS AMIs 2023-06-01 13:46:53 -04:00
amazon-image.nix ena: 2.8.0 -> 2.8.2 2023-01-31 03:31:05 +00:00
amazon-init.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
amazon-options.nix nixos/virtualisation/*: replace deprecated types.string with types.str 2023-01-30 16:54:21 +01:00
anbox.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
appvm.nix nixos: fix typos 2022-12-17 19:31:14 -05:00
azure-agent.nix waagent: update to 2.8.0.11 (#206974) 2023-01-10 20:58:20 +01:00
azure-bootstrap-blobs.nix
azure-common.nix nixos/*: remove boot.grub.version 2023-05-10 21:51:26 +02:00
azure-config-user.nix
azure-config.nix
azure-image.nix nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
azure-images.nix
brightbox-config.nix
brightbox-image.nix services.openssh: support freeform settings (#193757) 2023-01-15 16:32:46 +01:00
build-vm.nix nixos/virtualization: invariant option docs MD conversions 2022-07-24 13:01:47 +02:00
cloudstack-config.nix services.openssh: support freeform settings (#193757) 2023-01-15 16:32:46 +01:00
container-config.nix nixos/modprobe: replace boot.isContainer with boot.modprobeConfig.enable 2022-11-24 14:07:46 +01:00
containerd.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
containers.nix nixos/containers: source policy from separate skopeo output 2023-01-08 13:30:27 +10:00
cri-o.nix Merge pull request #213036 from SuperSandro2000/cri-o/update_storagedrivers 2023-04-15 16:27:50 +12:00
digital-ocean-config.nix services.openssh: support freeform settings (#193757) 2023-01-15 16:32:46 +01:00
digital-ocean-image.nix nixos/virtualization: invariant option docs MD conversions 2022-07-24 13:01:47 +02:00
digital-ocean-init.nix nixos/*: literalDocBook -> literalMD 2022-08-27 19:18:29 +02:00
docker-image.nix
docker-rootless.nix nixos/virtualization: invariant option docs MD conversions 2022-07-24 13:01:47 +02:00
docker.nix Merge pull request #213604 from mikroskeem/feature/docker-local-log-driver 2023-02-28 21:47:55 +01:00
ec2-amis.nix
ec2-data.nix amazon-image: fetch metadata only in stage-2 2022-11-23 17:19:13 +01:00
ec2-metadata-fetcher.sh nixos/ec2: don't populate nonexistent metadata files 2023-02-26 23:25:09 +05:30
ecs-agent.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
gce-images.nix
google-compute-config.nix nixos/virtualisation/google-compute-config: minor refactoring 2023-05-26 00:56:32 +00:00
google-compute-image.nix nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
grow-partition.nix
hyperv-guest.nix linuxPackages.hyperv-daemons: add path conditions for kvp and vss 2022-12-04 15:25:26 +01:00
hyperv-image.nix nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
includes-to-excludes.py nixos/qemu-vm: Use disposable EROFS for store when writableStore = false 2022-07-17 14:56:35 +02:00
kubevirt.nix
kvmgt.nix nixos/*: convert straggler options to MD 2022-08-31 17:27:38 +02:00
libvirtd.nix nixos/libvirtd: don't use cp -n 2023-06-05 19:14:01 +03:00
linode-config.nix nixos/virtualisation/linode-image: Migrate to new openssh options. 2023-02-12 13:06:11 +08:00
linode-image.nix maintainers: Update houstdav000 -> cyntheticfox 2023-03-30 18:50:29 -04:00
lxc-container.nix nixos/lxc-container: ensure /sbin/init is updated on nixos-rebuild boot 2023-05-10 11:04:07 -04:00
lxc.nix nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
lxcfs.nix nixos/*: convert options with listings 2022-08-31 17:27:36 +02:00
lxd.nix nixos/lxd: add missing util-linux to $PATH 2022-12-03 16:01:05 +01:00
multipass.nix nixos/multipass: don't start until online 2023-04-14 11:27:57 +01:00
nixos-containers.nix treewide: pass system argument to eval-config.nix 2023-05-12 14:56:23 +02:00
oci-containers.nix Merge pull request #188795 from Sohalt/oci-containers-wait-for-network 2023-01-20 09:11:19 +08:00
openstack-config.nix services.openssh: support freeform settings (#193757) 2023-01-15 16:32:46 +01:00
openstack-metadata-fetcher.nix
openstack-options.nix nixos/virtualisation/*: replace deprecated types.string with types.str 2023-01-30 16:54:21 +01:00
openvswitch.nix nixos/virtualization: invariant option docs MD conversions 2022-07-24 13:01:47 +02:00
parallels-guest.nix systemd.services.prlshprint: fix type 2023-04-18 18:55:47 +03:00
proxmox-image.nix nixos/proxmox-image: fix qemu build failure 2023-05-25 16:25:43 +05:30
proxmox-lxc.nix nixos/*: md-convert hidden plaintext options 2022-08-31 16:32:54 +02:00
qemu-guest-agent.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
qemu-vm.nix nixos/qemu-vm: use persistent block device names 2023-06-16 19:36:03 +02:00
rosetta.nix modules/rosetta: configure nix build sandbox to use rosetta 2023-05-10 14:28:50 -04:00
spice-usb-redirection.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
vagrant-guest.nix
vagrant-virtualbox-image.nix
virtualbox-guest.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
virtualbox-host.nix nixos/virtualbox-host: Fix hardening with headless vbox 2022-10-08 15:41:59 -06:00
virtualbox-image.nix nixos/virtualbox-image: remove the raw image trick 2023-03-04 13:39:50 +03:00
vmware-guest.nix nixos/vmware-guest: depend headless option on xserver availability 2022-11-01 16:57:30 +01:00
vmware-host.nix nixos: fix typos 2022-12-17 19:31:14 -05:00
vmware-image.nix nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
waydroid.nix waydroid: 1.3.3 -> 1.3.4 (#206833) 2023-01-03 17:43:06 +01:00
xe-guest-utilities.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
xen-dom0.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
xen-domU.nix nixos/*: remove boot.grub.version 2023-05-10 21:51:26 +02:00