What's the right way to upgrade this system?

I wish there was a “How To Upgrade LXD” page somewhere on the web, that people like me could refer to.

There isn’t one, so here’s my question:

My dev machine is Ubuntu 16.04 Desktop, with LXD 2.x from PPA.

I need to format it and install Ubuntu 18.04, where I’d like to have LXD 3.x from snap.

I would like all my containers to be copied there and continue working.

What’s the procedure I should follow?

I thought of several ways, but I don’t know which would work and which wouldn’t.

For example I thought of creating images from all of my containers (on lxd 2), and then import them into LXD 3 on the new machine. Would that work?

I also thought that maybe I could upgrade LXD on my current machine (to lxd 3 on snap) and see what happens to my containers, and then create images from my containers and then move them to the new machine. Would that work?

Is there some other solution you suggest?

  • Alex

In your case, note that 18.04 comes with LXD as Deb package.

You may very well select to keep the supported Deb version for the foreseeable future, and upgrade to snap as soon as the snap version gets too many good features to miss. The Deb version of 18.04 has 5-year support so it will stay at version 3.0.x.

I believe that you can transfer the files to the new installation and it should work.

I am not sure what storage backend you

What @simos said.

On top of that, yes you could export your existing container as images, the image format is the same on 2.0 and 3.0 so it doesn’t matter what LXD version you export from or import into.