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.

2 Answers 2


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.

  • 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, 2011 at 1:37
  • KVM is simplest.
    – Tobu
    Feb 28, 2011 at 1:40

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.

  • Note that the mentioned LXC is actually such a technology.
    – mattdm
    Feb 27, 2011 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, 2011 at 1:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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