Differences between revisions 2 and 3
Revision 2 as of 2012-05-18 09:04:03
Size: 1007
Comment:
Revision 3 as of 2012-05-18 09:17:16
Size: 1888
Comment:
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:

== Howtos ==

=== Preparing a Debian stable/squeeze amd64 image ===

 * Download an installer CD iso image, for instance :<<BR>>{{{
$ wget http://cdimage.debian.org/debian-cd/6.0.5/amd64/iso-cd/debian-6.0.5-amd64-netinst.iso
}}}
 * Prepare a VM disk image file (for instance of size 1 Gb)<<BR>>{{{
$ qemu-img create debian-6.0.5-amd64-one.img -f raw 1G
}}}
 * Boot the installer to install it on the prepared disk image file. ATTENTION :
  * do this on machine running an amd64 kernel if generating amd64 image :<<BR>>{{{
$ kvm -m 512 -cdrom debian-6.0.5-amd64-netinst.iso -boot d debian-6.0.5-amd64-one.img
}}}
  * or do that if you run a different architecture kernel (i386 for instance) on the machine on which you prepare the AMD64 image :<<BR>>{{{
$ qemu-system-x86_64 -m 512 -cdrom debian-6.0.5-amd64-netinst.iso -boot d debian-6.0.5-amd64-one.img
}}}

This page is meant to describe ways to prepare a Debian VM image ready to be used to deploy VM instances in OpenNebula.

Principles

The first step needed is to install a Debian system onto a system image which will be later run with the virtualizer of OpenNebula, typically kvm.

The easiest way to do this is to perform a Debian install inside qemu/kvm on a machine which may not be the OpenNebula execution host.

Attention : if the target is supposed to run a i686 VM, be careful to install from an i386 installer, and likewise for amd64.

After installation, the system will need to be personalized to include some scripts needed by OpenNebula. These scripts are executed upon boot, and to the personalization of the VM : when OpenNebula deploys a VM, it will boot its image providing it with an iso9660 CD image which it will have prepared so that it contains a context definition file. The personalization you'll add to the VM image is the means to load that context file upon boot.

Howtos

Preparing a Debian stable/squeeze amd64 image

  • Download an installer CD iso image, for instance :

    $ wget http://cdimage.debian.org/debian-cd/6.0.5/amd64/iso-cd/debian-6.0.5-amd64-netinst.iso
  • Prepare a VM disk image file (for instance of size 1 Gb)

    $ qemu-img create debian-6.0.5-amd64-one.img -f raw 1G 
  • Boot the installer to install it on the prepared disk image file. ATTENTION :
    • do this on machine running an amd64 kernel if generating amd64 image :

      $ kvm -m 512 -cdrom debian-6.0.5-amd64-netinst.iso -boot d debian-6.0.5-amd64-one.img 
    • or do that if you run a different architecture kernel (i386 for instance) on the machine on which you prepare the AMD64 image :

      $ qemu-system-x86_64 -m 512 -cdrom debian-6.0.5-amd64-netinst.iso -boot d debian-6.0.5-amd64-one.img