{"action":"created","issue":{"url":"https://api.github.com/repos/sandia-minimega/minimega/issues/648","repository_url":"https://api.github.com/repos/sandia-minimega/minimega","labels_url":"https://api.github.com/repos/sandia-minimega/minimega/issues/648/labels{/name}","comments_url":"https://api.github.com/repos/sandia-minimega/minimega/issues/648/comments","events_url":"https://api.github.com/repos/sandia-minimega/minimega/issues/648/events","html_url":"https://github.com/sandia-minimega/minimega/issues/648","id":174410925,"number":648,"title":"Containers","user":{"login":"mkunz7","id":5001991,"avatar_url":"https://avatars.githubusercontent.com/u/5001991?v=3","gravatar_id":"","url":"https://api.github.com/users/mkunz7","html_url":"https://github.com/mkunz7","followers_url":"https://api.github.com/users/mkunz7/followers","following_url":"https://api.github.com/users/mkunz7/following{/other_user}","gists_url":"https://api.github.com/users/mkunz7/gists{/gist_id}","starred_url":"https://api.github.com/users/mkunz7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkunz7/subscriptions","organizations_url":"https://api.github.com/users/mkunz7/orgs","repos_url":"https://api.github.com/users/mkunz7/repos","events_url":"https://api.github.com/users/mkunz7/events{/privacy}","received_events_url":"https://api.github.com/users/mkunz7/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-01T00:35:58Z","updated_at":"2016-09-01T15:22:30Z","closed_at":null,"body":"I spent some time today trying to get containers working and I can't figure it out. \r\n\r\nUsing operating systems with systemd give me issues. So installed 12.04 lts and tried by best to understand:\r\nhttp://minimega.org/articles/vmtypes.article\r\n\r\nHere's my build log.\r\n\r\n```\r\n<install ubuntu 12.04.5 lts>\r\nsudo bash\r\napt-get update\r\napt-get install libpcap-dev libreadline-dev git qemu qemu-kvm openvswitch-switch dnsmasq python-jinja build-essential wget curl\r\napt-get install dh-autoreconf\r\napt-get install libjpeg-turbo8-dev\r\napt-get build-dep qemu\r\napt-get install flex\r\napt-get install bison\r\napt-get install libvde-dev libvdeplug2-dev libcap-ng-dev libattr1-dev\r\nwget http://wiki.qemu-project.org/download/qemu-2.7.0-rc5.tar.bz2\r\ntar xf qemu-2.7.0-rc5.tar.bz2\r\ncd qemu-2.7.0-rc5/\r\nmkdir -p bin/debug/native\r\ncd bin/debug/native\r\n../../../configure --enable-sdl --audio-drv-list=alsa,oss --enable-curses --enable-vnc-jpeg --enable-curl --enable-fdt --enable-kvm --enable-tcg-interpreter --enable-system --enable-user  --enable-linux-user --enable-pie --enable-uuid --enable-vde --enable-linux-aio --enable-cap-ng --enable-attr --enable-docs --enable-vhost-net --enable-rbd  --enable-guest-agent --target-list=x86_64-softmmu,i386-softmmu\r\nmake -j4\r\napt-get remove qemu\r\napt-get remove qemu-kvm\r\nmake install\r\ncp x86_64-softmmu/qemu-system-x86_64 /usr/bin/kvm\r\n\r\nwget http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.76.tar.gz\r\ntar xf dnsmasq-2.76.tar.gz\r\ncd dnsmasq-2.76/\r\nmake install\r\n\r\ncd ~\r\ncurl -O https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz\r\ntar xvf go1.6.linux-amd64.tar.gz\r\nchown -R root:root ./go\r\nmv go /usr/local\r\necho \"export GOPATH=$HOME/work\">>~/.profile\r\necho \"export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin\">>~/.profile\r\nsource ~/.profile\r\n\r\nwget https://github.com/sandia-minimega/minimega.git\r\ncd minimega\r\n./all.bash\r\n\r\nwget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19.8-vivid/linux-headers-3.19.8-031908_3.19.8-031908.201505110938_all.deb\r\nwget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19.8-vivid/linux-headers-3.19.8-031908-generic_3.19.8-031908.201505110938_amd64.deb\r\nwget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19.8-vivid/linux-image-3.19.8-031908-generic_3.19.8-031908.201505110938_amd64.deb\r\ndpkg -i *.deb\r\nreboot\r\n\r\n\r\nsudo bash\r\ncd ~\r\nwget https://storage.googleapis.com/minimega-files/minimega-2.2-containerfs.tar.bz2\r\ntar xf minimega-2.2-containerfs.tar.bz2\r\n\r\nnano /etc/default/grub\r\n<change GRUB_CMDLINE_LINUX=\"\" to change GRUB_CMDLINE_LINUX=\"cgroups_enabled=memory\">\r\nupdate-grub\r\nreboot\r\n\r\nsudo bash\r\nminimega/bin/minimega -nostdin &\r\nminimega/bin/minimega -attach\r\n\r\nweb root /home/ubuntu/minimega/misc/web 9001\r\nvm config init /home/ubuntu/containerfs/init\r\nvm config filesystem /home/ubuntu/containerfs/\r\nvm config fifo 1\r\nvm launch container myfirstcontainer\r\nvm start myfirstcontainer\r\n```\r\n\r\ncontainers launch\r\n```\r\n2016/08/31 19:25:59 INFO vmlist.go:251: launching 1 container vms\r\n2016/08/31 19:25:59 DEBUG misc.go:102: generateUUID\r\n2016/08/31 19:25:59 DEBUG misc.go:109: generated UUID: b7ac1f1d-3e4d-4308-ae36-f143683c7a18\r\n2016/08/31 19:25:59 INFO container.go:744: launching vm: 1\r\n2016/08/31 19:25:59 DEBUG container.go:1136: mounting overlay: [mount -t overlay megamount_1 -o lowerdir=/home/ubuntu/containerfs/,upperdir=/tmp/minimega/1/fs,workdir=/tmp/minimega/1/fs_work /tmp/minimega/1/fs]\r\n2016/08/31 19:25:59 DEBUG external.go:177: cmd /bin/mount completed in 1.588804ms\r\n2016/08/31 19:25:59 DEBUG container.go:899: vm 1 has pid 1530\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:356: containerShim: [CONTAINER /tmp/minimega/1 1 new /tmp/minimega/1/fs 2048 /tmp/minimega/1/uuid 1 CONTAINER_NONE /home/ubuntu/containerfs/init]\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:396: vm 1 hostname\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG external.go:177: cmd /bin/hostname completed in 769.924µs\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:405: vm 1 containerSetupRoot\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:412: vm 1 containerMountDefaults\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:1415: mountDefaults: /tmp/minimega/1/fs\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:419: vm 1 containerMknodDevices\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:426: vm 1 containerPtmx\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:445: vm 1 containerSymlinks\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:452: vm 1 containerRemountReadOnly\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:459: uuid bind mount: /tmp/minimega/1/uuid -> /sys/devices/virtual/dmi/id/product_uuid\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:466: vm 1 containerFifos\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:558: bind mounting: /tmp/minimega/1/fifo0 -> /tmp/minimega/1/fs/dev/fifos/fifo0\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:473: vm 1 containerMaskPaths\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:480: vm 1 containerPopulateCgroups\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:1289: using cgroupPath: /tmp/minimega/cgroup/minimega/1\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:487: vm 1 chdir\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:494: vm 1 containerChroot\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:501: vm 1 containerSetCapabilities\r\n2016/08/31 19:25:59 DEBUG containerShim: 2016/08/31 19:25:59 DEBUG container.go:513: sync for freezing\r\n2016/08/31 19:25:59 DEBUG server.go:596: ListenUnix: /tmp/minimega/1/fs/cc\r\n2016/08/31 19:25:59 INFO vmlist.go:308: launched 1 container vms in 13.730872ms\r\n```\r\n\r\nVM screenshot is not happy\r\n```\r\n2016/08/31 19:26:01 DEBUG bridge.go:41: periodic reapTaps\r\n2016/08/31 19:26:01 DEBUG cli.go:460: cliPreprocessor: all -> all\r\n2016/08/31 19:26:01 DEBUG message.go:65: Send:\r\n     Source:        ubuntu\r\n     Recipients:    []\r\n     Current Route: [ubuntu]\r\n     ID:            0\r\n     Command:       message\r\n\r\n2016/08/31 19:26:01 DEBUG message.go:77: routeSlices: map[]\r\n2016/08/31 19:26:01 DEBUG meshage.go:166: meshage sent, waiting on 0 responses\r\n2016/08/31 19:26:01 DEBUG cli.go:116: namespace: <nil>, command: &minicli.Command{Pattern:\"host\", Original:\"host\", StringArgs:map[string]string{}, BoolArgs:map[string]bool{}, ListArgs:map[string][]string{}, Subcommand:(*minicli.Command)(nil), Call:(minicli.CLIFunc)(0x4b3560), Record:false, noOp:false, Source:\"\"}\r\n2016/08/31 19:26:01 DEBUG stats.go:151: got memTotal 8088992\r\n2016/08/31 19:26:01 DEBUG stats.go:158: got memFree 7865140\r\n2016/08/31 19:26:01 DEBUG stats.go:165: got memBuffers 13252\r\n2016/08/31 19:26:01 DEBUG stats.go:172: got memCached 82232\r\n2016/08/31 19:26:01 DEBUG stats.go:151: got memTotal 8088992\r\n2016/08/31 19:26:01 DEBUG stats.go:158: got memFree 7865140\r\n2016/08/31 19:26:01 DEBUG stats.go:165: got memBuffers 13252\r\n2016/08/31 19:26:01 DEBUG stats.go:172: got memCached 82232\r\n2016/08/31 19:26:01 DEBUG node.go:481: MSA\r\n2016/08/31 19:26:01 DEBUG node.go:520: client list: []\r\n2016/08/31 19:26:01 DEBUG node.go:524: not issuing MSA, no connected clients\r\n2016/08/31 19:26:01 DEBUG cli.go:460: cliPreprocessor: 1 -> 1\r\n2016/08/31 19:26:01 DEBUG cli.go:460: cliPreprocessor: /dev/null -> /dev/null\r\n2016/08/31 19:26:01 DEBUG cli.go:460: cliPreprocessor: 300 -> 300\r\n2016/08/31 19:26:01 DEBUG cli.go:172: namespace: <nil>, source:\r\n2016/08/31 19:26:01 ERROR web.go:171: cannot take screenshot of container\r\n```\r\ncontainers die\r\n\r\n```\r\n2016/08/31 19:26:05 DEBUG command_socket.go:104: got command over socket: vm start a\r\n2016/08/31 19:26:05 DEBUG cli.go:460: cliPreprocessor: a -> a\r\n2016/08/31 19:26:05 DEBUG cli.go:172: namespace: <nil>, source:\r\n2016/08/31 19:26:05 DEBUG vmlist.go:485: applying main.VMs.Start to a (concurrent = true)\r\n2016/08/31 19:26:05 INFO container.go:643: starting VM: 1\r\n2016/08/31 19:26:05 DEBUG vm.go:719: updating vm 1 state: BUILDING -> RUNNING\r\n2016/08/31 19:26:05 DEBUG containerShim: 2016/08/31 19:26:05 DEBUG container.go:519: return from freezing\r\nminimega:/tmp/minimega/minimega$ 2016/08/31 19:26:05 INFO container.go:968: VM 1 exited\r\n2016/08/31 19:26:05 ERROR container.go:976: kill container: exit status 1\r\n2016/08/31 19:26:05 DEBUG vm.go:719: updating vm 1 state: RUNNING -> ERROR\r\n2016/08/31 19:26:06 DEBUG bridge.go:41: periodic reapTaps\r\n2016/08/31 19:26:06 DEBUG cli.go:460: cliPreprocessor: all -> all\r\n2016/08/31 19:26:06 DEBUG message.go:65: Send:\r\n     Source:        ubuntu\r\n     Recipients:    []\r\n     Current Route: [ubuntu]\r\n     ID:            0\r\n     Command:       message\r\n\r\n2016/08/31 19:26:06 DEBUG message.go:77: routeSlices: map[]\r\n```"},"comment":{"url":"https://api.github.com/repos/sandia-minimega/minimega/issues/comments/244114176","html_url":"https://github.com/sandia-minimega/minimega/issues/648#issuecomment-244114176","issue_url":"https://api.github.com/repos/sandia-minimega/minimega/issues/648","id":244114176,"user":{"login":"djfritz","id":4811604,"avatar_url":"https://avatars.githubusercontent.com/u/4811604?v=3","gravatar_id":"","url":"https://api.github.com/users/djfritz","html_url":"https://github.com/djfritz","followers_url":"https://api.github.com/users/djfritz/followers","following_url":"https://api.github.com/users/djfritz/following{/other_user}","gists_url":"https://api.github.com/users/djfritz/gists{/gist_id}","starred_url":"https://api.github.com/users/djfritz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djfritz/subscriptions","organizations_url":"https://api.github.com/users/djfritz/orgs","repos_url":"https://api.github.com/users/djfritz/repos","events_url":"https://api.github.com/users/djfritz/events{/privacy}","received_events_url":"https://api.github.com/users/djfritz/received_events","type":"User","site_admin":false},"created_at":"2016-09-01T15:22:30Z","updated_at":"2016-09-01T15:22:30Z","body":"The above is a general issue with minimega - though container-based experiments tend to hit this faster than others. Even docker has to do silly magic to get around this."}}
{"actor":{"display_login":"djfritz"}}