podman-on-mac icon indicating copy to clipboard operation
podman-on-mac copied to clipboard

cloud-config.yaml needs to start podman.socket

Open darylmhurst opened this issue 3 years ago • 1 comments

Following the README.md instructions doesn't quite work, the section that says Run *podman info* once again, but now from Mac terminal fails because the socket within the running multipass VM isn't started.

After some investigation it looks like the runcmd command aren't correct and need to be as follows:

runcmd:
  - export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus && sudo -E -u ubuntu systemctl --user enable podman.socket
  - export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus && sudo -E -u ubuntu systemctl --user start podman.socket
  - sudo systemctl enable -s HUP ssh

The systemctl commands were failing (as they ran as user root and not ubuntu), secondly when using sudo to run them as the correct user the systemctl still fails as there is no DBUS_SESSION_BUS_ADDRESS variable set, therefore the export DBUS_SESSION_BUS_ADDRESS command also needs to be used.

With this config the VM starts up correctly and allows your Mac to communicate with the newly provisioned VM.

darylmhurst avatar Sep 02 '21 14:09 darylmhurst

@darylmhurst thank you! I was stuck on this step but after your change podman info works fine 👍

benjick avatar Sep 02 '21 18:09 benjick