tests: add VM tests
This commit is contained in:
parent
e22b8af561
commit
0b7f8b703b
3 changed files with 38 additions and 0 deletions
30
tests/buildvmwithbootloader/debug-vm.sh
Executable file
30
tests/buildvmwithbootloader/debug-vm.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
# /nix/store/lya9qyl9z5xb4vzdzh4vzcr7gfssk47z-qemu-host-cpu-only-for-vm-tests-2.12.0/bin/qemu-kvm \
|
||||
# -cpu \
|
||||
# kvm64 \
|
||||
# -name \
|
||||
# nixos \
|
||||
# -m \
|
||||
# 384 \
|
||||
# -smp \
|
||||
# 1 \
|
||||
# -device \
|
||||
# virtio-rng-pci \
|
||||
# -net \
|
||||
# nic,netdev=user.0,model=virtio \
|
||||
# -netdev \
|
||||
# user,id=user.0 \
|
||||
# -virtfs \
|
||||
# local,path=/nix/store,security_model=none,mount_tag=store \
|
||||
# -virtfs \
|
||||
# local,path=/tmp/nix-vm.j7eRAzkZvB/xchg,security_model=none,mount_tag=xchg \
|
||||
# -virtfs \
|
||||
# local,path=/tmp/nix-vm.j7eRAzkZvB/xchg,security_model=none,mount_tag=shared \
|
||||
# -drive \
|
||||
# index=1,id=drive2,file=/tmp/nix-vm.j7eRAzkZvB/disk.img,media=disk,if=virtio \
|
||||
# -drive \
|
||||
# index=0,id=drive1,file=/home/steveej/src/steveej/nix-expressions/nixos.qcow2,cache=writeback,werror=report,if=virtio \
|
||||
|
||||
|
||||
/nix/store/0i6fr8vv559a50w0vipvd22r0kkg1kx1-qemu-host-cpu-only-for-vm-tests-3.0.0/bin/qemu-kvm -cpu kvm64 -name nixos -m 384 -smp 1 -device virtio-rng-pci -net nic,netdev=user.0,model=virtio -netdev user,id=user.0 -virtfs local,path=/nix/store,security_model=none,mount_tag=store -virtfs local,path=/tmp/nix-vm.BXlbOnli8K/xchg,security_model=none,mount_tag=xchg -virtfs local,path=/tmp/nix-vm.BXlbOnli8K/xchg,security_model=none,mount_tag=shared \
|
||||
-drive index=1,id=drive2,file=/tmp/nix-vm.BXlbOnli8K/disk.img,media=disk,if=virtio \
|
||||
-drive index=0,id=drive1,file=/home/steveej/src/steveej/nix-expressions/tests/nixos.qcow2,cache=writeback,werror=report,if=virtio \
|
1
tests/buildvmwithbootloader/result
Symbolic link
1
tests/buildvmwithbootloader/result
Symbolic link
|
@ -0,0 +1 @@
|
|||
/nix/store/xh6p394kh1bncmc3lr6l9fb81284ckhf-nixos-vm
|
7
tests/test-vm.nix
Normal file
7
tests/test-vm.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ lib, config, pkgs, fetchgit, ... }:
|
||||
{
|
||||
boot.consoleLogLevel=6;
|
||||
users.users.root.initialPassword = "root";
|
||||
systemd.services."serial-getty@ttyS0".enable = true;
|
||||
networking.firewall.enable = false;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue