8.4. Support for ISO images
Procedure 8.1. To load an ISO image to an Image service data store
- In the Image service, run the following command:
$glance image-create --os-image-api-version 1 --name "rhel-server-7.0.iso"--copy-from https://access.redhat.com/downloads/content/69/ver=/rhel---7/7.0/x86_64/product-downloads/rhel-server-7.0-x86_64-dvd.iso --is-public True --container-format bare --disk-format isoIn this command,rhel-server-7.0.isois the name for the ISO image after it is loaded to the Image service, and rhel-server-7.0-x86_64-dvd.iso is the name of the source ISO image.NoteThe --copy-from option has been deprecated for glance v2 for the Red Hat OpenStack Platform 8 release and will be deprecated for v1 as well in the future releases of Red Hat OpenStack Platform. - Optionally, to confirm the upload in Image service (glance), run this command:
$glance image-list
Procedure 8.2. To boot an instance from an ISO image
- Boot instance with ISO image using the following command:
$nova boot--image rhel-server-7.0-x86_64-dvd.iso--block-device source=blank,dest=volume,size=10,shutdown=preserve--nic net-id=NETWORK_UUID --flavor 3 INSTANCE_NAMEIn this command,rhel-server-7.0.isois the ISO image, and INSTANCE_NAME is the name of the new instance. NETWORK_UUID is a valid network id in your systemYou will need Block Storage service and setting the parametershutdown=preservewill preserve the volume even after the shutting down an 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 complete and system reboots, the instance prompts you to install the operating system, which implies your instance is not usable.
Procedure 8.3. To make an instance that was booted from an ISO image 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=preservewas set, run the following command:$cinder listYou 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 thefalsebootable property. - Upload the volume to glance:
$cinder upload-to-image VOLUME_UUID IMAGE_NAMEThe 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.
