Pylxd Copy container


With pylxd I can’t copy a container, I use this command:

instance = client.instances.get('test')
config = {'name': 'copy-of-test', 'source': {'type': 'copy', 'source': 'test'} }
copy_instance = client.instances.create(config, wait=True)

In the documentation I don’t see an exemple, can you give me de method to copy a container by pylxd ?



For info, there is the error I have.

What version of pylxd are you using?

Your code looks correct, what error do you get when running it in python?

Also, does lxc copy test copy-of-test work?