Update images list


(Agostino) #1

During the setup of lxd init, I sayd no when lxd asks me if I want the periodical update of the images.

Right now when I launch “lxc image list images” I just get:
±------±------------±-------±------------±-----±-----±------------+
| ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCH | SIZE | UPLOAD DATE |
±------±------------±-------±------------±-----±-----±------------+

Is there a way to launch a manual update only when I need it?


(Stéphane Graber) #2

You can run lxc image refresh against a particular image to refresh it in the image store.
Though even with update disabled, LXD will always attempt to pull the latest image during container creation, so unless you know your system is going to go offline for a while, this shouldn’t really be needed.


(Agostino) #3

I’d like to installa a new debian9, but the commands I gave did not resolve the issue:

ago@ctgate ~ $ lxc image refresh images:debian/stretch
error: The remote isn’t a private LXD server
ago@ctgate ~ $ lxc image refresh images:debian
error: The remote isn’t a private LXD server
ago@ctgate ~ $ lxc image refresh debian/stretch
error: not found

Is possible to make an update which makes “lxc image list images” return the entire list of the images as it was in origin?


(Stéphane Graber) #4

lxc refresh works against your existing cached images, so run lxc image list, find the image you want to update and run lxc image refresh <hash>.

Output above suggests you have no image in your local cache, in which case there’s nothing to refresh.


(Agostino) #5

Ok there was a misunderstanding. It didn’t work for my bad. I resolved the issue now. Thanks.