From ce5be65a5ce6b2a32349f997d8690de25f8f91bf Mon Sep 17 00:00:00 2001 From: Kevin_Zheng Date: Tue, 2 Jun 2015 08:43:21 +0800 Subject: [PATCH] Move description of how to boot instance with ISO to user-guide The description of how to boot instance with ISO should be in user-guide instead of config-ref (doc/config-reference/image-service/section_image-service-ISO-support.xml). Related to https://review.openstack.org/#/c/177691/. Change-Id: I2ac2098474851cdbad5ef07ed6f78af12dafd243 Closes-Bug:#1450419 --- .../section_image-service-ISO-support.xml | 67 ---------- .../source/cli_launch_instances.rst | 1 + ...i_nova_launch_instance_using_ISO_image.rst | 117 ++++++++++++++++++ 3 files changed, 118 insertions(+), 67 deletions(-) create mode 100644 doc/user-guide/source/cli_nova_launch_instance_using_ISO_image.rst diff --git a/doc/config-reference/image-service/section_image-service-ISO-support.xml b/doc/config-reference/image-service/section_image-service-ISO-support.xml index d01180046b..cda64e612c 100644 --- a/doc/config-reference/image-service/section_image-service-ISO-support.xml +++ b/doc/config-reference/image-service/section_image-service-ISO-support.xml @@ -27,71 +27,4 @@ $ glance image-list - - To boot an instance from an ISO image - OpenStack supports booting instances using ISO images, - but in order to make the instances created using ISO images - functional, follow a few more steps: - - Boot instance with ISO image using the following command: - $ nova boot \ - --image ubuntu-14.04.2-server-amd64.iso \ - --block-device source=blank,dest=volume,size=10,shutdown=preserve \ - --nic net-id=NETWORK_UUID - --flavor 3 INSTANCE_NAME - In this command, ubuntu-14.04.2-server-amd64.iso is - the ISO image, and INSTANCE_NAME is - the name of the new instance. - NETWORK_UUID is a valid network - id in your system - You need Block Storage service and the parameter - shutdown=preserve is also mandatory, thus - the volume will be preserved after the shutdown of the instance. - - - After the instance is successfully launched, - connect to the instance using remote console and follow the - instructions to install the system as using ISO images on - regular computers. When the installation is finished and - system rebooted, the instance asks you again to you to - install the operating system, which means your instance - is not usable. If you have problems with image creating - please check the - Virtual Machine Image Guide for reference. - - - - To make the instances booted from ISO image functional - Now you have to do the following actions to make your - instances created using ISO actually functional: - - Delete the instance you just created: - $ nova delete INSTANCE_NAME - - - After you delete an instance, the system you just - installed using your ISO image remains because the parameter - shutdown=preserve - was set, run the following command: - $ cinder list - You get a list with all the volumes - in your system. In this list, you can find the volume - that is attached to your ISO created instance, with the - false bootable property. - - - Upload the volume to glance: - $ cinder upload-to-image VOLUME_UUID IMAGE_NAME - The VOLUME_UUID is the uuid - of the volume that is attached to your ISO created instance, - and the IMAGE_NAME is the - name that you give to your new image. - - - After the image is successfully uploaded, you - can now use the new image to boot instances, the - instance launched using this image will contain the - system you just installed using the ISO image. - - diff --git a/doc/user-guide/source/cli_launch_instances.rst b/doc/user-guide/source/cli_launch_instances.rst index 88270ac8ce..b831e70287 100644 --- a/doc/user-guide/source/cli_launch_instances.rst +++ b/doc/user-guide/source/cli_launch_instances.rst @@ -6,6 +6,7 @@ Launch instances :maxdepth: 2 cli_nova_launch_instance_from_volume.rst + cli_nova_launch_instance_using_ISO_image.rst Instances are virtual machines that run inside the cloud. diff --git a/doc/user-guide/source/cli_nova_launch_instance_using_ISO_image.rst b/doc/user-guide/source/cli_nova_launch_instance_using_ISO_image.rst new file mode 100644 index 0000000000..06a8a20a2e --- /dev/null +++ b/doc/user-guide/source/cli_nova_launch_instance_using_ISO_image.rst @@ -0,0 +1,117 @@ +================================== +Launch an instance using ISO image +================================== + +.. _Boot_instance_from_ISO_image: + +Boot an instance from an ISO image +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +OpenStack supports booting instances using ISO images. But before you +make such instances functional, use the nova :command:`boot` command +with the following parameters to boot an instance:: + + $ nova boot \ + --image ubuntu-14.04.2-server-amd64.iso \ + --block-device source=blank,dest=volume,size=10,shutdown=preserve \ + --nic net-id = NETWORK_UUID + --flavor 2 INSTANCE_NAME + +--------------------------------------+--------------------------------------------+ + | Property | Value | + +--------------------------------------+--------------------------------------------+ + | OS-DCF:diskConfig | MANUAL | + | OS-EXT-AZ:availability_zone | nova | + | OS-EXT-SRV-ATTR:host | - | + | OS-EXT-SRV-ATTR:hypervisor_hostname | - | + | OS-EXT-SRV-ATTR:instance_name | instance-00000004 | + | OS-EXT-STS:power_state | 0 | + | OS-EXT-STS:task_state | scheduling | + | OS-EXT-STS:vm_state | building | + | OS-SRV-USG:launched_at | - | + | OS-SRV-USG:terminated_at | - | + | accessIPv4 | | + | accessIPv6 | | + | adminPass | ZaiYeC8iucgU | + | config_drive | | + | created | 2015-06-01T16:34:50Z | + | flavor | m1.small (2) | + | hostId | | + | id | 1e1797f3-1662-49ff-ae8c-a77e82ee1571 | + | image | ubuntu-14.04.2-server-amd64.iso | + | key_name | - | + | metadata | {} | + | name | INSTANCE_NAME | + | os-extended-volumes:volumes_attached | [] | + | progress | 0 | + | security_groups | default | + | status | BUILD | + | tenant_id | ccef9e62b1e645df98728fb2b3076f27 | + | updated | 2014-05-09T16:34:51Z | + | user_id | fef060ae7bfd4024b3edb97dff59017a | + +--------------------------------------+--------------------------------------------+ + +In this command, ``ubuntu-14.04.2-server-amd64.iso`` is the ISO image, +and ``INSTANCE_NAME`` is the name of the new instance. ``NETWORK_UUID`` +is a valid network id in your system. + +.. note:: + + You need the Block Storage service, and the parameter + ``shutdown=preserve`` is also mandatory, thus the volume will be + preserved after the shutdown of the instance. + +After the instance is successfully launched, connect to the instance +using a remote console and follow the instructions to install the +system as using ISO images on regular computers. When the installation +is finished and system is rebooted, the instance asks you again to +install the operating system, which means your instance is not usable. +If you have problems with image creation, please check the +`Virtual Machine Image Guide `_ +for reference. + +.. _Make_instance_booted_from_ISO_image_functional: + +Make the instances booted from ISO image functional +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Now complete the following steps to make your instances created +using ISO image actually functional. + +#. Delete the instance using the following command:: + + $ nova delete INSTANCE_NAME + +#. After you delete the instance, the system you have just installed + using your ISO image remains, because the parameter + ``shutdown=preserve`` was set, so run the following command:: + + $ cinder list + +-----------------+-----------+--------------+------+-------------+----------+-------------+ + | ID | Status | Name | Size | Volume Type | Bootable | Attached to | + +-----------------+-----------+--------------+------+-------------+----------+-------------+ + | d620d971-b16... | available | 655ef3e4-... | 8 | None | false | | + +-----------------+-----------+--------------+------+-------------+----------+-------------+ + + You get a list with all the volumes in your system. In this list, + you can find the volume that is attached to your ISO created + instance, with the false bootable property. + +#. Upload the volume to glance:: + + $ cinder upload-to-image VOLUME_UUID IMAGE_NAME + $ glance image-list + +-------------------+------------+-------------+------------------+------------+--------+ + | ID | Name | Disk Format | Container Format | Size | Status | + +-------------------+------------+-------------+------------------+------------+--------+ + | 74303284-f802-... | IMAGE_NAME | iso | bare | 764321792 | active | + +-------------------+------------+-------------+------------------+------------+--------+ + + The ``VOLUME_UUID`` is the uuid of the volume that is attached to + your ISO created instance, and the ``IMAGE_NAME`` is the name that + you give to your new image. + +#. After the image is successfully uploaded, you can use the new + image to boot instances. + + The instances launched using this image contain the system that + you have just installed using the ISO image.