Update options LXD Host and LXD Container

Hello,

I use Ubuntu Server 20.04 Server. I am not sure what is the best way to update the host (ubuntu) and the container (ubuntu).

  • Do I need to update the host in the first step and then the container afterwards ?
  • Does it cause issues when I use the command “apt full-upgrade” or “apt autoremove” within the container ?

Is there a general rule for this or a document that discribes the best way on Ubuntu ?

Best Regards

It doesn’t matter, you can run very widely different releases and even distributions in your containers from what’s running on the host.

1 Like

Just as an information, I can also mix kernel versions ?

This means I could use an older kernel on the host and update to a newer version in the lxd container and the other way around ?

Containers don’t run kernels, that’s what separates containers from virtual machines.

But yes, the vast majority of Linux distributions run just fine with a variety of kernels.
We’ve been able to run Linux distributions from over a decade ago on modern 5.12 kernels and the reverse tends to be easier as most libraries know to fallback to older kernel features when the new stuff isn’t available.

Thank you very much for the configuration.

Containers don’t run kernels, that’s what separates containers from virtual machines.
That is true, but the container system doesn’t know about it. Or am I wrong ?

Then I will update the container as usual: apt update && apt upgrade && apt full-upgrade && apt autoremove.