If you haven’t tried it already, get a free on-demand trial for Mirantis OpenStack Express, now available.There are several ways to create your own image. The OpenStack documentation describes a method for creating a new image on Linux machines using libvirt, or you can use VirtualBox to create a new image using VirtualBox on any of the operating systems VirtualBox supports (which is to say, most of them).
Here’s the general procedure for creating an OpenStack image:
- Download VirtualBox from https://www.virtualbox.org/ and install it.
- Download the installation ISO for the linux distribution that you want to create.
- Create a new virtual machine. For the hard drive file type, select QCOW. This is a format that is recognized by both VirtualBox and OpenStack.
- After you click Create, VirtualBox will create the VM and be back at the Oracle VirtualBox Manager screen. Select your VM and click Settings, change to the Storage tab, select the Empty CD ROM under the IDE controller and click the disk icon on the right of CD/DVD Drive to navigate and choose the CentOS Image you downloaded. Click OK.
- Boot your VM and go through the installation process.
- Click Reboot and when the VM comes back up, login with the root credentials you provided during the installation.
- Make sure the network is up and connected to the internet. (You might have to change the network settings for the VM.)
- Patch the operating system.
- At this point, it’s a good practice to shut down your Virtual Machine, clone it and then work on the clone, this way if you mess anything up, you don’t have to go through the entire re-install process all over again. Shut down the VM and click Machine -> Clone… from the menu. Choose to create a Full clone.
- Start the clone from the Oracle VM VirtualBox Manager and log in with the same root credentials you used previously. Edit the interface file to ensure the network interface always starts on boot.
- Add the cloud-init package to the OS.
- Configure GRUB so the console access works from within OpenStack.
- Shut down the VM.
- At this point the drive containing your VM is a QCOW file that is ready for OpenStack. To find, it, look at the Storage tab under Settings for the VM.
Want to read more? This article is an excerpt from our new guide, Mirantis OpenStack Express: Application On-boarding Guide (currently in beta). Please let us know what you think.