Create virtual disk images using grml-debootstrap
Background:
Lars Wirzenius was searching for a tool to create virtual disk images. Turned out I needed something similar to improve the automatic deployment process of a customer’s platform installation.
Being the author of the mentioned grml-debootstrap tool I started to work on deploying virtual disk images using grml-debootstrap. As a result I just uploaded grml-debootstrap version 0.46 which is the first release being capable of installing virtual disk images. Thanks to great help by Thorsten Glaser also proper Grub integration is working now.
Instructions:
Grab the most recent grml-debootstrap version (>=0.46) from the grml-testing repository and make sure to install its recommends (kpartx mksh parted qemu-utils). Then just use the vmfile option to activate deployment of a virtual disk image, combined with the target option as usual. To adjust the disk size use the vmsize option.
Usage example:
# IMAGE_FILE="/mnt/sda1/qemu.img" # grml-debootstrap --vmfile --vmsize 3G --target $IMAGE_FILE
I tested it from inside a running Grml live system, which is running inside a KVM image running on a Proxmox VE cluster. I can even invoke KVM/Qemu inside Grml inside KVM to test the image (using remote access e.g. via “vncviewer $IP_OF_KVM_HOST:5901”) running:
# kvm -hda $IMAGE_FILE -m 256 -vnc :1
And the best about it: it just works. :)
As usual: testing and feedback highly welcome.
May 31st, 2011 at 03:28
How about uploading grml-debootstrap to Debian?
May 31st, 2011 at 16:30
@Paul: lovely idea, thanks! Recorded in Grml’s BTS as http://bts.grml.org/grml/issue1000 – will work on that.
regards,
-mika-