, ,

Migration of Podman 4 to Podman 5 machines

Last week, I mentioned that Podman 5 is right around the corner and that more specific posts, especially about Podman machine, would be forthcoming.  One of the biggest questions we receive when discussing Podman 5 is about migration of its machines.  What is the migration path?

The simple answer is that there is no upgrade path between Podman 4 and Podman 5 machines.  The underpinnings and operating system improvements in Podman 5 machines make this a non-trivial process.  If you are working on a critical project where you rely on Podman machine for your development, you should consider waiting to upgrade to Podman 5.

In the case of Macs running Podman 4, it was based on QEMU virtualization.   Podman 5 uses the Apple Hypervisor on Macs and support for QEMU was deprecated.  Also, depending on where you have obtained your Podman 5 binaries, you will want to make sure you have vfkit installed as it replaces QEMU.

Upgrading to Podman 5 machines

As mentioned earlier, Podman 5 is incompatible with Podman 4 machines.  Before upgrading, you should backup any data on your Podman 4 machines because you will eventually need to remove them.  Consider the scenarios below.

My containers and images are ephemeral

Before upgrading to Podman 5, remove all of your Podman 4 machines.  After upgrading to Podman 5, consider running the new podman machine reset command.

My containers and images are not ephemeral

There are some approaches you can consider for saving your containers and images.

If you built custom images and they are hard to replicate (or time consuming), push the image to a registry like quay.io.  They can later be pulled back to your machine and run as containers.

If you have a container that is long lasting and difficult to reproduce, you could consider a couple of approaches:

  1. Use podman commit and then push the image to a registry and pull the same image on the new machine.
  2. If you would prefer to skip the use of a registry, you could use podman save on the container and then podman load onto the new machine.

Now remove your Podman 4 machines with the podman machine rm command.  After upgrading to Podman 5, consider running the new podman machine reset command.

Leave a Reply

Subscribe

Sign up with your email address to receive updates by email from this website.


Categories


Search