]> git.scottworley.com Git - nixos-qemu-vm-isolation/log
nixos-qemu-vm-isolation
9 months agoFollow NixOS PR 236656's changes about device naming main
Scott Worley [Fri, 21 Jul 2023 10:00:54 +0000 (03:00 -0700)]
Follow NixOS PR 236656's changes about device naming

... as we update flake.lock to a nixpkgs rev that includes that PR.

9 months agoOffer option of an erofs nix store image
Scott Worley [Fri, 21 Jul 2023 09:46:41 +0000 (02:46 -0700)]
Offer option of an erofs nix store image

Size of the simple test's nix store image:
 240M squashfs (no longer available)
 684M erofs
 1.3G ext4

9 months agoReduce repetition in test script
Scott Worley [Fri, 21 Jul 2023 08:09:58 +0000 (01:09 -0700)]
Reduce repetition in test script

9 months agosquashfs -> ext4, which makes images ~5x larger. :(
Scott Worley [Fri, 21 Jul 2023 07:40:51 +0000 (00:40 -0700)]
squashfs -> ext4, which makes images ~5x larger.  :(

https://github.com/NixOS/nixpkgs/pull/236656 changed NixOS's qemu-vm
disk-finding mechanism to use filesystem labels.

squashfs doesn't support filesystem labels (see
https://github.com/plougher/squashfs-tools/issues/59 ).

So we can't use squashfs anymore.  :(

The simple test's nix store image is 240M as squashfs and 1.3G as ext4.

9 months agoDrop support for < 23.05
Scott Worley [Fri, 21 Jul 2023 04:01:25 +0000 (21:01 -0700)]
Drop support for < 23.05

10 months agoNew runTest interface fixes useNixStoreImage test
Scott Worley [Thu, 22 Jun 2023 22:10:39 +0000 (15:10 -0700)]
New runTest interface fixes useNixStoreImage test

The new runTest interface lets us turn off includeTestScriptReferences,
which lets the useNixStoreImage test pass.

Unfortunately, I then discovered another problem with useNixStoreImage:
It builds a new store image every time the VM starts up!  This is
undesirable for two reasons:

  1. It significantly delays VM start-up.  For network-service-providing
     VMs, this is downtime.  Longer startup time likely won't trouble
     high-availability services with fancy load balancers, health
     checks, and rolling restarts, but for unsophisticated use cases
     that currently just accept some small amount of downtime during VM
     restarts for software updates, using useNixStoreImage means much
     longer periods of interrupted service.

  2. This wastes disk I/O, building the same image over and over.

This useNixStoreImage design choice was made in order to keep the
guest's Nix store image out of the host's Nix store.  This is especially
important for the public Hydra that populates the public binary cache
that's currently hosted on centralized pay-per-byte commercial storage
services -- it doesn't make sense to pay to store and host the Nix store
itself and also many little copies of overlapping pieces of it.

So here in nixos-qemu-vm-isolation, we're happy to pay the cost of
storing the guests' Nix store images in the host's Nix store, because we
really value the faster start-up, and because we don't have the problem
of large storage service bills and no budget to pay them with.  :)

10 months agoUse the new nixpkgs.lib.nixos.runTest interface for checks
Scott Worley [Thu, 22 Jun 2023 21:48:45 +0000 (14:48 -0700)]
Use the new nixpkgs.lib.nixos.runTest interface for checks

10 months ago23.05: New way to get the list of tier1 systems
Scott Worley [Thu, 22 Jun 2023 21:24:51 +0000 (14:24 -0700)]
23.05: New way to get the list of tier1 systems

11 months agoDon't set virtualisation.bootDevice in 23.05+
Scott Worley [Wed, 24 May 2023 23:07:17 +0000 (16:07 -0700)]
Don't set virtualisation.bootDevice in 23.05+

This missing default has been fixed in 23.05, so setting it here is no
longer necessary.

2 years agoAllow this to be used as a channel
Scott Worley [Sat, 7 May 2022 00:47:27 +0000 (17:47 -0700)]
Allow this to be used as a channel

2 years agoMarkup-formatted README
Scott Worley [Mon, 20 Dec 2021 06:57:37 +0000 (22:57 -0800)]
Markup-formatted README

2 years agoNote that useNixStoreImage exists now
Scott Worley [Sun, 21 Nov 2021 01:38:13 +0000 (17:38 -0800)]
Note that useNixStoreImage exists now

I'm disappointed that it doesn't work.  :(

When it's fixed, it can replace this module.

2 years ago21.11: Follow the pathsInNixDB → additionalPaths rename
Scott Worley [Mon, 20 Dec 2021 02:53:02 +0000 (18:53 -0800)]
21.11: Follow the pathsInNixDB → additionalPaths rename

This rename is unfortunate.  We depend here upon this actually being *all
the paths in the Nix DB*.  It still *is* all the paths in the Nix DB —
nothing has changed about its implementation — but now it's named after
one use case (adding some additional paths) rather than what it *is*
(all the paths), which makes this usage here read as if it couldn't
possibly work.  :(

2 years agoNew nixpkgs pin
Scott Worley [Mon, 20 Dec 2021 06:41:14 +0000 (22:41 -0800)]
New nixpkgs pin

Stick to the nixos-unstable branch so folks that use the public build
cache get cache hits.

In particular, make sure to pick up
e8cc900eaec34c2b7399678f0cd47c1b0e36a6ef, which makes useNixStoreImage
actually work.

2 years agoCheck that an unreferenced package does not appear in the guest.
Scott Worley [Sun, 21 Nov 2021 00:16:25 +0000 (16:16 -0800)]
Check that an unreferenced package does not appear in the guest.

2 years agoLicense
Scott Worley [Mon, 25 Oct 2021 21:03:54 +0000 (14:03 -0700)]
License

2 years agoUse a squashfs Nix Store rather than a virtio host mount
Scott Worley [Mon, 25 Oct 2021 07:44:56 +0000 (00:44 -0700)]
Use a squashfs Nix Store rather than a virtio host mount