You can migrate images between datastores in a way that preserves their UUID and metadata.

Prerequisites

Verify that both the current and destination datastore are available.

Procedure

  1. Using SSH, log in to the controller01 node.
  2. Switch to root user.
    sudo su -
  3. View a list of images.
    openstack image list

    The result lists image UUIDs, names, and statuses.

    +--------------------------------------+------------------------------------+--------+
    | ID                                   | Name                               | Status |
    +--------------------------------------+------------------------------------+--------+
    | 00acfc1f-2109-4e9c-b628-de7149b42dc3 | ubuntu-16.04-server-cloudimg-amd64 | Active |
    | bf1abfb8-8bcc-4ce8-a9e8-3432b8ca546e | ubuntu1604_jenkins_node            | Active |
    +--------------------------------------+------------------------------------+--------+
    
  4. Determine the UUID of the project.
    openstack project list --domain default

    The result lists the project UUID and name.

    +----------------------------------+-------+
    | ID                               | Name  |
    +----------------------------------+-------+
    | f33350f3844948fcb482ed6f5eef133d | admin |
    +----------------------------------+-------+
    
  5. Log in to the vSphere web client.
  6. Go to vCenter and find the Project Folder with the UUID of the project.
  7. In the Project Folder, find the template with the UUID of the image.

    Migrate Image - Find existing image

  8. Right-click the template and select Clone to Template to open the Template to Template wizard:
    1. Enter a new name for the template.
    2. Choose a different host.
    3. Choose a datastore.
    4. Click Finish to complete the new template.
  9. Right-click the original template and select Delete from Disk.
  10. Right-click the template clone and select Rename to enter the original name as the new name.

    Migrate Image - Rename image