Hello Everyone,
For a project I’m currently working on I want to make a request to create a container from a remote image server. Other operations work fine even with a offical image server. But somehow it doesn’t with my own remote server. This is my curl and the corresponding information:
curl -s -k --cert /home/linuxluca/snap/lxd/common/config/client.crt --key /home/linuxluca/snap/lxd/common/config/client.key https://localhost:8443/1.0/containers -X POST -d ‘{“name”: “testRemote”,“source”: {“type”: “image”, “protocol”: “simplestreams”, “server”: “https://192.168.178.30:8443”, “alias”: “amdImage”}}’ | jq .
{
“type”: “async”,
“status”: “Operation created”,
“status_code”: 100,
“operation”: “/1.0/operations/86cbbfc3-8817-42bf-a560-8a813f1e1d4b”,
“error_code”: 0,
“error”: “”,
“metadata”: {
“id”: “86cbbfc3-8817-42bf-a560-8a813f1e1d4b”,
“class”: “task”,
“description”: “Creating instance”,
“created_at”: “2022-11-21T15:30:57.817928941+01:00”,
“updated_at”: “2022-11-21T15:30:57.817928941+01:00”,
“status”: “Running”,
“status_code”: 103,
“resources”: {
“containers”: [
“/1.0/containers/testRemote”
],
“instances”: [
“/1.0/instances/testRemote”
]
},
“metadata”: null,
“may_cancel”: false,
“err”: “”,
“location”: “none”
}
}
Everything seems fine here but if I check the operation all I get is this:
curl -s -k --cert /home/linuxluca/snap/lxd/common/config/client.crt --key /home/linuxluca/snap/lxd/common/config/client.key https://localhost:8443/1.0/operations/86cbbfc3-8817-42bf-a560-8a813f1e1d4b | jq .
{
“type”: “error”,
“status”: “”,
“status_code”: 0,
“operation”: “”,
“error_code”: 404,
“error”: “Operation not found”,
“metadata”: null
}
Can someone tell me what I’m doing wrong? When I’m just doing ‘lxc launch remote:amdImage testRemote’ it works but I need it to work with the API. Also I verified the connection and that the image is found as well.
Thank you.