Create a container with Ubuntu 22.04 Desktop edition

Is it possible to create an Ubuntu 22.04 Desktop container with lxc version 3.0.3?

It seems to be possible with 3.18 and above.
lxc launch images:ubuntu/jammy/desktop <name> --vm

No, --vm means you’re creating a virtual machine, not a container.
VM support was added with LXD 4.0, so you’ll need a more recent version of LXD or Incus to do that.

And its is possible to upgrade lxc/lxd 3.0.3 to >=4.0 in a Ubuntu18.04 host?
I did sudo apt upgrade lxd and it says it is the most update.

Ubuntu 18.04 is well past end of life. You’d be looking at installing a more recent lxd from snap - but I don’t remember if Ubuntu 18.04 supports snapd. Or in principle you could attempt to install incus from source but it’s quite possible that the dependencies in 18.04 are too old. At very least you’d want the HWE kernel.

It’ll be way easier, not to mention more secure, just to reinstall with Ubuntu 24.04 and be done with it. If you have any applications that need Ubuntu 18.04 then put those in containers.

I understood your point. Thanks!