3

As far as I know, Linux container is different from virtual machine. It's lightweight virtualization technology. So I'm wondering if it can be run on a virtual machine which provisioned by hypervisor like xen, kvm or vmware?

I was trying setup a Linux container(docker + LXC userspace tool) on a virtual machine based on zex. It failed.

[root@docker lib]# service docker start
Starting cgconfig service: Error: cannot mount cpuset to /cgroup/cpuset: Device or resource busy
/sbin/cgconfigparser; error loading /etc/cgconfig.conf: Cgroup mounting failed
Failed to parse /etc/cgconfig.conf                         [FAILED]
Starting docker:                                           [  OK  ]

and if trying to run a container:

root@docker lib]# docker run -i -t ubuntu /bin/echo hello world
lxc-start: error while loading shared libraries: liblxc.so.1: cannot open shared object file: No such file or directory
2014/03/27 14:03:27 Error: start: Cannot start container da0d674d3e31a7c36a9e352f64fd84986cbb872e526cb2dd6adb7473d4f5a430: exit status 127

Actually, I followed a blog to do, the author made it, while I screw it.

Any one can explain that? Or simply tell me it can not be ran on a virtual machine. Really appreciate.

Xiaoming
  • 599
  • 2
  • 8
  • 17
  • Thanks Mureinik, etc. for remindering me about what's on and off-topic. This question was asked in such hurry. – Xiaoming Mar 28 '14 at 13:52
  • What I'm looking for is a faster way to deploy the application I developed, which has such integration interfaces with other components. So I need to set up the whole system with person build at minimal cost in Cloud. So I though the developers should have rich experience on this.... – Xiaoming Mar 28 '14 at 14:18
  • http://stackoverflow.com/questions/18274088/how-can-i-make-my-own-base-image-for-docker – Xiaoming Mar 28 '14 at 15:18
  • the official website for Docker points to Stack Overflow: http://docs.docker.io/en/latest/faq/ – Xiaoming Mar 28 '14 at 15:18
  • http://stackoverflow.com/questions/16047306/how-is-docker-io-different-from-a-normal-virtual-machine – Xiaoming Mar 28 '14 at 15:28
  • http://stackoverflow.com/questions/17989306/what-does-docker-add-to-just-plain-lxc?rq=1 – Xiaoming Mar 28 '14 at 15:35

1 Answers1

1

Yes, it can. If your VM's operating system supports the appropriate filesystems, and have containers. I suggest you go though as suggested on https://www.docker.io/gettingstarted/ and use a recent Ubuntu release, since that is known to work.

Alister Bulman
  • 34,482
  • 9
  • 71
  • 110
  • I just asked this question for the cloud provider, they said: Docker operates primarily off of cgroups to function as well as several other core libvert packages which are not compatible with the existing virtualized system. – Xiaoming Mar 27 '14 at 20:02
  • 2
    This seems like a limitation of your cloud provider. Try using another one (AWS, Digital Ocean, etc) and see if you run into the same problems. – Andy Mar 27 '14 at 20:37