$ lxc launch ubuntu:x py34
Creating py34
Starting py34
$ lxc exec py34 -- apt-get install python3.4
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libpython3.4-minimal' for regex 'python3.4'
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ echo $?
0
$ lxc exec py34 -- apt-get install not-a-real-package
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package not-a-real-package
$ echo $?
100