{"action":"created","issue":{"url":"https://api.github.com/repos/fgrehm/vagrant-lxc/issues/339","labels_url":"https://api.github.com/repos/fgrehm/vagrant-lxc/issues/339/labels{/name}","comments_url":"https://api.github.com/repos/fgrehm/vagrant-lxc/issues/339/comments","events_url":"https://api.github.com/repos/fgrehm/vagrant-lxc/issues/339/events","html_url":"https://github.com/fgrehm/vagrant-lxc/issues/339","id":54250370,"number":339,"title":"Using vagrant-lxc on CircleCI","user":{"login":"tknerr","id":365744,"avatar_url":"https://avatars.githubusercontent.com/u/365744?v=3","gravatar_id":"","url":"https://api.github.com/users/tknerr","html_url":"https://github.com/tknerr","followers_url":"https://api.github.com/users/tknerr/followers","following_url":"https://api.github.com/users/tknerr/following{/other_user}","gists_url":"https://api.github.com/users/tknerr/gists{/gist_id}","starred_url":"https://api.github.com/users/tknerr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tknerr/subscriptions","organizations_url":"https://api.github.com/users/tknerr/orgs","repos_url":"https://api.github.com/users/tknerr/repos","events_url":"https://api.github.com/users/tknerr/events{/privacy}","received_events_url":"https://api.github.com/users/tknerr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-13T21:25:50Z","updated_at":"2015-01-13T22:23:26Z","closed_at":null,"body":"Yesterday I found out about http://circleci.com and that they support running docker containers as part of their build. Within a few hours I got a test-kitchen suite with the kitchen-docker driver up and running:\r\n\r\n * build success: https://circleci.com/gh/tknerr/sample-toplevel-cookbook/26\r\n * source (circleci branch): https://github.com/tknerr/sample-toplevel-cookbook/tree/circleci\r\n\r\nSo I thought if docker runs then LXC should work too!\r\n\r\nHowever, I'm a bit stuck with getting vagrant-lxc up and running up there. Here's what I got so far:\r\n\r\n * build error: https://circleci.com/gh/tknerr/sample-toplevel-cookbook/24\r\n * source (circleci-lxc branch): https://github.com/tknerr/sample-toplevel-cookbook/tree/circleci-lxc\r\n\r\nThis is the relevant part from the logs I guess:\r\n```\r\n...\r\n       DEBUG driver: Creating container...\r\n        INFO subprocess: Starting process: [\"/usr/bin/sudo\", \"/usr/local/bin/vagrant-lxc-wrapper\", \"lxc-create\", \"-B\", \"best\", \"--template\", \"vagrant-tmp-kitchen-sample-toplevel-cookbook-1421181672.596891\", \"--name\", \"kitchen-sample-toplevel-cookbook-1421181672.596891\", \"--\", \"--tarball\", \"/home/ubuntu/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-precise64-lxc/0/lxc/rootfs.tar.gz\", \"--config\", \"/home/ubuntu/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-precise64-lxc/0/lxc/lxc-config\"]\r\n       DEBUG subprocess: Selecting on IO\r\n       DEBUG subprocess: stderr: tar: dev/ram15: Cannot mknod: Operation not permitted\r\n       tar: dev/smpte0: Cannot mknod: Operation not permitted\r\n       tar: dev/tty: Cannot mknod: Operation not permitted\r\n       tar: dev/zero: Cannot mknod: Operation not permitted\r\n       tar: dev/smpte3: Cannot mknod: Operation not permitted\r\n       tar: dev/kmem: Cannot mknod: Operation not permitted\r\n       tar: dev/smpte2: Cannot mknod: Operation not permitted\r\n       tar: dev/loop4: Cannot mknod: Operation not permitted\r\n       tar: dev/mixer1: Cannot mknod: Operation not permitted\r\n       tar: dev/mpu401data: Cannot mknod: Operation not permitted\r\n       tar: dev/ram16: Cannot mknod: Operation not permitted\r\n       tar: dev/audio3: Cannot mknod: Operation not permitted\r\n       tar: dev/urandom: Cannot mknod: Operation not permitted\r\n       tar: dev/loop6: Cannot mknod: Operation not permitted\r\n       tar: dev/loop2: Cannot mknod: Operation not permitted\r\n       DEBUG subprocess: stderr: tar: dev/mpu401stat: Cannot mknod: Operation not permitted\r\n       tar: dev/dsp2: Cannot mknod: Operation not permitted\r\n       tar: dev/mixer3: Cannot mknod: Operation not permitted\r\n       tar: dev/tty0: Cannot mknod: Operation not permitted\r\n       tar: dev/ram7: Cannot mknod: Operation not permitted\r\n       tar: dev/tty5: Cannot mknod: Operation not permitted\r\n       tar: dev/loop7: Cannot mknod: Operation not permitted\r\n       tar: dev/ptmx: Cannot mknod: Operation not permitted\r\n       tar: dev/ram10: Cannot mknod: Operation not permitted\r\n       tar: dev/midi1: Cannot mknod: Operation not permitted\r\n       tar: dev/sequencer: Cannot mknod: Operation not permitted\r\n       tar: dev/smpte1: Cannot mknod: Operation not permitted\r\n       tar: dev/audio1: Cannot mknod: Operation not permitted\r\n       tar: dev/audioctl: Cannot mknod: Operation not permitted\r\n       tar: dev/loop3: Cannot mknod: Operation not permitted\r\n       tar: dev/midi3: Cannot mknod: Operation not permitted\r\n       tar: dev/full: Cannot mknod: Operation not permitted\r\n       tar: dev/mem: Cannot mknod: Operation not permitted\r\n       tar: dev/dsp1: Cannot mknod: Operation not permitted\r\n       tar: dev/random: Cannot mknod: Operation not permitted\r\n       tar: dev/audio2: Cannot mknod: Operation not permitted\r\n       tar: dev/dsp3: Cannot mknod: Operation not permitted\r\n       tar: dev/ram4: Cannot mknod: Operation not permitted\r\n       tar: dev/ram8: Cannot mknod: Operation not permitted\r\n       tar: dev/ram5: Cannot mknod: Operation not permitted\r\n       tar: dev/ram13: Cannot mknod: Operation not permitted\r\n       tar: dev/null: Cannot mknod: Operation not permitted\r\n       tar: dev/dsp: Cannot mknod: Operation not permitted\r\n       tar: dev/midi01: Cannot mknod: Operation not permitted\r\n       tar: dev/ram11: Cannot mknod: Operation not permitted\r\n       tar: dev/midi2: Cannot mknod: Operation not permitted\r\n       tar: dev/ram2: Cannot mknod: Operation not permitted\r\n       tar: dev/tty9: Cannot mknod: Operation not permitted\r\n       tar: dev/sndstat: Cannot mknod: Operation not permitted\r\n       tar: dev/ram12: Cannot mknod: Operation not permitted\r\n       tar: dev/loop5: Cannot mknod: Operation not permitted\r\n       tar: dev/mixer2: Cannot mknod: Operation not permitted\r\n       tar: dev/mixer: Cannot mknod: Operation not permitted\r\n       tar: dev/loop1: Cannot mknod: Operation not permitted\r\n       tar: dev/port: Cannot mknod: Operation not permitted\r\n       tar: dev/rmidi1: Cannot mknod: Operation not permitted\r\n       tar: dev/rmidi0: Cannot mknod: Operation not permitted\r\n       tar: dev/midi02: Cannot mknod: Operation not permitted\r\n       tar: dev/ram9: Cannot mknod: Operation not permitted\r\n       tar: dev/loop0: Cannot mknod: Operation not permitted\r\n       tar: dev/rmidi3: Cannot mknod: Operation not permitted\r\n       tar: dev/midi00: Cannot mknod: Operation not permitted\r\n       tar: dev/agpgart: Cannot mknod: Operation not permitted\r\n       DEBUG subprocess: stderr: tar: dev/ram14: Cannot mknod: Operation not permitted\r\n       tar: dev/audio: Cannot mknod: Operation not permitted\r\n       tar: dev/tty8: Cannot mknod: Operation not permitted\r\n       tar: dev/midi03: Cannot mknod: Operation not permitted\r\n       tar: dev/ram1: Cannot mknod: Operation not permitted\r\n       tar: dev/midi0: Cannot mknod: Operation not permitted\r\n       tar: dev/tty7: Cannot mknod: Operation not permitted\r\n       tar: dev/tty6: Cannot mknod: Operation not permitted\r\n       tar: dev/ram6: Cannot mknod: Operation not permitted\r\n       tar: dev/ram0: Cannot mknod: Operation not permitted\r\n       tar: dev/ram3: Cannot mknod: Operation not permitted\r\n       tar: dev/rmidi2: Cannot mknod: Operation not permitted\r\n       DEBUG subprocess: stderr: tar: var/lib/sudo: implausibly old time stamp 1970-01-01 00:00:00\r\n       DEBUG subprocess: stderr: tar: Exiting with failure status due to previous errors\r\n       DEBUG subprocess: stderr: lxc_container: container creation template for kitchen-sample-toplevel-cookbook-1421181672.596891 failed\r\n       DEBUG subprocess: stderr: lxc_container: Is the rootfs mounted with -o user_subvol_rm_allowed?\r\n       lxc_container: Error destroying rootfs for kitchen-sample-toplevel-cookbook-1421181672.596891\r\n       lxc_container: Error creating container kitchen-sample-toplevel-cookbook-1421181672.596891\r\n       DEBUG subprocess: stdout: Unpacking the rootfs\r\n       DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31995\r\n       DEBUG subprocess: Exit status: 0\r\n        INFO driver: Removing LXC template\r\n        INFO subprocess: Starting process: [\"/usr/bin/sudo\", \"/usr/local/bin/vagrant-lxc-wrapper\", \"rm\", \"/usr/share/lxc/templates/lxc-vagrant-tmp-kitchen-sample-toplevel-cookbook-1421181672.596891\"]\r\n       DEBUG subprocess: Selecting on IO\r\n       DEBUG subprocess: stdout: \r\n       DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000\r\n       DEBUG subprocess: Exit status: 0\r\n...\r\n```\r\n\r\nI'm not really fond of LXC, but I ssh'ed into the box (yes you can do that on circleci) and mimicked some of the commands that vagrant-lxc does. \r\n\r\nThis is what I got:\r\n```\r\nubuntu@box109:~$ sudo cp /home/ubuntu/.vagrant.d/gems/gems/vagrant-lxc-1.0.1/scripts/lxc-template /usr/share/lxc/templates/lxc-vagrant-foo\r\n\r\nubuntu@box109:~$ ls -la /usr/share/lxc/templates/lxc-*\r\n-rwxr-xr-x 1 root root 10789 Sep 30 17:13 /usr/share/lxc/templates/lxc-alpine\r\n-rwxr-xr-x 1 root root 13533 Sep 30 17:13 /usr/share/lxc/templates/lxc-altlinux\r\n-rwxr-xr-x 1 root root 10253 Sep 30 17:13 /usr/share/lxc/templates/lxc-archlinux\r\n-rwxr-xr-x 1 root root  9446 Sep 30 17:13 /usr/share/lxc/templates/lxc-busybox\r\n-rwxr-xr-x 1 root root 28932 Sep 30 17:13 /usr/share/lxc/templates/lxc-centos\r\n-rwxr-xr-x 1 root root 10150 Sep 30 17:13 /usr/share/lxc/templates/lxc-cirros\r\n-rwxr-xr-x 1 root root 12158 Sep 30 17:13 /usr/share/lxc/templates/lxc-debian\r\n-rwxr-xr-x 1 root root 17427 Sep 30 17:13 /usr/share/lxc/templates/lxc-download\r\n-rwxr-xr-x 1 root root 47200 Sep 30 17:13 /usr/share/lxc/templates/lxc-fedora\r\n-rwxr-xr-x 1 root root 27808 Sep 30 17:13 /usr/share/lxc/templates/lxc-gentoo\r\n-rwxr-xr-x 1 root root 13961 Sep 30 17:13 /usr/share/lxc/templates/lxc-openmandriva\r\n-rwxr-xr-x 1 root root 13705 Sep 30 17:13 /usr/share/lxc/templates/lxc-opensuse\r\n-rwxr-xr-x 1 root root 35445 Sep 30 17:13 /usr/share/lxc/templates/lxc-oracle\r\n-rwxr-xr-x 1 root root 11837 Sep 30 17:13 /usr/share/lxc/templates/lxc-plamo\r\n-rwxr-xr-x 1 root root  6851 Sep 30 17:13 /usr/share/lxc/templates/lxc-sshd\r\n-rwxr-xr-x 1 root root 24273 Sep 30 17:13 /usr/share/lxc/templates/lxc-ubuntu\r\n-rwxr-xr-x 1 root root 12401 Sep 30 17:13 /usr/share/lxc/templates/lxc-ubuntu-cloud\r\n-rwxr-xr-x 1 root root  5341 Jan 13 20:50 /usr/share/lxc/templates/lxc-vagrant-foo\r\n\r\nubuntu@box109:~$ sudo lxc-create -B best --template vagrant-foo --name foo -- --tarball /home/ubuntu/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-precise64-lxc/0/lxc/rootfs.tar.gz --config /home/ubuntu/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-precise64-lxc/0/lxc/lxc-config\r\nUnpacking the rootfs\r\ntar: dev/ram15: Cannot mknod: Operation not permitted\r\ntar: dev/smpte0: Cannot mknod: Operation not permitted\r\ntar: dev/tty: Cannot mknod: Operation not permitted\r\ntar: dev/zero: Cannot mknod: Operation not permitted\r\ntar: dev/smpte3: Cannot mknod: Operation not permitted\r\ntar: dev/kmem: Cannot mknod: Operation not permitted\r\ntar: dev/smpte2: Cannot mknod: Operation not permitted\r\ntar: dev/loop4: Cannot mknod: Operation not permitted\r\ntar: dev/mixer1: Cannot mknod: Operation not permitted\r\ntar: dev/mpu401data: Cannot mknod: Operation not permitted\r\ntar: dev/ram16: Cannot mknod: Operation not permitted\r\ntar: dev/audio3: Cannot mknod: Operation not permitted\r\ntar: dev/urandom: Cannot mknod: Operation not permitted\r\ntar: dev/loop6: Cannot mknod: Operation not permitted\r\ntar: dev/loop2: Cannot mknod: Operation not permitted\r\ntar: dev/mpu401stat: Cannot mknod: Operation not permitted\r\ntar: dev/dsp2: Cannot mknod: Operation not permitted\r\ntar: dev/mixer3: Cannot mknod: Operation not permitted\r\ntar: dev/tty0: Cannot mknod: Operation not permitted\r\ntar: dev/ram7: Cannot mknod: Operation not permitted\r\ntar: dev/tty5: Cannot mknod: Operation not permitted\r\ntar: dev/loop7: Cannot mknod: Operation not permitted\r\ntar: dev/ptmx: Cannot mknod: Operation not permitted\r\ntar: dev/ram10: Cannot mknod: Operation not permitted\r\ntar: dev/midi1: Cannot mknod: Operation not permitted\r\ntar: dev/sequencer: Cannot mknod: Operation not permitted\r\ntar: dev/smpte1: Cannot mknod: Operation not permitted\r\ntar: dev/audio1: Cannot mknod: Operation not permitted\r\ntar: dev/audioctl: Cannot mknod: Operation not permitted\r\ntar: dev/loop3: Cannot mknod: Operation not permitted\r\ntar: dev/midi3: Cannot mknod: Operation not permitted\r\ntar: dev/full: Cannot mknod: Operation not permitted\r\ntar: dev/mem: Cannot mknod: Operation not permitted\r\ntar: dev/dsp1: Cannot mknod: Operation not permitted\r\ntar: dev/random: Cannot mknod: Operation not permitted\r\ntar: dev/audio2: Cannot mknod: Operation not permitted\r\ntar: dev/dsp3: Cannot mknod: Operation not permitted\r\ntar: dev/ram4: Cannot mknod: Operation not permitted\r\ntar: dev/ram8: Cannot mknod: Operation not permitted\r\ntar: dev/ram5: Cannot mknod: Operation not permitted\r\ntar: dev/ram13: Cannot mknod: Operation not permitted\r\ntar: dev/null: Cannot mknod: Operation not permitted\r\ntar: dev/dsp: Cannot mknod: Operation not permitted\r\ntar: dev/midi01: Cannot mknod: Operation not permitted\r\ntar: dev/ram11: Cannot mknod: Operation not permitted\r\ntar: dev/midi2: Cannot mknod: Operation not permitted\r\ntar: dev/ram2: Cannot mknod: Operation not permitted\r\ntar: dev/tty9: Cannot mknod: Operation not permitted\r\ntar: dev/sndstat: Cannot mknod: Operation not permitted\r\ntar: dev/ram12: Cannot mknod: Operation not permitted\r\ntar: dev/loop5: Cannot mknod: Operation not permitted\r\ntar: dev/mixer2: Cannot mknod: Operation not permitted\r\ntar: dev/mixer: Cannot mknod: Operation not permitted\r\ntar: dev/loop1: Cannot mknod: Operation not permitted\r\ntar: dev/port: Cannot mknod: Operation not permitted\r\ntar: dev/rmidi1: Cannot mknod: Operation not permitted\r\ntar: dev/rmidi0: Cannot mknod: Operation not permitted\r\ntar: dev/midi02: Cannot mknod: Operation not permitted\r\ntar: dev/ram9: Cannot mknod: Operation not permitted\r\ntar: dev/loop0: Cannot mknod: Operation not permitted\r\ntar: dev/rmidi3: Cannot mknod: Operation not permitted\r\ntar: dev/midi00: Cannot mknod: Operation not permitted\r\ntar: dev/agpgart: Cannot mknod: Operation not permitted\r\ntar: dev/ram14: Cannot mknod: Operation not permitted\r\ntar: dev/audio: Cannot mknod: Operation not permitted\r\ntar: dev/tty8: Cannot mknod: Operation not permitted\r\ntar: dev/midi03: Cannot mknod: Operation not permitted\r\ntar: dev/ram1: Cannot mknod: Operation not permitted\r\ntar: dev/midi0: Cannot mknod: Operation not permitted\r\ntar: dev/tty7: Cannot mknod: Operation not permitted\r\ntar: dev/tty6: Cannot mknod: Operation not permitted\r\ntar: dev/ram6: Cannot mknod: Operation not permitted\r\ntar: dev/ram0: Cannot mknod: Operation not permitted\r\ntar: dev/ram3: Cannot mknod: Operation not permitted\r\ntar: dev/rmidi2: Cannot mknod: Operation not permitted\r\ntar: var/lib/sudo: implausibly old time stamp 1970-01-01 00:00:00\r\ntar: Exiting with failure status due to previous errors\r\nlxc_container: container creation template for foo failed\r\nlxc_container: Is the rootfs mounted with -o user_subvol_rm_allowed?\r\nlxc_container: Error destroying rootfs for foo\r\nlxc_container: Error creating container foo\r\n\r\nubuntu@box109:~$ sudo lxc-create -B btrfs --template vagrant-foo --name foo -- --tarball /home/ubuntu/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-precise64-lxc/0/lxc/rootfs.tar.gz --config /home/ubuntu/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-precise64-lxc/0/lxc/lxc-config\r\nContainer already exists\r\n\r\nubuntu@box109:~$ sudo lxc-ls\r\nfoo                                                 kitchen-sample-toplevel-cookbook-1421181672.596891\r\n\r\nubuntu@box109:~$ sudo lxc-info --name foo\r\nName:           foo\r\nState:          STOPPED\r\n\r\nubuntu@box109:~$ sudo lxc-start --name foo\r\ninit: Unable to mount /dev filesystem: Operation not permitted\r\ninit: Unable to create device: /dev/ptmx\r\ninit: Unable to mount /dev/pts filesystem: Invalid argument\r\ninit: Unable to create device: /dev/null\r\ninit: Unable to create device: /dev/tty\r\nlxc-start: The container failed to start.\r\nlxc-start: Additional information can be obtained by setting the --logfile and --logpriority options.\r\n\r\nubuntu@box109:~$ sudo lxc-destroy --name foo\r\nlxc_container: Is the rootfs mounted with -o user_subvol_rm_allowed?\r\nlxc_container: Error destroying rootfs for foo\r\nDestroying foo failed\r\n```\r\n\r\nDo you see any chance of getting this working on circleci?\r\n\r\nIt would be much more than awesome if that worked!"},"comment":{"url":"https://api.github.com/repos/fgrehm/vagrant-lxc/issues/comments/69832671","html_url":"https://github.com/fgrehm/vagrant-lxc/issues/339#issuecomment-69832671","issue_url":"https://api.github.com/repos/fgrehm/vagrant-lxc/issues/339","id":69832671,"user":{"login":"tknerr","id":365744,"avatar_url":"https://avatars.githubusercontent.com/u/365744?v=3","gravatar_id":"","url":"https://api.github.com/users/tknerr","html_url":"https://github.com/tknerr","followers_url":"https://api.github.com/users/tknerr/followers","following_url":"https://api.github.com/users/tknerr/following{/other_user}","gists_url":"https://api.github.com/users/tknerr/gists{/gist_id}","starred_url":"https://api.github.com/users/tknerr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tknerr/subscriptions","organizations_url":"https://api.github.com/users/tknerr/orgs","repos_url":"https://api.github.com/users/tknerr/repos","events_url":"https://api.github.com/users/tknerr/events{/privacy}","received_events_url":"https://api.github.com/users/tknerr/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T22:23:26Z","updated_at":"2015-01-13T22:23:26Z","body":"@fgrehm yes I believe it is a docker in docker scenario. What does that mean for us then? \r\n(darn I need to get more involved with docker definitely...)"}}