dragosh / lima-lab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lima and containerd

https://github.com/lima-vm/lima#getting-started

Installation

Update Homebrew formulae

brew update

Install QEMU

brew install simnalamburt/x/qemu-hvf

Check version

which qemu-system-aarch64
/opt/homebrew/bin/qemu-system-aarch64
qemu-system-aarch64 --version
QEMU emulator version 6.1.0
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

Check if its valid

qemu-system-aarch64 -accel help
Accelerators supported in QEMU binary:
hvf
tcg

Install Lima

brew install lima

Check version

which limactl
/opt/homebrew/bin/limactl
limactl --version
limactl version 0.6.4

Instance management

LIMA_INSTANCE=<instance>
limactl stop <instance>
limactl rm <instance>

Start VM

limactl start default.yml

Expected output

? Creating an instance "default"  [Use arrows to move, type to filter]
> Proceed with the default configuration
  Open an editor to override the configuration
  Exit


  ......

  INFO[0111] READY. Run `lima` to open the shell.

Debug

lima uname -a
tail -f ~/.lima/default/serial.log
tail -f ~/.lima/default/ha.stderr.log| jq

Other OS guests

https://github.com/lima-vm/lima/tree/master/examples

Containers

Nostalgia only or CI legacy commands

alias docker="lima nerdctl"

lima nerdctl run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine
lima nerdctl run -d --name nginx -v ${PWD}/www:/usr/share/nginx/html:ro -p 8080:80 nginx:alpine

Privileged ports (1-1023) cannot be forwarded

lima nerdctl ps
lima nerdctl rm -f nginx

amd64 support

lima sh -c 'sudo apt update && sudo apt install -y qemu-user-static binfmt-support'

Images

Registries

Compose

About


Languages

Language:HTML 100.0%