best-city-49378
06/12/2022, 3:58 PMdocker-machine
in their package collections.
Maybe we should just port the VirtualBox driver to lima and call it a day ? (it just forks VBoxManage
)clean-fireman-4784
06/15/2022, 3:45 PM# Example to use Docker instead of containerd & nerdctl
# $ limactl start ./docker.yaml
# $ limactl shell docker docker run -it -v $HOME:$HOME --rm alpine
# To run `docker` on the host (assumes docker-cli is installed):
# $ export DOCKER_HOST=$(limactl list docker --format 'unix://{{.Dir}}/sock/docker.sock')
# $ docker ...
arch: "x86_64"
# This example requires Lima v0.8.0 or later
images:
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
- location: "<https://cloud-images.ubuntu.com/releases/21.10/release-20220201/ubuntu-21.10-server-cloudimg-amd64.img>"
arch: "x86_64"
# digest: "sha256:73fe1785c60edeb506f191affff0440abcc2de02420bb70865d51d0ff9b28223"
- location: "<https://cloud-images.ubuntu.com/releases/21.10/release-20220201/ubuntu-21.10-server-cloudimg-arm64.img>"
arch: "aarch64"
# digest: "sha256:1b5b3fe616e1eea4176049d434a360344a7d471f799e151190f21b0a27f0b424"
# Fallback to the latest release image.
# Hint: run `limactl prune` to invalidate the cache
- location: "<https://cloud-images.ubuntu.com/releases/21.10/release/ubuntu-21.10-server-cloudimg-amd64.img>"
arch: "x86_64"
- location: "<https://cloud-images.ubuntu.com/releases/21.10/release/ubuntu-21.10-server-cloudimg-arm64.img>"
arch: "aarch64"
mounts:
- location: "~"
- location: "/tmp/lima"
writable: true
# containerd is managed by Docker, not by Lima, so the values are set to false here.
containerd:
system: false
user: false
provision:
- mode: system
# This script defines the host.docker.internal hostname when hostResolver is disabled.
# It is also needed for lima 0.8.2 and earlier, which does not support hostResolver.hosts.
# Names defined in /etc/hosts inside the VM are not resolved inside containers when
# using the hostResolver; use hostResolver.hosts instead (requires lima 0.8.3 or later).
script: |
#!/bin/sh
sed -i 's/host.lima.internal.*/host.lima.internal host.docker.internal/' /etc/hosts
- mode: system
script: |
#!/bin/bash
set -eux -o pipefail
command -v docker >/dev/null 2>&1 && exit 0
export DEBIAN_FRONTEND=noninteractive
curl -fsSL <https://get.docker.com> | sh
# # NOTE: you may remove the lines below, if you prefer to use rootful docker, not rootless
# systemctl disable --now docker
# apt-get install -y uidmap dbus-user-session
# - mode: user
# script: |
# #!/bin/bash
# set -eux -o pipefail
# systemctl --user start dbus
# dockerd-rootless-setuptool.sh install
# docker context use default
probes:
- script: |
#!/bin/bash
set -eux -o pipefail
if ! timeout 30s bash -c "until command -v docker >/dev/null 2>&1; do sleep 3; done"; then
echo >&2 "docker is not installed yet"
exit 1
fi
if ! timeout 30s bash -c "until pgrep rootlesskit; do sleep 3; done"; then
echo >&2 "rootlesskit (used by rootless docker) is not running"
exit 1
fi
hint: See "/var/log/cloud-init-output.log". in the guest
hostResolver:
# hostResolver.hosts requires lima 0.8.3 or later. Names defined here will also
# resolve inside containers, and not just inside the VM itself.
hosts:
host.docker.internal: host.lima.internal
portForwards:
- guestSocket: "/var/run/docker.sock"
hostSocket: "{{.Dir}}/sock/docker.sock"
message: |
To run `docker` on the host (assumes docker-cli is installed), run the following commands:
------
docker context create lima --docker "host=unix://{{.Dir}}/sock/docker.sock"
docker context use lima
docker run hello-world
------
This seems not to work. Seems that the socket is not on user level.
default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock swarm
So I changed the portForwards:
portForwards:
- guestSocket: "/var/run/docker.sock"
hostSocket: "{{.Dir}}/sock/docker.sock"
But when I set the docker context
to the lima vm (the socket available in .lima
folder) it doesn't work.
With docker ps
->
error during connect: Get "<http://%2FUsers%2FUSER%2F.lima%2Fdocker_x86_64_root%2Fsock%2Fdocker.sock/v1.24/containers/json?all=1>": EOF
Did I miss something?best-city-49378
06/19/2022, 12:06 PMbest-city-49378
06/19/2022, 12:06 PMbest-city-49378
06/20/2022, 8:13 PMhundreds-crowd-93261
06/23/2022, 5:55 PMssh $lima_vm
works directly? I’ve got an ssh alias, which calls my ssh binary that handles setting TERMINFO on the remote end (for Kitty terminal) and id like to have that functionality, but it’s cumbersome to eval "$(limactl show-ssh my-vm-name)"
hundreds-crowd-93261
06/23/2022, 9:05 PM# match lima VM names and use limactl to ssh to them
Match exec "limactl list -q | grep -q '%h'"
ProxyCommand limactl shell %h nc 127.0.0.1 22
best-city-49378
06/29/2022, 3:48 PMbest-city-49378
07/01/2022, 5:17 AMlemon-wire-57428
07/02/2022, 4:00 PMlemon-wire-57428
07/07/2022, 12:42 AMutil.py[WARNING]: Failed to create user johndoe
here's a little snippet:
[ 9.302014] cloud-init[620]: 2022-07-06 22:56:06,308 - cc_ca_certs.py[WARNING]: DEPRECATION: key 'ca-certs' is now deprecated. Use 'ca_certs' instead.
[ 9.310466] cloud-init[620]: Updating certificates in /etc/ssl/certs...
[ 9.957213] cloud-init[620]: 0 added, 0 removed; done.
[ 9.959290] cloud-init[620]: Running hooks in /etc/ca-certificates/update.d...
[ 9.961933] cloud-init[620]: done.
[ 9.983448] cloud-init[620]: 2022-07-06 22:56:06,989 - util.py[WARNING]: Failed to create user johndoe
[ 9.986888] cloud-init[620]: 2022-07-06 22:56:06,991 - util.py[WARNING]: Running module users-groups (<module 'cloudinit.config.cc_users_groups' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_users_groups.py'>) failed
[ 10.520038] cloud-init[620]: Generating public/private rsa key pair.
[ 10.522103] cloud-init[620]: Your identification has been saved in /etc/ssh/ssh_host_rsa_key
[ 10.524759] cloud-init[620]: Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub
[ 10.527118] cloud-init[620]: The key fingerprint is:
Which is causing this other error towards the end:
sudo -iu johndoe XDG_RUNTIME_DIR=/run/user/501 systemctl --user enable --now dbus
sudo: unknown user johndoe
sudo: error initializing audit plugin sudoers_audit
a bit more snippet:
[ 33.254669] sudo[2228]: + '[' -e /run/user/501/systemd/private ']'
[ 33.255221] sudo[2228]: + '[' -n '' ']'
[ 33.255977] sudo[2228]: + sudo -iu johndoe XDG_RUNTIME_DIR=/run/user/501 systemctl --user enable --now dbus
[ 33.257239] sudo[2228]: sudo: unknown user johndoe
[ 33.259272] sudo[2228]: sudo: error initializing audit plugin sudoers_audit
[ 33.259392] sudo[2228]: LIMA| WARNING: Failed to execute /mnt/lima-cidata/boot/40-install-containerd.sh
But if I create a new user, say janedoe
on my macOS, run sudo su - janedoe
, copy over the .lima folder from johndoe
user to janedoe
and run limactl start vm-name
, it starts fine with no issues... Any ideas what the issue could be or where I can look?adamant-truck-16816
07/13/2022, 5:56 PMadamant-truck-16816
07/14/2022, 3:31 AMlimactl start --name odb odb_lima.yaml
? Creating an instance "odb" Proceed with the current configuration
INFO[0001] Attempting to download the image from "<https://cloud-images.ubuntu.com/releases/22.04/release-20220712/ubuntu-22.04-server-cloudimg-amd64.img>" digest=
600.38 MiB / 600.38 MiB [----------------------------------] 100.00% 18.66 MiB/s
INFO[0034] Downloaded the image from "<https://cloud-images.ubuntu.com/releases/22.04/release-20220712/ubuntu-22.04-server-cloudimg-amd64.img>"
INFO[0034] Attempting to download the nerdctl archive from "<https://github.com/containerd/nerdctl/releases/download/v0.21.0/nerdctl-full-0.21.0-linux-amd64.tar.gz>" digest="sha256:728f9b543374b1b1733f759608e156dbe578d7b140a081084a1f4bfb4f2b3fbf"
INFO[0034] Using cache "/Users/jaimegarza/Library/Caches/lima/download/by-url-sha256/dd4613292b3a598687b9e5f97a294845661491c61e554435a27c6f6c691f8dd4/data"
INFO[0035] [hostagent] Starting QEMU (hint: to watch the boot progress, see "/Users/jaimegarza/.lima/odb/serial.log")
INFO[0035] SSH Local Port: 49615
INFO[0035] [hostagent] Waiting for the essential requirement 1 of 3: "ssh"
and more lines like this
best-city-49378
07/24/2022, 4:42 PMbest-city-49378
07/24/2022, 4:43 PMaverage-carpet-40645
07/26/2022, 8:09 AMbest-accountant-68201
08/01/2022, 11:38 PMsticky-gold-62836
08/08/2022, 10:00 AMicy-insurance-45500
08/13/2022, 7:38 PMgreat-planet-76498
08/24/2022, 8:09 AMhundreds-crowd-93261
08/25/2022, 6:29 PMhundreds-crowd-93261
08/30/2022, 6:05 PM~
mount’s absolute path? Trying to set a few variables in my .bashrc
as part of the provisioning and it relies on knowing the path to my Mac’s ~
within the VM, and I’d like to avoid hardcoding it since this template is shared with others.hundreds-crowd-93261
08/30/2022, 6:10 PMNetwork dropped connection on reset
much like this: https://github.com/lima-vm/lima/issues/831 still digging into it.refined-whale-54424
08/31/2022, 11:34 PMsocket_vmnet
being used by lima-vm/lima
?
I searched through the repo but did not find any references to socket_vment
, but did find references to `StartCmd()`'s VMNET (commands.go#L66).fast-garage-66093
09/13/2022, 10:15 PMfast-garage-66093
09/13/2022, 10:15 PMbest-city-49378
09/15/2022, 10:57 AMadamant-truck-16816
09/15/2022, 8:12 PMINFO[0000] Terminal is not available, proceeding without opening an editor
INFO[0000] Attempting to download the image from "<https://yum.oracle.com/templates/OracleLinux/OL8/u6/x86_64/OL8U6_x86_64-kvm-b126.qcow>" digest=
INFO[0000] Using cache "/Users/vguruswa/Library/Caches/lima/download/by-url-sha256/35f305085158790bc721937e5951d39e295d04378b53ea054568b53883c05a43/data"
INFO[0000] Attempting to download the nerdctl archive from "<https://github.com/containerd/nerdctl/releases/download/v0.22.2/nerdctl-full-0.22.2-linux-amd64.tar.gz>" digest="sha256:2b4a099fbc30bd9959b0034f3c3e73a011ea8c76aa7e20139862313aef576e61"
INFO[0000] Using cache "/Users/vguruswa/Library/Caches/lima/download/by-url-sha256/dcf17205e4f1c03637d803a93cb214a13ebe4021f1f55587be07b73f4848adb3/data"
INFO[0002] [hostagent] Starting QEMU (hint: to watch the boot progress, see "/Users/vguruswa/.lima/oracledb/serial.log")
INFO[0002] SSH Local Port: 55893
INFO[0002] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0087] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0127] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0137] [hostagent] Waiting for the essential requirement 1 of 5: "ssh"
INFO[0145] [hostagent] The essential requirement 1 of 5 is satisfied
INFO[0145] [hostagent] Waiting for the essential requirement 2 of 5: "user session is ready for ssh"
INFO[0168] [hostagent] Waiting for the essential requirement 2 of 5: "user session is ready for ssh"
INFO[0178] [hostagent] The essential requirement 2 of 5 is satisfied
INFO[0178] [hostagent] Waiting for the essential requirement 3 of 5: "sshfs binary to be installed"
INFO[0222] [hostagent] Waiting for the essential requirement 3 of 5: "sshfs binary to be installed"
INFO[0263] [hostagent] Waiting for the essential requirement 3 of 5: "sshfs binary to be installed"
INFO[0304] [hostagent] Waiting for the essential requirement 3 of 5: "sshfs binary to be installed"
INFO[0345] [hostagent] Waiting for the essential requirement 3 of 5: "sshfs binary to be installed"
INFO[0386] [hostagent] Waiting for the essential requirement 3 of 5: "sshfs binary to be installed"
INFO[0427] [hostagent] Waiting for the essential requirement 3 of 5: "sshfs binary to be installed"
INFO[0468] [hostagent] Waiting for the essential requirement 3 of 5: "sshfs binary to be installed"
INFO[0509] [hostagent] Waiting for the essential requirement 3 of 5: "sshfs binary to be installed"
INFO[0551] [hostagent] Waiting for the essential requirement 3 of 5: "sshfs binary to be installed"
INFO[0592] [hostagent] Waiting for the essential requirement 3 of 5: "sshfs binary to be installed"
FATA[0600] did not receive an event with the "running" status
fast-garage-66093
09/22/2022, 10:36 PMfast-garage-66093
09/22/2022, 10:37 PM