anchor.diff:  
       services.virtualboxGuest.enable = true;
   
  -    boot.initrd.kernelModules = [ "vboxsf" ];
  +    boot.initrd.kernelModules = [
  +      "af_packet" "vboxsf"
  +      "virtio" "virtio_pci" "virtio_ring" "virtio_net" "vboxguest"
  +    ];
   
       boot.initrd.extraUtilsCommands = ''
         cp -av -t "$out/bin/" \
  -        "${pkgs.linuxPackages.virtualboxGuestAdditions}/sbin/mount.vboxsf"
  +        "${pkgs.linuxPackages.virtualboxGuestAdditions}/sbin/mount.vboxsf" \
  +        "${pkgs.utillinux}/bin/unshare"
  +      ${(attrs.extraUtilsCommands or (const "")) pkgs}
       '';
   
       boot.initrd.postMountCommands = ''
         touch /mnt-root/boot-done
  -
  -      i=0
  -      while [ ! -e /mnt-root/shutdown ]; do
  -        sleep 10
  -        i=$(($i + 10))
  -        [ $i -le 120 ] || fail
  -      done
  -
  -      rm -f /mnt-root/boot-done /mnt-root/shutdown
  +      hostname "${vmName}"
  +      mkdir -p /nix/store
  +      unshare -m "@shell@" -c '
  +        mount -t vboxsf nixstore /nix/store
  +        exec "$stage2Init"
  +      '
         poweroff -f
       '';
   
  
positive.code:         ));
        }
  
        sub checkRunning_${name} {
          my $cmd = 'VBoxManage list runningvms | grep -q "^\"${name}\""';
          my ($status, $out) = $machine->execute(ru $cmd);
          return $status == 0;
        }
  
        sub waitForStartup_${name} {
  
negative.code:       $machine->screenshot("gui_manager_stopped");
      };
  
      cleanup_simple;
  
      subtest "simple-cli", sub {
        vbm("startvm simple");
        waitForStartup_simple;
        $machine->screenshot("cli_started");
        waitForVMBoot_simple;
        $machine->screenshot("cli_booted");
        shutdownVM_simple;
      };
  
      subtest "privilege-escalation", sub {
        $machine->fail("test -e '/root/VirtualBox VMs'");
        $machine->succeed("test -e '/home/alice/VirtualBox VMs'");
      };
  
      destroyVM_simple;
  
      subtest "net-hostonlyif", sub {
        createVM_test1;
        createVM_test2;
  
        vbm("startvm test1");
        waitForStartup_test1;
  
        vbm("startvm test2");
        waitForStartup_test2;
  
        waitForVMBoot_test1;
        waitForVMBoot_test2;
  
        $machine->screenshot("net_booted");
  
        my $test1IP = waitForIP_test1 1;
        my $test2IP = waitForIP_test2 1;
  
        $machine->succeed("echo '$test2IP' | netcat -c '$test1IP' 1234");
        $machine->succeed("echo '$test1IP' | netcat -c '$test2IP' 1234");
  
        $machine->waitUntilSucceeds("netcat -c '$test1IP' 5678 >&2");
        $machine->waitUntilSucceeds("netcat -c '$test2IP' 5678 >&2");
  
        shutdownVM_test1;
        shutdownVM_test2;
  
        destroyVM_test1;
        destroyVM_test2;
      };
    '';
  })
  