Create Image-5 minutes a day to play with OpenStack (21)

Source: Internet
Author: User

This section shows how to create an Image from the Web GUI and CLI two methods.

OpenStack provides end users with a Web UI (Horizon) and a command-line CLI two switching interfaces.
We both have to use it in two ways.

Maybe some students think that since there is a more friendly Web UI, why use the CLI? Here Cloudman gives the following reasons:

    1. The functionality of the Web UI does not have a full CLI, and some operations only provide the CLI. Even though all features are available, the CLI can use more parameters

    2. In general, the CLI returns results faster and operates more efficiently.

    3. CLI can be placed in a script for batch processing

    4. Some time-consuming operation of the CLI is more appropriate, such as creating a mirror (which will be covered later)

Web UI creation Image
  1. After admin login, Project--Compute-Images

  2. Click the top right button to name the new image.

    Here we upload an image. Click to select the image file Cirros-0.3.4-x86_64-disk.img. Cirros is a very small Linux image and is ideal for testing purposes. Everyone can download to http://download.cirros-cloud.net/.

  3. Format Selection QCOW2.

    If checked, the image can be used by other Project if checked, the image is not allowed to be deleted.

  4. Click, upload the file to OpenStack and create a new image

  5. Click the image link to display more information

CLI Create Image

Cirros This Linux image is very small and uploads quickly through the Web UI, and the operation will be smooth. But if we want to upload a larger image (such as several G), then the operation of the long time to stay in the uploaded Web interface, we do not know what is currently in the state. For such operations, the CLI is a better choice.

    1. upload the image to the file system of the control node, for example/tmp/ Cirros-0.3.4-x86_64-disk.img



    2. devstack installation directory. Source This file allows you to configure environment variables for the CLI. Here we pass two parameters, the first parameter is OpenStack username admin, the second parameter is Project name admin

    3. Execute image creation command

Glance image-create--name cirros--file/tmp/cirros-0.3.4-x86_64-disk.img--disk-format qcow2--container-format Bare- -progress

Is it more intuitive than the Web UI that we use--progress to show the percent% of file uploads in the CLI parameter that created the image?

View the new Image under/opt/stack/data/glance/images/


In the next section we show you how to delete an image.

Create Image-5 minutes a day to play with OpenStack (21)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.