VT-CloudCaps:Debian 7 (wheezy)
Prerequisites
Prepare an image of whatever size you think is appropriate. We have documented some thoughts on image size, as there are a number of influences one has to keep in mind. So, let's say you create an empty image of 2G.
$ truncate -s 2G my-new-image.img
Download the installation medium. We have used the netboot installer.
Installation
Use a hypervisor like KVM to prepare the image:
$ kvm -cdrom debian-7.4.0-amd64-netinst.iso my-new-image.img -boot d -m 512
Partitioning
When asked for how to partition your image, just create a single partition. There should not be any separate partitions for any other file systems or swap space. The installer will complain about missing swap space, but allow you to ignore this warning. Please do so. Should an instance created from your image ever need any swap space, you can either size up your instance or create swap space by several means (NOTE: do we need a link about how to do this?).
Select and install software
- Standard system utilities
- SSH Server
- Cloud-init
- cloud-initramfs
- cloud-utils
- less
After installation, the following has to be run.
dpkg-reconfigure cloud-init
In the following dialog, select
- EC2 Metadata service
- OpenStack Config Drive
- Failsafe datasource
- + whatever else you think is required for the environments that your image will run in
Initramfs
It will be sufficient to use "most" modules, not all. This can be configured in /etc/initramfs-tools/initramfs.conf
... # # MODULES: [ most | netboot | dep | list ] # # most - Add most filesystem and all harddrive drivers. # # dep - Try and guess which modules to load. # # netboot - Add the base modules, network modules, but skip block devices. # # list - Only include modules from the 'additional modules' list # MODULES=most ...