# Module lxc\_container uses wrong path to lxc-create on CentOS

**URL:** <https://forum.ansible.com/t/module-lxc-container-uses-wrong-path-to-lxc-create-on-centos/23583>\
**Category:** Ansible Project\
**Created:** [January 28, 2017, 3:35pm UTC](https://forum.ansible.com/t/module-lxc-container-uses-wrong-path-to-lxc-create-on-centos/23583 "2017-01-28T15:35:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [January 28, 2017, 3:35pm UTC](https://forum.ansible.com/t/module-lxc-container-uses-wrong-path-to-lxc-create-on-centos/23583/1 "2017-01-28T15:35:14Z")

</div>

Dear List,

is it just on my machine that the lxc\_container module uses the wrong  
path to lxc-create?

> fatal: [xyz]: FAILED! =\> {"changed": false, "command": "/bin/lxc-create --name foobar --quiet --template download --bdev btrfs -- -d centos -r 7 -a amd64", "err": "", "failed": true, "msg": "Failed executing lxc-create.", "rc": 1}

This is a CentOS7 host running lxc 2.0. Both lxc and python2-lxc are  
installed as packages, that I built myself  
([https://build.opensuse.org/project/monitor/home:ojkastl\_buildservice:LXC\_Vanilla\_stable-2.0](https://build.opensuse.org/project/monitor/home:ojkastl_buildservice:LXC_Vanilla_stable-2.0)).

I do not know if this error is in my copy of the python bindings, but  
a short grep did not show anything.

As this is a community module, I'll have to find out where to report  
bugs. If this is a bug...

Johannes

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [January 28, 2017, 3:37pm UTC](https://forum.ansible.com/t/module-lxc-container-uses-wrong-path-to-lxc-create-on-centos/23583/2 "2017-01-28T15:37:12Z")

</div>

Hmm, I should read the error messages more exact. lxc-create actually  
is in /bin/lxc-create.

Off investigating.

Johannes

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [January 28, 2017, 5:34pm UTC](https://forum.ansible.com/t/module-lxc-container-uses-wrong-path-to-lxc-create-on-centos/23583/3 "2017-01-28T17:34:19Z")

</div>

Sorry, my fault. One ansible statement did not work the way I wanted  
and lxc-create did not like the btrfs parameter when not being run on  
a btrfs...

Johannes
