Re: [lxc-users] lxd api return of /1.0/containers//exec

2016-12-23 Thread Robert Johnson
I've been working on obtaining two way communications with the /exec URI, but your needs may more simple then mine. When you POST to /exec, you probably want to include the 'record-output' key with a (boolean) value of true. ie '{"command": ["df -f /"], "record-output": true}' The doc's stat

[lxc-users] lxd api return of /1.0/containers//exec

2016-12-23 Thread laurent ducos
Hello. Is there a solution to get the return of a command launch by lxd exec API ? curl -s --unix-socket /var/lib/lxd/unix.socket a/1.0/containers/$CONTAINER/exec -X POST -d '{"command": ["df -f /"]}' | jq . I would like to see something like this in return of the command. output: /dev/sda5

Re: [lxc-users] Pre and post flight checks for container start/stop

2016-12-23 Thread Marat Khalili
Just recently I had similar requirement of making sure NFS is up before starting an LXC container. After some unsuccessful experiments with lxc.hook.pre-start etc I settled upon a systemd solution. If your system happen to use systemd, then e.g. for a container user1 create file /etc/systemd/un