[docs] add run-vm examples

This commit is contained in:
2025-01-20 12:27:05 +01:00
parent 1877f6dc9c
commit 197a8427b7

View File

@@ -12,13 +12,31 @@ Use durruti as orientation:
"10.0.0.5" is the IP assigned to its tap interface. "10.0.0.5" is the IP assigned to its tap interface.
### Testing MicroVMs locally ### Testing MicroVMs locally
MicroVMs can be built and run easily on your local host, but they are not persistent! MicroVMs can be built and run easily on your localhost for development.
For durruti for example this is done by: We provide the script ```run-vm``` to handle stuff like development (dummy) secrets, sharing directories, ect. easily.
Usage examples:
``` bash ``` bash
nix run .\#durruti-vm # run without args to get available options and usage info
run-vm
# run nextcloud locally with dummy secrets
run-vm nextcloud --dummy-secrets
# share a local folder as /var/lib dir so that nextcloud application data stays persistent between boots
mkdir /tmp/nextcloud
run-vm nextcloud --dummy-secrets --varlib /tmp/nextcloud
# enable networking to provide connectivity between multiple vms
# for that the malobeo hostBridge must be enabled on your host
# this example deploys persistent grafana on overwatch and fetches metrics from infradocs
mkdir overwatch
run-vm overwatch --networking --varlib /tmp/overwatch
run-vm infradocs --networking
``` ```
### Testing persistent microvms
### Fully deploy microvms on local host
In order to test persistent microvms locally we need to create them using the ```microvm``` command. In order to test persistent microvms locally we need to create them using the ```microvm``` command.
This is necessary to be able to mount persistent /etc and /var volumes on those hosts. This is necessary to be able to mount persistent /etc and /var volumes on those hosts.
Do the following: Do the following: