You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to repurpose an M1 Mac as a sort of light-weight, local dev cloud environment.
So right now I have an Azure SDK demo project that is a cloud function that just returns what it is given. And of course I have a virtual machine to run it in, defined by this handy script:
remove@srvmini2 httptrigger-demo % podman system connection list
Name URI Identity Default ReadWrite
podman-vm ssh://core@127.0.0.1:49385/run/user/502/podman/podman.sock /Users/remove/.local/share/containers/podman/machine/machine falsetrue
podman-vm-root ssh://root@127.0.0.1:49385/run/podman/podman.sock /Users/remove/.local/share/containers/podman/machine/machine truetrue
and can manually run podman machine start podman-vm:
remove@srvmini2 httptrigger-demo % podman machine start podman-vm
Starting machine "podman-vm"
API forwarding listening on: /var/run/docker.sock
Docker API clients default to this address. You do not need to set DOCKER_HOST.
Machine "podman-vm" started successfully
remove@srvmini2 httptrigger-demo % podman machine list
NAME VM TYPE CREATED LAST UP CPUS MEMORY DISK SIZE
podman-vm applehv About an hour ago Currently running 4 8.004GiB 128GiB
So, with this in mind, I set up a plist file to execute that command on startup:
And, I thought it would work with the same user name "remove" that worked on the command line, but apparently it needs to be root. Even still, the machine doesn't start, even manually on the command line well after boot like. sudo launchctl load /Library/LaunchDaemons/com.podman.vmnetd.plist, and I see this in /var/log/podman/com.podman.vmnetd.err:
Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman socket: Get "http://d/v5.0.2/libpod/_ping": dial unix /run/podman/podman.sock: connect: no such file or directory
Does anyone know what I need to do to get this to work with LaunchDaemons? I swear, I've seen comments from people that indicate to me that this should work!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to repurpose an M1 Mac as a sort of light-weight, local dev cloud environment.
So right now I have an Azure SDK demo project that is a cloud function that just returns what it is given. And of course I have a virtual machine to run it in, defined by this handy script:
podman-init.up.sh
#!/bin/sh
PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin PODMAN_INIT_PATH=/Users/Shared/source/podman-init IGNITION_FILE=$PODMAN_INIT_PATH/ignition.json podman machine init --cpus 4 \ --disk-size 128 \ --memory 8196 \ --rootful \ --volume /Users/Shared/volumes/podman:/mnt/shared \ podman-vm
There actually isn't an ignition file.
After I run that I can see podman-vm listed:
and can manually run
podman machine start podman-vm
:So, with this in mind, I set up a plist file to execute that command on startup:
/Library/LaunchDaemons/com.podman.vmnetd.plist
And, I thought it would work with the same user name "remove" that worked on the command line, but apparently it needs to be root. Even still, the machine doesn't start, even manually on the command line well after boot like.
sudo launchctl load /Library/LaunchDaemons/com.podman.vmnetd.plist
, and I see this in/var/log/podman/com.podman.vmnetd.err
:Does anyone know what I need to do to get this to work with LaunchDaemons? I swear, I've seen comments from people that indicate to me that this should work!
Beta Was this translation helpful? Give feedback.
All reactions