8.4. Copying an image to a new site
Copy images from the central location to edge sites to make them available for instance creation. This reduces instance launch time by eliminating the need to transfer images over the WAN during deployment.
Procedure
Use the UUID of the glance image for the copy operation:
ID=$(openstack image show cirros -c id -f value) glance image-import $ID --stores az1,az2 --import-method copy-image참고In this example, the
--storesoption specifies that thecirrosimage will be copied from the central site,az0, to edge sitesaz1andaz2. Alternatively, you can use the--all-stores Trueoption, which uploads the image to all the stores that don’t currently have the image.Confirm a copy of the image is in each store. Note that the
storeskey, which is the last item in the properties map, is set toaz0,az1,az2.:$ openstack image show $ID | grep properties | properties | os_glance_failed_import=', os_glance_importing_to_stores=', os_hash_algo=sha512, os_hash_value=6b813aa46bb90b4da216a4d19376593fa3f4fc7e617f03a92b7fe11e9a3981cbe8f0959dbebe36225e5f53dc4492341a4863cac4ed1ee0909f3fc78ef9c3e869, os_hidden=False, stores=az0,az1 |참고Always store an image copy in the central site even if there is no VM using it on that site.