No such object exception when creating an instance
rafalf opened this issue · 2 comments
config = {'name': 'my-instance', 'source': {'type': 'image', 'alias': 'debian/10'}, 'config': {'limits.cpu': '2'}}
try:
instance = client.instances.create(config, wait=True)
except LXDAPIException as e:
print(e)
sys.exit()
No such object
the following works ok for me tho
config = {'name': 'my-instance', 'source': {'type': 'none'}, 'type': 'container'}
instance = client.instances.create(config, wait=True)
lxd --version 4.17
python 3.8.11
Name: pylxd
Version: 2.3.0
Summary: python library for LXD
Home-page: http://www.linuxcontainers.org
Author: Paul Hummer and others (see CONTRIBUTORS.rst)
Author-email: lxc-devel@lists.linuxcontainers.org
License: UNKNOWN
Location: /home/rafal/rport-e2e-test/venv/lib/python3.8/site-packages
Requires: python-dateutil, requests-unixsocket, requests-toolbelt, cryptography, ws4py, requests
Required-by:
(venv) rafal@rafal:~/rport-e2e-test$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
Sounds like you don't have a local image by that name.