I’m using Incus 6.0.5.
I set up an http server with the following structure:
images/
test-app/
0.0.1/
incus.tar.xz
rootfs.squashfs
streams/
v1/
images.json
index.json
images.json:
{
"format": "products:1.0",
"products": {
"test-app": {
"arch": "amd64",
"release": "0.0.1",
"versions": {
"0.0.1": {
"items": {
"incus.tar.xz": {
"ftype": "incus.tar.xz",
"sha256": "879d93fabd5a21a5a4d83745e1ad8dbd13e4c10581ed3245b8a105e0f8ec6ba3",
"path": "images/test-app/0.0.1/incus.tar.xz",
"size": 440
},
"rootfs": {
"ftype": "squashfs",
"sha256": "592f776a067f338029755c930608b3be43fd463abd849e521c50bc0e5dedb8fe",
"path": "images/test-app/0.0.1/rootfs.squashfs",
"size": 137244672
}
}
}
}
}
}
}
index.json:
{
"format": "index:1.0",
"index": {
"images": {
"datatype": "image-downloads",
"format": "products:1.0",
"path": "streams/v1/images.json",
"products": ["test-app"]
}
}
}
I added this as a remote and confirmed that incus can read it. However, I’m always getting:
Error: Failed instance creation: Failed getting remote image info: Failed getting image: The requested image couldn’t be found
Also no image shows up with `incus image list private-images:`
I’m pulling my hair because I tried many things, different structures, and I cannot make it work.
BTW. There seems to be a really awful bug: incus caches images.json and index.json for an hour, I think, and there is no cli-way of clearing this cache. I lost hours debugging the incus-image server interaction because of that.
But the actual question is: what should be the correct json structure for Incus to pick up this image?