Add sandbox boot logs cmd

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-29 11:29:43 +04:00
parent f0ebfe67fa
commit 5e78592024
2 changed files with 16 additions and 6 deletions

View File

@@ -390,6 +390,10 @@ sandbox-create: ## Create a Lima sandbox VM for this worktree
sandbox-start: ## Start the Lima sandbox VM
./contrib/lima/sandbox.sh start
.PHONY: sandbox-boot-logs
sandbox-boot-logs: ## Show the Lima sandbox VM boot logs
./contrib/lima/sandbox.sh boot-logs
.PHONY: sandbox-stop
sandbox-stop: ## Stop (hibernate) the Lima sandbox VM
./contrib/lima/sandbox.sh stop

View File

@@ -18,6 +18,7 @@ Usage: $(basename "$0") <command> [options]
Commands:
create [--cpus C] [--memory M] [--disk D] Create a new sandbox VM
start Start a stopped sandbox
boot-logs Show boot logs
stop Stop the sandbox
restart Stop + start the sandbox
delete Delete the sandbox entirely
@@ -85,6 +86,10 @@ cmd_start() {
cmd_status
}
cmd_boot_logs() {
limactl shell probo-sandbox-fix -- sudo tail -f /var/log/cloud-init-output.log
}
cmd_stop() {
echo "Stopping sandbox: ${VM_NAME}"
limactl stop "${VM_NAME}"
@@ -157,12 +162,13 @@ command="$1"
shift
case "${command}" in
create) cmd_create "$@" ;;
start) cmd_start ;;
stop) cmd_stop ;;
restart) cmd_restart ;;
delete) cmd_delete ;;
ssh) cmd_ssh ;;
create) cmd_create "$@" ;;
start) cmd_start ;;
boot-logs) cmd_boot_logs ;;
stop) cmd_stop ;;
restart) cmd_restart ;;
delete) cmd_delete ;;
ssh) cmd_ssh ;;
exec)
if [[ "${1:-}" == "--" ]]; then shift; fi
cmd_exec "$@"