linux · power · unicamp

power: creating an OpenStack Debian Image

Debian is a free and well known operating system with great stability. OpenStack  allows controlling large pools of compute, storage, and networking resources throughout a datacenter.

This post describe the necessary steps to create and run an Debian 8 image on OpenStack, both running on POWER8 processor.

Create a Debian Image

The first step is to create a common Debian image, which can be done using several different approaches. Regardless of what is chosen, ensure that you follow the steps below:

  • Set debian as hostname
  • Do not set password for root
  • Create a user called debian and set its password
  • Set the correct permissions so the user debian does not need password to execute commands as sudo:

#execute visudo

sudo visudo

#add the following line

debian ALL=(ALL) NOPASSWD: ALL

  • Remove the CD Rom entry  from /etc/apt/sources.list
  • Install the following packages:
    • cloud-init: initialization system for infrastructure cloud instances
    • cloud-initramfs-dyn-netconf: write a network interface file in /run for BOOTIF
    • cloud-initramfs-growroot: automatically resize the root partition on first boot
    • cloud-utils: cloud image management utilities.

sudo apt-get install -y cloud-init cloud-initramfs-dyn-netconf cloud-initramfs-growroot<b> </b>cloud-utils

  • Shutdown the image
  • Remove the mac address:

virt-sysprep -d <IMAGE_NAME>

  • Convert to qcow2:

qemu-img convert -c <IMAGE> -O qcow2 ./<IMAGE_NAME>.img

  • Upload to OpenStack:

glance image-create --file ./debian-8-ppc64le.img --container-format bare --disk-format qcow2 --name "Debian8 ppc64le Updated" --property hw_video_model=vga

Once the aforementioned steps are completed your new Debian8 image will be available in your OpenStack instance.

You can try Debian8, CentOS7, Ubuntu and Fedora – all running on Power8 – at Unicamp’s MiniCloud.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s