-3

I search a lightweight full OS virtualization tool.

It should run on linux and the OS inside the virtualization is linux, too.

My use case: I want to test our configuration management.

  1. Start base image of a current linux distribution (Ubuntu and SuSE)
  2. Run our configuration management (salt stack)
  3. Check if the operating system was configured correctly and is working.

Things which I think don't match:

  • KVM/Qemu: too heavy, not leight weight
  • Docker: I need cron, ssh, apache inside the OS. AFAIK Docker is not suited here.
  • chroot is not enough, since AFAIK bind to 0.0.0.0 does not work (apache, sshd, ...)

Which (open source) tool could be used?

guettli
  • 3,591
  • 17
  • 72
  • 123

1 Answers1

1

The closest thing I can think of is LXD.

LXD is a management daemon that uses LXC for the "virtualization"

The implementation under the hood is more like Docker (Docker used to be based on the LXC library) but the usage is meant to be more like a VM.

Really what you're getting here is an init process in a container. There are many different base images to start from to approximate an Ubuntu, CentOS, Alpine or other Linux system. However, there is no hardware emulation like with VMs; all containers are running on top of the kernel of the host.

The lead developer has a blog series here about using LXD.

I use LXD in development and testing often. You can set it up with a private bridge to be a network isolated to the local machine or bridge with your physical interface and expose the containers on the outside network. Which is how I run my home server so I can ssh into each container/server as if it were a full server.

For testing and development work the network bridge is not connected with any physical device so I can setup database cluster or whatever I need with real networking but only on my local laptop.

virullius
  • 1,048
  • 1
  • 9
  • 23