Upload ISO images

Introduction to OpenStack Image Import

With Interactive Cloud OS, a tiny Linux operating system named Cirros is included from the beginning. This operating system is for testing purposes and first steps on the OpenStack system.

As OpenStack was designed and invented by NASA, they had a concept of preparing the images for the individual project groups. So an administrator would do all the preparation work and insert all needed operating systems to an image store which is called “GLANCE” in OpenStack terminology.

So, there was no big need for fancy uploads or self-provisioned of operating system uploads, since the administrators would take care for that and make it nice and easy for the project group ;-). But of course, You can easily upload your desired operating systems as you want.

Normally, administrators want to import their favorite operating system, e.g.

  • Microsoft Windows
  • Debian Linux
  • Red Hat Linux / Red Hat Enterprise Linux (RHEL)
  • Novell SuSE Enterprise Server (SLES)
  • Open SuSE
  • Ubuntu Linux
  • Open Solaris
  • Open BSD
  • [‚Ķ]

In order to upload and import an image, there are several possibilities:

  • Hint1: Use the OpenStack Dashboard to import the files. Remark: This works for small images, but has a limit of about 1 GB maximum image file size on a Gigabit Ethernet Interface due to timeout limitations of the web server. So this won’t work with big images, especially not with Windows images, unless you have got a fast 10 Gigabit connection ūüėČ
    But in fact, this is the easiest way: Upload your image with your browser: Create a new image and choose the Upload feature. You can select a image from your local PC’s hard disk or use a link to an image in the internet.
  • Hint 2: Copy the image to a USB Stick or USB HDD and copy it to the server. (not covered yet)
  • Hint3: Upload the image to the server via SCP (Secure Copy Protocol). (covered below)

Upload the ISO Image to the Server

To upload the ISO file, choose a tool for Secure Copy (SCP).

  • Windows: (WinSCP)
  • Windows with CLI (Putty PSCP)
  • Linux: scp (Secure Copy Protocol)

Copy the ISO file to the server, e.g. to /srv/iso (directory can be created with WinSCP or you can create the directory from the console with the command “mkdir”).

After successful upload of the ISO file

After successful upload, connect to the host system via SSH client (e.g. putty) or use the server’s keyboard and monitor directly. Login as root with the password you entered at installation. If you chose the basic installation method, the username is “root” and the password “cloudos”.

Configure your environment

After successful login, enter:

. /root/.openstack.rc

(without the quotes but the whole string) at the console and press return.
Don‚Äôt forget the dot “.” at the beginning, followed by a space.

 Import your image into GLANCE

Remark: Glance is OpenStack’s image store. All instances can only be created from images located in this image store.

To import your image into the glance image store, enter at the console:

glance image-create --name  "NAME OF THE WINDOWS VERSION, e.g. Win7" --is-public true --disk-format iso --container-format bare --file <YOUR ISO FILE>

So, as example, if you want to import Windows 7, you may use the following command, if your file is located in “/srv/iso/” and is named “windows7.iso”

glance image-create --name  "Windows_7_64bit-eng.iso" --is-public true --disk-format iso --container-format bare --file /srv/iso/windows7.iso

If you have done the import, you will receive some output like:

+------------------+------------------------------------------------------+
| Property         | Value                                                |
+------------------+------------------------------------------------------+
| checksum         | c5763519cc47216b6a1764c8f298e92a                     |
| container_format | bare                                                 |
| created_at       | 2014-05-30T11:19:37                                  |
| deleted          | False                                                |
| deleted_at       | None                                                 |
| disk_format      | iso                                                  |
| id               | ff2d1adb-a075-4c39-a203-a959d2417d16                 |
| is_public        | True                                                 |
| min_disk         | 0                                                    |
| min_ram          | 0                                                    |
| name             | Windows7_64bit_eng.iso                               |
| owner            | 216a92a4b03c404ea1484b30ae670d5a                     |
| protected        | False                                                |
| size             | 2433155072                                           |
| status           | active                                               |
| updated_at       | 2014-10-22T11:19:52                                  |
| virtual_size     | None                                                 |
+------------------+------------------------------------------------------+


 

Since the import succeeded, you are ready to go. This will be sufficient for most operating systems. For Windows, we need to adjust the Network Interface Card (NIC) type and the hard disk (HDD) type, since windows does not recognize the standard device drivers.

To fix these NIC or HDD issues, enter the following two commands in order to change the properties (enter your filename for <image-name>, though):

glance image-update --property='hw_disk_bus=ide' <image-name>
glance image-update --property="hw_vif_model=e1000" <image-name>

Now, the image will look like this (changes are displayed in bold letters):

+-------------------------+------------------------------------------+
| Property                | Value                                    |
+-------------------------+------------------------------------------+
| Property 'hw_disk_bus'  | ide                                      |
| Property 'hw_vif_model' | e1000                                    |
| checksum                | c5763519cc47216b6a1764c8f298e92a         |
| container_format        | bare                                     |
| created_at              | 2014-05-30T11:19:37                      |
| deleted                 | False                                    |
| deleted_at              | None                                     |
| disk_format             | iso                                      |
| id                      | ff2d1adb-a075-4c39-a203-a959d2417d16     |
| is_public               | True                                     |
| min_disk                | 0                                        |
| min_ram                 | 0                                        |
| name                    | Windows7_64bit_eng.iso                   |
| owner                   | 216a92a4b03c404ea1484b30ae670d5a         |
| protected               | False                                    |
| size                    | 2433155072                               |
| status                  | active                                   |
| updated_at              | 2014-06-06T06:30:27                      |
| virtual_size            | None                                     |
+-------------------------+------------------------------------------+
 

 

Now you are ready to use this new ISO image to create your desired operating system instance. This topic is covered in the section “Create your virtual machine” (more).

Please recommended us:

Leave a Reply

Your email address will not be published. Required fields are marked *