Each sample machine now has a VM check, including new ones for text-console and scripted-initrd. While a check runs, a recorder takes a frame every half second through a second QEMU monitor socket, and record-screencasts encodes the frames into recordings/<machine>.webp with img2webp, dropping the BIOS frames at other resolutions. The guide shows each machine's recording in the section it illustrates, replacing the PNG screenshots. The checks are now named vm-<machine>.
25 lines
527 B
Nix
25 lines
527 B
Nix
{ machine, pkgs }:
|
|
let
|
|
secretDisk = import ./secret-disk.nix { inherit pkgs; };
|
|
in
|
|
{
|
|
name = "bootvine-encrypted-volume";
|
|
nodes.machine = {
|
|
imports = [
|
|
machine
|
|
../shared/recorded-display.nix
|
|
];
|
|
|
|
testing.initrdBackdoor = true;
|
|
|
|
virtualisation.qemu.drives = [ secretDisk.qemuDrive ];
|
|
};
|
|
|
|
testScript = ''
|
|
PASSPHRASE = "${secretDisk.passphrase}"
|
|
''
|
|
+ builtins.readFile ../shared/console.py
|
|
+ builtins.readFile ../shared/screen_recording.py
|
|
+ builtins.readFile ./check.py;
|
|
}
|