LXD can not create ubuntu image

Hi, am trying to create an ubuntu container but i get this error. any idea?

Creating c1
Error: Failed instance creation: Create instance from image: open /var/lib/lxd/images/23c5d20588bbf88999bff4483ff8abf0984351e671b7fbb6dc0be8510eabe9c4: no such file or directory```

Looks like you have a partial image of some kind.
Try to delete it with ‘lxc image remove’ and then launch the container again.

lxc image delete 23c5d20588bbf88999bff4483ff8abf0984351e671b7fbb6dc0be8510eabe9c4

lxc init images:ubuntu/18.04/amd64 c1
Creating c1
Error: Failed instance creation: Create instance from image: open /var/lib/lxd/images/23c5d20588bbf88999bff4483ff8abf0984351e671b7fbb6dc0be8510eabe9c4: no such file or directory

To be honest this error, started to appear, imedialty after i was initing a container without giving it a name.

Hmm, that’s weird, it should have caused a new download to happen.

Do you use projects?

yes.
i sort of like, and do not.
i like projects, so i can really create separate projects, but do not like, when i need to run or get shell on other projects container.
EDITE:
off topic, but need it, do i backup projects the same way i backup a normal container, in other words, do i back up projects by export containers one by one?

Ok, so you may still have that image in another project, which would explain why the image delete did nothing. You’re going to have to delete it from all projects, at which point LXD will re-download it and should have things back to normal.

Note that you can do something like lxc exec --project BLAH NAME -- bash

Yeah, projects are just buckets of instances (and of some other stuff), the way to backup the instances is the same regardless of project, so you’ll want lxc export for that.

1 Like