Last active
September 9, 2024 12:35
-
-
Save queses/6b6af863ce5e3126fb7dbc7dbd9a5d45 to your computer and use it in GitHub Desktop.
LimaVM template: Debian 12 on amd64 (via QEMU)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ## [Prerequisite: Install lima] | |
# brew install lima | |
# | |
# ## [Prerequisite: Install socket_vmnet to enable shared network mode] | |
# brew install socket_vmnet | |
# echo 'export PATH="/opt/homebrew/opt/socket_vmnet/bin:$PATH"' >> ~/.zshrc | |
# source ~/.zshrc # reload shell | |
# limactl sudoers >/tmp/etc_sudoers.d_lima # to init lima config directory | |
# sed -i '' "s|/opt/socket_vmnet/bin/socket_vmnet|`readlink -f $(/opt/homebrew/opt/socket_vmnet/bin/socket_vmnet)`|g" ~/.lima/_config/networks.yaml | |
# limactl sudoers >/tmp/etc_sudoers.d_lima # generate sudoers file | |
# sudo install -o root /tmp/etc_sudoers.d_lima /etc/sudoers.d/lima | |
# | |
# ## [Setup] | |
# limactl create --name=deb-amd64 ./lima-debian-adm64.template.yaml | |
# | |
# ## [Usage] | |
# limactl start deb-amd64 | |
# limactl shell deb-amd64 | |
# limactl stop deb-amd64 | |
arch: "x86_64" | |
memory: "4GiB" # adjust if needed | |
disk: "20GiB" # adjust if needed | |
mounts: | |
- location: "~/Code" # adjust if needed | |
writable: false # adjust if needed | |
- location: "/tmp/lima" | |
writable: true | |
mountType: "reverse-sshfs" | |
images: | |
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months. | |
- location: "https://cloud.debian.org/images/cloud/bookworm/20240717-1811/debian-12-genericcloud-amd64-20240717-1811.qcow2" | |
arch: "x86_64" | |
digest: "sha512:0f0075d53749dba4c9825e606899360626bb20ac6bab3dbdeff40041b051d203eb1a56e68d377c9fac0187faa0aea77fd543ef4a883fff2304eac252cce01b44" | |
# Fallback to the latest release image. | |
# Hint: run `limactl prune` to invalidate the cache | |
- location: "https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2" | |
arch: "x86_64" | |
networks: | |
- lima: shared | |
containerd: | |
system: false | |
user: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment