mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 10:18:37 +02:00
feat: dae - arm64 microvm
This commit is contained in:
37
hosts/12kingdoms-suzu/microvm.md
Normal file
37
hosts/12kingdoms-suzu/microvm.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# microvm.nix
|
||||
|
||||
## Commands
|
||||
|
||||
> https://github.com/astro/microvm.nix/blob/main/doc/src/microvm-command.md
|
||||
|
||||
```bash
|
||||
# list vm
|
||||
microvm -l
|
||||
|
||||
# update vm
|
||||
microvm -u my-microvm
|
||||
|
||||
|
||||
# show logs of a vm
|
||||
journalctl -u microvm@my-microvm -n 50
|
||||
|
||||
# stop vm
|
||||
systemctl stop microvm@$NAME
|
||||
|
||||
# remove vm
|
||||
rm -rf /var/lib/microvms/$NAME
|
||||
|
||||
# Run a MicroVM in foreground(for testing)
|
||||
# You have to stop the vm before running this command!
|
||||
microvm -r my-microvm
|
||||
|
||||
# Stop a MicroVM that is running in foreground
|
||||
## 1. run `sudo shutdown -h now` in the vm
|
||||
## 2. run `systemctl stop microvm@my-microvm` in the host
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
||||
### 1. enter the vm without ssh
|
||||
|
||||
[Enter running machine as systemd service](https://github.com/astro/microvm.nix/issues/123)
|
||||
Reference in New Issue
Block a user