Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Debian Stable, I would like to be able to create a new instance of the OS, use apt-get to install some Unstable packages with dependencies, then cleanly delete the whole thing when I'm done. VirtualBox or QEMU would work, but Xen/KVM/LXC seem to be lighter and faster. How do they compare for this use?

Edit: To clarify, in this case, I want to set up to be able to install-use-remove dangerous things without messing up the base system. Looking for what would be most lightweight/fast.

share|improve this question
up vote 2 down vote accepted

For this kind of use, I'd go with a specialized Linux-on-Linux virtual machine technology (as opposed to a more general technology such ax Xen, KVM, VirtualBox or Qemu): LXC, OpenVZ, user-mode Linux, Vserver

You could even use a chrooted installation. The schroot package is convenient for this.

share|improve this answer
Note that the mentioned LXC is actually such a technology. – mattdm Feb 27 '11 at 23:18
It seems you are recommending a container/zone/jail over a hypervisor or emulator setup. I was already thinking an emulator would be too heavy. Why would you advise containers over a hypervisor? – user5184 Feb 28 '11 at 1:43

If you just want to test dependencies, pbuilder (or cowbuilder, which adds COW and is slightly faster to launch), a chroot environment tuned for building packages, would work very well.

If you want to handle untrusted packages, you'll need LXC or full virtualisation. LXC takes some configuration, but can be handled by libvirt if you want a high level of isolation; you still need to debootstrap it yourself as I recall. For full virtualisation, vmbuilder has a debian version that prepares and configures images. Since you don't need the flexibility of LXC, I recommend pbuilder or vmbuilder + kvm.

share|improve this answer
VMbuilder is a Python script to build VMs, right? So there is still the question of which hypervisor is best for the task. – user5184 Feb 28 '11 at 1:37
KVM is simplest. – Tobu Feb 28 '11 at 1:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.