//Module included in the following assemblies:
//
// * installing/installing_openstack/installing-openstack-installer-restricted.adoc
// * installing/installing_vsphere/installing-restricted-networks-installer-provisioned-vsphere.adoc

ifeval::["{context}" == "installing-openstack-installer-restricted"]
:osp:
endif::[]
ifeval::["{context}" == "installing-restricted-networks-installer-provisioned-vsphere"]
:vsphere:
endif::[]

:_mod-docs-content-type: PROCEDURE
[id="installation-creating-image-restricted_{context}"]
= Creating the {op-system} image for restricted network installations

[role="_abstract"]
Download the {op-system-first} image to install {product-title} on a restricted network
ifdef::osp[{rh-openstack-first}]
ifdef::vsphere[VMware vSphere]
environment.

.Prerequisites

* Obtain the {product-title} installation program. For a restricted network installation, the program is on your mirror registry host.

.Procedure

. Log in to the Red Hat Customer Portal's https://access.redhat.com/downloads/content/290[Product Downloads page].

. Under *Version*, select the most recent release of {product-title} {product-version} for RHEL 8.
+
[IMPORTANT]
====
The {op-system} images might not change with every release of {product-title}. You must download images with the highest version that is less than or equal to the {product-title} version that you install. Use the image versions that match your {product-title} version if they are available.
====

ifdef::osp[]
. Download the *{op-system-first} - OpenStack Image (QCOW)* image.
endif::osp[]
ifdef::vsphere[]
. Download the *{op-system-first} - vSphere* image.
endif::vsphere[]

ifdef::osp[]
. Decompress the image.
+
[NOTE]
====
You must decompress the image before the cluster can use it. The name of the downloaded file might not contain a compression extension, like `.gz` or `.tgz`. To find out if or how the file is compressed, in a command line, enter:

[source,terminal]
----
$ file <name_of_downloaded_file>
----
====

. Upload the image that you decompressed to a location that is accessible from the bastion server, like Glance. For example:
+
----
$ openstack image create --file rhcos-44.81.202003110027-0-openstack.x86_64.qcow2 --disk-format qcow2 rhcos-${RHCOS_VERSION}
----
+
[IMPORTANT]
====
Depending on your {rh-openstack} environment, you might be able to upload the image in either link:https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/15/html/instances_and_images_guide/index[`.raw` or `.qcow2` formats]. If you use Ceph, you must use the `.raw` format.
====
+
[WARNING]
====
If the installation program finds multiple images with the same name, it chooses one of them at random. To avoid this behavior, create unique names for resources in {rh-openstack}.
====
+
The image is now available for a restricted installation. Note the image name or location for use in {product-title} deployment.

endif::osp[]
ifdef::vsphere[]
. Upload the image you downloaded to a location that is accessible from the bastion server.
endif::vsphere[]

ifeval::["{context}" == "installing-openstack-installer-restricted"]
:!osp:
endif::[]
ifeval::["{context}" == "installing-restricted-networks-installer-provisioned-vsphere"]
:!vsphere:
endif::[]
