NEW! Mirantis Academy -   Learn confidently with expert guidance and On-demand content.   Learn More

< BLOG HOME

How to install an operating system from the installation media in OpenStack environment?

Jim Phillips - December 07, 2014

We often receive questions about creating a new instance from its own installation media in OpenStack environment. We decided to create simple instructions which will show you step by step through the installation of a new instance in OpenStack environment from ISO file. The point is that the ISO is copied to the new volume, from which the system is installed.


Quick guide:

1. Register installation ISO as a new image.

2. Create a new volume from the ISO image.

3. Create a new clean volume for the future boot disk.

4. Start a new instance as the boot from volume from step 2.

5. Connect the clean volume from the step 3 to instance.

6. Install the system on the clean volume.

7. Term the instance and create a new one as the boot from volume of installed system.

8. The possibility to take a snapshot of a clean system and then run instance as the boot from volume snapshot.


1. REGISTRATION OF THE INSTALLATION ISO FILE:

For the test of the functionality we chose ISO CentOS 6.5 64b, it can be loaded into OpenStack right from a local disk or by URL to the file. We recommend the second option.  

create an image landing page of ISO loading into OpenStack

Storage - Images - Create Image

 

 2. CREATE A NEW VOLUME FROM THE ISO IMAGE:

We choose: Volume Source – “Image”

Use image as a source – our uploaded ISO from step 1.

create volume landing page of ISO loading into OpenStack

Storage – Images – Create Volume

 

 3. CREATE A NEW CLEAN VOLUME FOR FUTURE BOOT DISK:

We choose: Volume Source – “No source, empty volume”

create volume landing page for future boot disk

Storage – Images – Create Volume

 

 4. START A NEW INSTANCE AS BOOT FROM VOLUME FROM STEP 2:

We choose: Instance Boot Source – “Boot from volume”

Volume – disk created from ISO file from step 2.

launch instance landing page derived from boot disk volume

Compute - Instances - Launch Instance

welcome to CentOS 6.5 landing page

Screen from installing CentOS 6.5


After starting the instance, automatically starts classic welcome offer from the installation media.  Before starting the installation, it´s necessary to connect an empty volume created in step 3. See following.

  

5. CONNECT THE CLEAN VOLUME FROM STEP 3 TO THE INSTANCE:

manage volume attachments landing page

Storage – Volumes – More – Edit Attachments


Attached to CentOS 6.5 on/dev/vdb.

OpenStack dashboard indicate the successful connection and path to the disk.

 

6. INSTALL THE SYSTEM ON THE CLEAN VOLUME.

selecting a disk to install on target devices screenshot

Selecting a disk

screenshot of CentOS 6 installation progress bar

Installation progress

 

7. TERM THE INSTANCE AND CREATE A NEW ONW AS THE BOOT FROM VOLUME OF INSTALLED SYSTEM:

After the end of installation, it´s possible to term instance and run the other one from created volume.


confirm terminate instances window

Compute – Instances – More – Terminate Instance


Create a new instance as a boot from volume of the installed system with selection of volume, on which we installed the system.

launch instance review window

Compute – Instances – Launch Instance


After the start of instance it´s possible to connect into the console of the new installed system from the original ISO disk.

screenshot of lines of code from CentOS 6.5 release

Connection of console

 

8. SNAPSHOT FROM THE CLEAN SYSTEM:

create volume snapshot window

Storage – Volumes (selection of system disk) – More – Create Snapshot

 

Start of instance from created snapshot:

We choose: Instance Boot Source – Boot from volume snapshot

             Volume Snapshot – choose the snapshot created by us

launch instance review window

After the running instance, it´s created completely new volume with the same size as the original, from which the snapshot was created.

 

Vlastimil Mikes

Tcp cloud engineer


Choose your cloud native journey.

Whatever your role, we’re here to help with open source tools and world-class support.

GET STARTED
NEWSLETTER

Subscribe to our bi-weekly newsletter for exclusive interviews, expert commentary, and thought leadership on topics shaping the cloud native world.

JOIN NOW