vmdebootstrap is deprecated; this page is out of date

See https://bugs.debian.org/907751 for more information.


vmdebootstrap is a wrapper around debootstrap to install Debian into a disk image, which can be used with a virtual machine (such as KVM).


https://vmdebootstrap.alioth.debian.org/ hosts the documentation built from the current master branch, links to the manpages, links to the git repository for the vmdebootstrap code and other useful information.

The rest of the information on this page may become out of date, so always check the information available on the homepage before filing bugs.



This information is for the current dispatcher, the refactoring already supports using vmdebootstrap images without needing custom overlays.


If devices of the chosen type do not support auto-login in LAVA, an overlay is used to provide access.

set -e

# temporary: download linaro-overlay packages, which provide
# auto-serial-console. Plans for the future include providing
# auto-serial-console in the Debian archive so we don't need this.
while read line; do
  if ! echo "$line" | sha1sum --check --quiet - > /dev/null 2>&1; then
    package=$(echo "$line" | awk '{ print($2) }')
    echo "Downloading $package ..."
    wget --quiet $PREFIX/$package
    echo "$line" | sha1sum --check --quiet
done < external-packages.sha1sum

sudo vmdebootstrap \
  --custom-package='linaro-overlay_1112.2_all.deb' \
  --custom-package='linaro-overlay-minimal_1112.2_all.deb' \
  --enable-dhcp \
  --serial-console --serial-console-command='/bin/auto-serial-console' \
  --root-password='root' \
  --verbose \

If building an image using Jessie or later, the serial-console and serial-console-command options are not required. (Newer versions of vmdebootstrap will ignore these options for distributions other than Wheezy.)

For Ubuntu images

vmdebootstrap automates the selection of kernels from Debian archives for i386 and amd64, different repositories or different architectures need to specify the kernel meta package directly:

$ sudo vmdebootstrap \
  --enable-dhcp --no-kernel --package=linux-image \
  --root-password='root' --hostname='ubuntu' --user=linaro/linaro --sudo \
  --verbose \

For LAVA Ubuntu images

sudo vmdebootstrap  --custom-package='linaro-overlay_1112.2_all.deb' \
  --custom-package='linaro-overlay-minimal_1112.2_all.deb' \
  --enable-dhcp --no-kernel --package=linux-image-generic \
  --serial-console --serial-console-command='/bin/auto-serial-console' \
  --root-password='root' --hostname='ubuntu' --user=linaro/linaro \
  --sudo --distribution=trusty  --verbose  --image trusty.img \


Architectures other than i386 or amd64 can use emulation support. (vmdebootstrap is installable on any architecture using the Linux kernel.)

iMX53 / ARM multi-platform kernel


$ sudo apt-get install qemu-system-arm qemu-user-static binfmt-support

$ sudo vmdebootstrap  --enable-dhcp --no-kernel --package=linux-image-armmp \
 --verbose --image armmp.img --size 1g --mirror http://ftp.uk.debian.org/debian \
 --arch=armhf --distribution jessie --foreign=/usr/bin/qemu-arm-static