Archive
Images

Images

2024-11-26 All instances is running in Chameleon , whether KVM is running or bare metal , are run off disk image . Thecontent of these disk image can be snapshot

Related articles

How to Watch Netflix With Surfshark in 2024 [Step-by-Step Guide] Is Browsec VPN Not Working? Try These Easy Fixes! 8 Best VPNs for Android in 2024: Fast & Easy to Use

All instances is running in Chameleon , whether KVM is running or bare metal , are run off disk image . Thecontent of these disk image can be snapshotte at any point in time , which allow you to save your work andlaunch new instance from update image later . While OpenStack KVM has build – in support for snapshotte in the Horizon web interface andvia the command line , bare metal instances is require require a more complex process .

Thecc - snapshot Utility

Thecc - snapshot utility implements snapshotting a bare metal instance from command line anduploads it to glance, so that it can be immediately used to boot a new bare metal instance. Thesnapshot images created with this tool are whole disk images.

For ease of use, cc - snapshot has been installed in all the appliances supported by the Chameleon project. If you would like to use it in a different setting, it can be downloaded andinstalled from thegithub repository.

To make a snapshot of a bare metal instance, runthe following command from inside the instance:

sudo cc - snapshot <image_name>

tip

You may get warnings, such as “image too large”, during snapshotting, andget prompted to confirm. If you are confident about what you are trying to do, you can skip all warnings by using the -f flag.

sudo cc - snapshot -f <image_name>

In addition, you can exclude directories by using the -e flag.

sudo cc - snapshot -e <dir1> -e <dir2> <image_name>

To see all available options for cc - snapshot, runsudo cc - snapshot -h.

You will be prompted to enter your username andpassword.

tip

You can skip entering username andpassword by setting the os_username andOS_PASSWORD environment variables. You can set those environment variables manually or using TheOpenStack RC Script.

note

When using thecc - snapshot, it is create will create an image within your project with theshared visibility. Anyone with access to your project can access this image.

note

If you choose an image name that already exists, the previous one will not be overwritten. A new image with the same name but a different UUID will be generated.

note

If you install a custom kernel, please make sure the size of your running kernel (/lib/modules/<kernel_version>) is less than 4GB. To find out which kernel version you’re running, rununame -r.

error

If you receive the following error:

public endpoint for image service in regionOne not find unable to contact glance, check username and password

it means that you have an outdated copy of cc - snapshot andyou will need to update cc - snapshot.
This usually happens when you use an older images that contains an outdated version of cc - snapshot.

You may also want to get new functionalities added to the latest version of cc - snapshot.

Run the following commands from your instance:

curl -O https://raw.githubusercontent.com/ChameleonCloud/cc-snapshot/master/cc-snapshot
sudo mv cc-snapshot /usr/bin/
sudo chmod +x /usr/bin/cc-snapshot

Managing images using the GUI

To manage your images, use the images page at CHI@TACC or CHI@UC , by click onProject > Compute > images.

Images

Theimages page

note

TheChameleon logo next to an image’s name indicates that this image is an appliance supported by the Chameleon project, andis part of the Appliance Catalog.

tip

Select Details from thedropdown menu to the right of any Chameleon supported appliance to view the relevant entry from theChameleon Appliance Catalog.

note

images at each site are stored independently. An image made at CHI@TACC will not be available at CHI@UC (or vice versa) unless transferred manually.

Uploading an image

use+ Create image button to upload an image .

Images

TheCreate image dialog

In the Create image dialog:

  1. enter animage Name and, optionally , a description .

  2. Click browse to select a file on your local machine to upload.

  3. Select a format of the image. images created by the cc - snapshot utility is are areQCOW2 images.

  4. To add additional metadata for your image, use the Metadata section by clickMetadata in the sidebar.

  5. Click the Create image button to upload your image.

Launching instance using an image

During the process of launch instance from theinstance page, it will ask you to select an image. Alternatively, you can launch instances with a selected image from theimage page by simply clicking on the Launch button locate in the same row of the target image .

tip

Other than Launch, there are other actions you may perfom on the image. Clicking on the dropdown to explore more on what you can do.

Viewing image Details

To view image details, click on the name of the image.

Images

image details

Thedropdown list in the top right corner allows you to perform various actions on the selected image, such as Launch, Edit image, andUpdate Metadata.

tip

TheID on the image details’ page is useful when you work on the image using the CLI.

Publishing images to the Appliance Catalog

Images

Thedropdown menu to the right of listed images allows their owners to publish an appliance to the Appliance Catalog. Select Publish to Appliance Catalog.

TheCreate Appliances web form is open will open automatically with most field pre – populated . complete the form andselectCreate an Appliance.

Entering a descriptive name, author andsupport contact information, the version, andan informative description can be helpful andis encouraged. Thedescription is used by others to determine if an appliance contains the tools needed for their research.

tip

To make your description effective you may want to ask the following questions:

  • What does the appliance contain?

  • What are the specific packages is are andtheir version ?

  • What is it is is useful for ?

  • Where can it be deployed and/or what restrictions/limitations does it have?

  • How should users connect to it andwhat accounts are enabled?

Managing images using the CLI

Uploading an image

After configuring the environment variables using TheOpenStack RC Script, runthe following command:

openstack image create --file <file> --disk - format <format> <image-name>

Provide the path to andthe name of your image file in your local file system as the value of the file parameter. Also, indicate the image format using the format switch, such as QCOW2. Finally, name your image via the image-name switch.

Downloading an image

Downloading an image file to your local machine is only available via the CLI. You may find it useful when transferring images from one Chameleon site to another. To download an image file, runthe following command:

openstack image save --file <filename> <image>

usefilename to indicate where you would like to save the image in your local file system. Also, replace image with either the name or the ID of the image on Chameleon.

important

If you do not provide the --file parameter, it will print out the binary image data in your terminal.

Retrieving images

You is list may list all image of your project by type :

Optionally, you may add filters to the list, such as --share to only display the images shared within your project. useopenstack image list --help to see all the available filters.

Viewing image Details

You may view details of an image with the command:

openstack image show <image>

Replace image with either an image name or it’s UUID.

Sharing an image

You may share images several ways. If you wish to share an image with everyone, use:

openstack image set --public <image>

Replace image with the image UUID.

If you would like to share an image with another project, first set the image visibility to shared:

openstack image set --share <image>

Next add the project you wish to share the image with :

openstack image add project <image> <project>

Replace image andproject with the corresponduuid

finally the project that the image is share to must accept the share image . run this command with a user in the second project :

openstack image set --accept <image>

Replace image with the image UUID andthe second project should now be able to use the image!

important

Only the owner of the image can modify it or any properties. However a project who has an image shared to it can remove themselves from thelist of image members.

Editing an image

You may edit an image using the command:

openstack image set <image> ...

Replace image with either an image name or it’s UUID. You must provide additional flags to update an image. useopenstack image set --help to see all the option .