This commit is contained in:
parent
e493646556
commit
4e8b840830
4 changed files with 88 additions and 55 deletions
24
tips/test_on_vm.md
Normal file
24
tips/test_on_vm.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
## Configure VM
|
||||
|
||||
Configure VM
|
||||
```nix
|
||||
users.users.<user>.initialPassword = "<password>";
|
||||
virtualisation.vmVariant = {
|
||||
# following configuration is added only when building VM with build-vm
|
||||
virtualisation = {
|
||||
memorySize = <RAM in MiB>; # Use 8192MiB memory.
|
||||
cores = <CPU Core number>;
|
||||
# And more here https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/virtualisation/qemu-vm.nix
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
Build
|
||||
```bash
|
||||
nixos-rebuild build-vm --flake .#nixos-test
|
||||
```
|
||||
|
||||
Run
|
||||
```bash
|
||||
./result/bin/run-nixos-vm-vm
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue