On this page, you can find an explanation of how to find list of default Images in the Cloud Console and how to create and delete custom Images.
To get to the Images page, select the Storage from the VIRTUAL DATACENTER block in the side-bar menu and click the Images TAB:
On this page you can find all default and custom Images:
The Cloud Console functionality allows to upload custom Images to the system, which will be available for all resources in the current Project.
In this article we will assume, that we have already created the following resources, that refer to the Project named Test-Project, that was created in the Organization named Test-Organization:
For more information about creating and configuring these resources, see the following articles:
To get the list of all available Images in the current Project, follow the next steps:
Login to your Ubuntu Virtual Machine, from which you are going to create custom Image;
for this we use SSH protocol - to find additional information about, it see the article: Access Linux VMssh -i ~/.ssh/id_rsa ubuntu@185.226.43.42
Update Ubuntu package sources by running the following command:sudo apt update
Install Kubernetes Python Client by running the next command:sudo apt install python3-pip
Install openstack cli tool by running two next commands one by one: sudo pip3 install python-openstackclient
sudo pip3 install python-magnumclient
In this example we are using python-openstackclient 5.4.0 version.
Check your current version and, if necessary, install the required:openstack --version
;pip3 uninstall openstacksdk
;pip3 install python-openstackclient==5.4.0
.
vi openrc
#!/usr/bin/env bash
export OS_AUTH_URL=https://upper-austria.ventuscloud.eu:443/v3
export OS_PROJECT_ID=e6370ed9ff7c4122b2b89cde7ff7d29f
export OS_PROJECT_NAME="e6370ed9ff7c4122b2b89cde7ff7d29f"
export OS_USER_DOMAIN_NAME="ventus"
if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi
export OS_PROJECT_DOMAIN_ID="e1780e7170674d5684076a726f683cfd"
if [ -z "$OS_PROJECT_DOMAIN_ID" ]; then unset OS_PROJECT_DOMAIN_ID; fi
unset OS_TENANT_ID
unset OS_TENANT_NAME
export OS_USERNAME="48529f99-8e10-4694-9412-70e1012de805:test-conn"
echo "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: "
read -sr OS_PASSWORD_INPUT
export OS_PASSWORD=$OS_PASSWORD_INPUT
export OS_REGION_NAME="Upper-Austria"
if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi
export OS_INTERFACE=public
export OS_IDENTITY_API_VERSION=3
Execute openrc starting with dot:. openrc
Provide the password of the created CLI User and hit Enter - this password will be used to authenticate you in the Cloud Console.
Run the next command to get a list of all available Images:openstack image list
In our case the output will be next:
Also, all this Images you can find on the Images page in the Cloud Console and use one of them during VM creation:
To create/upload a custom Image, follow the next steps:
Prepare your own Image that you want to upload to the Cloud Console.
In our case, we use just one of the Ubuntu images, but you can upload your own unique Image that should be located locally:
wget https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
Upload your own unique Image, which is already located locally - for this, use the following command:
openstack image create \
--disk-format=qcow2 \
--container-format=bare \
--file=focal-server-cloudimg-amd64.img \
--property os_distro='ubuntu' \
--property os_platform='linux' \
test-custom-image
To find more required arguments use the next command:openstack image create --help
Make sure you correctly specified os_platform property.
Supported values: linux or windows.
Without it, you won’t see your Image in the Web Console interface.
openstack image list
command;Also, you can find this new Image on the Images page in the Cloud Console and use it during VM creation:
To delete an image, use the next command:openstack image delete <IMAGE-ID>
If the image, that you want to delete is protected, the first step for deleting is to unprotect it, for this use the next command:openstack image set --unprotected <IMAGE-ID>
The Cloud Console functionality allows to upload custom Images to the system, which will be available for all resources in the current Project.
To find full workflow, of creating a custom Image from Snapshot, please see the article - Create Image from Snapshot.