SUSE Cloud/Images

From MicroFocusInternationalWiki
Revision as of 15:38, 14 February 2017 by Bmwiedemann (Talk | contribs) (init)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Creation of images that are suitable for use in SUSE OpenStack Cloud is covered in great detail in

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

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.