Starting pod on system boot using Systemd #25242
-
Hello friends, Error: default OCI runtime "crun" not found: invalid argument Even though it won't successfully start, after the system boot if I start it manually using [Unit]
Description=Starts ERP container Service
After=network.target systemd-user-sessions.service plymouth-quit-wait.service
Requires=podman.socket
[Service]
User=liyu_admin
Group=liyu_admin
Type=oneshot
RemainAfterExit=true
Restart=on-failure
ExecStart=podman pod start mypod
[Install]
WantedBy=multi-user.target I appreciate your support, Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 8 replies
-
Which commands did you run to create the pod mypod? |
Beta Was this translation helpful? Give feedback.
-
Hello @eriksjolund |
Beta Was this translation helpful? Give feedback.
-
Hello @eriksjolund Error: no pod with name or ID mypod found: no such pod FYI: I am not generating the systemd unit file using podman-generate-systemd. Therefore it might require specifying a user since podman is rootless by default; I have added the following parameters after checking on the forum you have suggested: Type=oneshot
RemainAfterExit=yes
ExecStartPre=nm-online --timeout=30
TimeoutStartSec=90s
ExecStart=podman pod start mypod and still getting an error with no detailed logs Feb 07 14:13:18 fedora systemd[1]: Starting erp.service - Starts ERP container Service...
Feb 07 14:14:02 fedora nm-online[1070]: [1002B blob data]
Feb 07 14:14:02 fedora systemd[1]: erp.service: Control process exited, code=exited, status=1/FAILURE
Feb 07 14:14:02 fedora systemd[1]: erp.service: Failed with result 'exit-code'.
Feb 07 14:14:02 fedora systemd[1]: Failed to start erp.service - Starts ERP container Service. |
Beta Was this translation helpful? Give feedback.
-
Hello @eriksjolund I have tried adding It might be helpful for anyone using Linux on a VM environment and coming to this discussion in the future. |
Beta Was this translation helpful? Give feedback.
This finally seems working for me