SUSE Cloud/Images

From MicroFocusInternationalWiki
Jump to: navigation, search

Creation of images that are suitable for use in SUSE OpenStack Cloud is covered in great detail in http://docs.openstack.org/image-guide/

The short SUSE-specific version is: make sure, the cloud-init rpm is installed and its 4 .service files are enabled with

for s in init init-local config final ; do
    chkconfig cloud-$s on
done

This should ensure that

  • no default root-password is set (because otherwise evil password-bruteforcing-scripts will take over your machine within days).
  • the user's ssh public key gets pulled into the instance
  • it will resize your rootfs on first boot to the disk size available for the instance, allowing for the image to be below 1GB size to fit into the smallest default flavours.

In addition, you might want to use the 'zerofree' tool with ext2/3/4 partitions to fill unused disk-space with 0, to improve compressibility and then use

qemu-img convert -c -O qcow2 inputdiskimage outputimage.qcow2

to create a compressed file in qcow2 format.