distrobox
distrobox copied to clipboard
On Fedora 36: Ubuntu 20.04 container save and restore seems not working
Please, can somebody retest the following procedure. I not sure if it is a bug or it depends on my Fedora 36 environment.
I am on Fedora 36, login with GNOME / X.
distrobox version 1.3.1, installed by sudo dnf install distrobox
I am getting error messages after starting a saved and restored container. Based on: https://distrobox.privatedns.org/useful_tips.html#container-save-and-restore
Get a clean environment, stop and remove all containers and images. WARNING: You are removing all your containers and images!
podman container stop $(podman container ls -aq)
podman container rm $(podman container ls -aq)
podman image rm $(podman image ls -aq)
Create tar.gz snapshot
distrobox-create --name ergo0 --image ubuntu:20.04
distrobox enter ergo0
exit
podman container commit -p ergo0 ergo0_export
podman save localhost/ergo0_export:latest | gzip > ergo0_export.tar.gz
Get a clean environment, stop and remove all containers and images. WARNING: You are removing all your containers and images!
podman container stop $(podman container ls -aq)
podman container rm $(podman container ls -aq)
podman image rm $(podman image ls -aq)
Load snapshot
podman load < ergo0_export.tar.gz
distrobox-create --image localhost/ergo0_export:latest --name ergo0
distrobox enter ergo0
Output with error message is:
Container ergo0 is not running.
Starting container ergo0
run this command to follow along:
podman logs -f ergo0
Error: could not start entrypoint.
...
+ mount --rbind -o ro /run/host/var/lib/flatpak /var/lib/flatpak
mount: only root can use "--rbind" option (effective UID is 1)
+ printf Warning: failed to bind mount %s to %s\n /run/host/var/lib/flatpak /var/lib/flatpak
+ return 1
+ [ 1 -ne 0 ]
+ printf Error: An error occurred\n
...
distrobox: Setting up read-only mounts
...
/var/lib/flatpak is not a mountpoint
Warning: failed to bind mount /run/host/var/lib/flatpak to /var/lib/flatpak
Error: An error occurred
An error occurred
An error occurred
Can you try using podman system migrate
just after importing the image (and before creating a container from it)?
Same behaviour. I enter:
...
podman load < ergo0_export.tar.gz
podman system migrate
distrobox-create --image localhost/ergo0_export:latest --name ergo0
distrobox enter ergo0
Same error message appears.
I'm not sure if this is a distrobox problem or a podman problem I'll try to reproduce, but after some try I still wasn't able to
I tried the above steps, but they work for me.
Same issue, running distrobox version > 1.4.1
via curl install on a Steam Deck:
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sh -s -- --prefix ~/.local
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/extras/install-podman | sh -s -- --prefix ~/.local`
Wanted to move my image with work environment to a different computer. Later found out, this happens with anything I podman load < image.tar.gz
and then try to distrobox create -i
from it, on the same system.
My error output is exactly the same.
Will try latest git version next.
(still on 1.4.1 not latest git)
Tried podman system migrate
and tried to enter right after:
Container work_image is not running.
Starting container work_image
run this command to follow along:
podman logs -f work_image
Error: unable to start container "313d0988db817a73bf9e20980ba8c8b32f5d0fa72a332bb77b2c925eb684d763": unable to find user root: no matching entries in passwd file
An error occurred
An error occurred
If I try to enter again after this, it falls back to the old error message about entrypoint.