Bryan Østergaard ([info]kloeri) wrote,
@ 2009-05-10 13:10:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
KVM images
I've uploaded new KVM images based on the 20090504 stages a day or two ago. The images are available at http://dev.exherbo.org/images/ as usual.

But more interestingly I've now made the script used to build the images available so you can build new images yourself whenever you like. The script is available in the scripts/ directory of the exherbo repository.

All you need to build your own image is a few prerequisites and this script. The script requires kvm (for kvm-image) and parted (used to manipulate the partition table) and sfdisk (used to get some partition table information) installed.

"paludis --install kvm parted util-linux" will ensure you have all the needed prerequisites. After installing those all you need is to specify a few options to the script and everything should be automatic from there on.

The script describes the available options and their defaults when passed -h or --help.

# ./create-kvm-image --help
Usage: create-kvm-image [OPTIONS]
Options:
    --arch=amd64|x86                Target architecture for image file
    --kernelversion=            Kernel version to be used in image
    --stageversion=             Date of tarball, for example 20090504 or current
    --kvmtmpdir=/path/to/image      Where to build the image file. Defaults to /tmp/kvm-tmp/
    --kvmtmpkernel=/path/to/kernel  Where to build the kernel. Defaults to /rootfs
    --kvmimagename=/path/to/image   Image filename (including path). Defaults to /exherbo-x86_64.img
    --kvmimagesize=          Size of image file in gigabytes. Defaults to 6G
    --jobs=                  Number of make jobs when building the kerne. Defaults to 4

If you're satisfied with the defaults all you need to specify are kernel version, stage tarball version and architecture. Which gives you a command like ./create-kvm-image --kernelversion=2.6.29.2 --stageversion=20090504 --arch=amd64

And a few minutes later (takes about 5 minutes on my quad-core Core2 box) you'll have a brand new KVM image called exherbo-x86_64.img in /tmp/kvm-tmp/. Please note that we don't support cross compiling yet so you'll have to specify the same target architecture as your host architecture for now.

And as always, I welcome git format-patches to add support for other image types (virtualbox, vmware, ..) and other features.



(3 comments) - (Post a new comment)

Provide bzip2 image
(Anonymous)
2009-05-11 10:46 am UTC (link)
Hi Bryan,

AFAIK Gentoo does not handle xz archives (lzma-utils blocks xz-utils and is used by coreutils and some other core packages). Could you provide bzip2 archives ?

Thanks.

(Reply to this) (Thread)

Re: Provide bzip2 image
[info]kloeri
2009-05-11 01:37 pm UTC (link)
Sure, I'll upload those later today.

(Reply to this) (Parent)

Disk image builder
(Anonymous)
2009-10-22 03:14 pm UTC (link)
Bryan,
I just released some software is more generic in image building scope (not just for kvm). You could probably implement your script on to of it

https://sourceforge.net/projects/diskegrator/

-Dave

(Reply to this)


(3 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…