# How do you upload a custom image to Glance in OpenStack?

This document provides step-by-step instructions for uploading an image to Glance. It includes setting up an Ubuntu server to access the OpenStack CLI, creating a new user, downloading the RC file, and uploading the image.&#x20;

Follow the below steps to upload a custom image to Glance:

**Step 1: Create a New User**

a. Log in to the [Customer portal](http://customer.acecloudhosting.com/).

<figure><img src="https://1009372284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb8S2Neg3MIgbtimiFxax%2Fuploads%2F2QpYPlltpyy3sRcCWnWV%2Fimage.png?alt=media&#x26;token=3bb918c3-1221-43b6-9103-afc49b600801" alt=""><figcaption></figcaption></figure>

b. Navigate to **Services** and then click on **My Services.**

<figure><img src="https://1009372284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb8S2Neg3MIgbtimiFxax%2Fuploads%2FsPaXA2PotLy4yZkdcDLa%2Fimage.png?alt=media&#x26;token=0ac3bae3-82d2-4751-8e9a-d971f1e029d3" alt=""><figcaption></figcaption></figure>

c. Click on your project.

<figure><img src="https://1009372284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb8S2Neg3MIgbtimiFxax%2Fuploads%2FgksO3wNy2SBXtBRfulDf%2Fimage.png?alt=media&#x26;token=4544c8c5-c477-4d35-94f1-78dd30b0ebb2" alt=""><figcaption></figcaption></figure>

d. Click on **Utilities,** then on **User**.

<figure><img src="https://1009372284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb8S2Neg3MIgbtimiFxax%2Fuploads%2Ffs1rmZzty1wcyeJBxkOI%2Fimage.png?alt=media&#x26;token=8ecea734-2c83-4386-8b86-fde4cf0c5a66" alt=""><figcaption></figcaption></figure>

e. Click on **Create User**.

<figure><img src="https://1009372284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb8S2Neg3MIgbtimiFxax%2Fuploads%2FBjaZ5796BfawWCrpIoqj%2Fimage.png?alt=media&#x26;token=b281a35d-e3ae-46a4-a767-9ce9977cca70" alt=""><figcaption></figcaption></figure>

f. Enter the **Username** and **Description** for the user and click on **Create User**.

<figure><img src="https://1009372284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb8S2Neg3MIgbtimiFxax%2Fuploads%2FXk9BRAjPoN4TtvnNYZwW%2Fimage.png?alt=media&#x26;token=e2d431cd-7832-4c74-8733-76cc6b9cf01b" alt=""><figcaption></figcaption></figure>

g. Click on **Download** to save the user credential.

<figure><img src="https://1009372284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb8S2Neg3MIgbtimiFxax%2Fuploads%2Frl95TqZUiyagJCn2OcGq%2Fimage.png?alt=media&#x26;token=88e4c6fe-4d03-4214-942a-57d6b8fb7fd2" alt=""><figcaption></figcaption></figure>

**Step 2:** **Download RC File**

To learn how to download a RC file, follow the below steps:

a. Login to the [horizon portal ](https://console.openstack.acecloudhosting.com/auth/login/?next=/identity/users/)with the credential created above.

<figure><img src="https://1009372284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb8S2Neg3MIgbtimiFxax%2Fuploads%2FdT3sMfEeh3yb47WRd8Hv%2Fimage.png?alt=media&#x26;token=f7ad4a4f-a908-4f4e-a961-51c239abf19e" alt=""><figcaption></figcaption></figure>

b. Click on the region on top-left corner and select the region in which you want to upload your image.

<figure><img src="https://1009372284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb8S2Neg3MIgbtimiFxax%2Fuploads%2F4UEMA5lddW4bHB58CZIJ%2Fimage.png?alt=media&#x26;token=e72b3475-647e-4284-85ec-dbec3169a3ed" alt=""><figcaption></figcaption></figure>

c. Click on the user icon in the top-right corner.

<figure><img src="https://1009372284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb8S2Neg3MIgbtimiFxax%2Fuploads%2F6ELq1KUYOMmmQq0Ja4tM%2Fimage.png?alt=media&#x26;token=a2aadfe1-79ab-4f77-ba25-b0f272edd76e" alt=""><figcaption></figcaption></figure>

d. Click on **OpenStack RC File** to download the RC file.

<figure><img src="https://1009372284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb8S2Neg3MIgbtimiFxax%2Fuploads%2FNTLfCoLuFBdgSs7Err7b%2Fimage.png?alt=media&#x26;token=87f037cd-386f-46ba-9656-d5e0181141b6" alt=""><figcaption></figcaption></figure>

**Step 3: Set Up Ubuntu Server to Access OpenStack CLI**

a. Run the below command to install the OpenStack CLI on your Ubuntu server:

```
sudo apt update && apt install python3-openstackclient -y
```

<figure><img src="https://1009372284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb8S2Neg3MIgbtimiFxax%2Fuploads%2FRKA16Xg54Unbjn4zJo5s%2Fimage.png?alt=media&#x26;token=07e28f27-c469-4e83-ae4b-907afb64cf4e" alt=""><figcaption></figcaption></figure>

b. Upload the downloaded RC file to your server and source it to use the OpenStack CLI environment:

```
source /path/to/your/openstack.rc
```

**Note:** Enter the path location in place of \</path/to/your/openstack.rc>

c. Enter your Password.&#x20;

You can now use the OpenStack CLI on your Ubuntu server to interact with your OpenStack environment.

**Step 4: Upload Your Image:**

a. Copy the image to the Ubuntu server using SCP/SFTP/Mobaxterm.

b. Use the below command to upload the image in your desired format (iso, vmdk, raw etc.)

```
openstack image create --disk-format iso --container-format bare --private --file /path/to/your/iso "image-name-you-want"
```

**Step 5: Verify Image Upload:**

Navigate to **Storage** and click on **Images**, here you can view the uploaded image.

<figure><img src="https://1009372284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb8S2Neg3MIgbtimiFxax%2Fuploads%2FmNyNTaNVNagfvT17xJLb%2Fimage.png?alt=media&#x26;token=7677573b-88a4-4e32-801d-34e911145fc3" alt=""><figcaption></figcaption></figure>
