In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to use the Openstack mirroring service glance, which has a certain reference value. Interested friends can refer to it. I hope you will learn a lot after reading this article. Let's take a look at it.
Glance can do more than just add images to the cluster from the command line. Here are some examples of use.
1. Add the mirror to the glance.
Glance image-create-name test-min-disk 1-min-ram 768-file\ centos-6.5-20140117.0.x86_64.qcow2-is-public True-property net_model=e1000-property\ disk_bus=ide-disk-format=qcow2-container-format ovf-progress
This example uses the following parameters:
-- ID of id image
-- name of the name image
-- upload the image stored in store to
-- disk-format
The format of the image. Acceptable formats include: ami,ari, aki, vhd, vmdk, raw, qcow2, vdi, and iso.
-- container-format
The format of the mirror container. Acceptable formats include: ami,ari, aki, bare, and ovf.
-- the tenant of the image owned by owner
-- the size of the size image (in bytes). It is generally used only with'--location' and'--copy_from'.
-- the minimum hard disk space (in gigabytes) required for min-disk to start mirroring.
-- the minimum amount of memory required for min-ram to start the image (expressed in megabytes).
-- location
URL of the location where the image is located. For example, if the image is stored in swift
You can specify: 'swift://account:key@example.com/container/obj'.
-- the local files (including hard disk images) that file will be uploaded during creation.
In addition, the image can also be passed to the client through stdin.
-- checksum
Hash value of mirror data that can be used for authentication by Glance
Please provide a md5 check value here.
-- copy-from
The usage is similar to the'--location' parameter, but indicates that the Glance server should be able to copy and store data immediately from where the image is stored.
-- is-public [True | False]
Indicates whether the image can be accessed by the public.
-- is-protected [True | False]
Used to prevent the mirror from being deleted.
-- property
Any attribute related to mirroring. It can be used many times.
-- human-readable prints the size of the image in a user-friendly format.
-- progress displays the progress bar for uploading
You can set any property using the-property flag. You can view this property in the mirror information:
Glance image-show test
Use this command to get the list of images:
Glance image-list
You can get more information from adding images (http://docs.openstack.org/grizzl... / adding-images.html) in the official OpenStack documentation.
Other examples:
* create an image
Glance image-create-name "Window Server 2008 R2" >
* Transferring a mirror image
Glance image-create-name MSE-kl-test-disk-format=raw-container-format=bare-is-public=True-property hw_vif_model=e1000-property hw_disk_bus=ide-file=MSE.raw
When migrating an image from another virtualization platform, it is often necessary to maintain a non-OpenStack parameter through-property.
This technique is very useful, for example, images are taken from other platforms like VMware, with values like those used in this example:
Hw_disk_bus=ide
These values are stored in the glance database, the parameters used to convert to VM when an instance is started as a mirror.
* Delete the image
Image-delete {image name}
* Convert mirroring to another format
Qemu-img convert-f {initial format initial format}-O {target format target format} {source file source file} {destination file target file}
For example:
Qemu-img convert-f vmdk-O qcow2 VM.vmdk VM.qcow2 Thank you for reading this article carefully. I hope the article "how to use the Openstack Image Service glance" shared by the editor will be helpful to you. At the same time, I also hope you will support us and follow the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.