r/openstack • • Jul 13 '20

How to migrate openstack instance from one cluster to another?

We have 2 OpenStack clusters.

Now want to migrate instance from one cluster to another.

The steps are:

  • Create a snapshot in cluster1
  • Download the snapshot to local
  • Connect to cluster2 and create an image with the snapshot
  • Create new stack with new image by heat template

I got 2 issues:

  • When I create a snapshot in cluster1 and download the file, I found the file's size was 0.
openstack image save --file mySnapshot.raw [image_id]
  • When I create new stack set normal volume information, it got this error:

Resource CREATE failed: ResourceInError: resources.server_volume: Went to status error due to "Unknown"

I found it wan't attached to anywhere.

Is there any necessary to do for volume when create a snapshot in cluster1? So how to migrate with volume to cluster2 correctly?

9 Upvotes

17 comments sorted by

View all comments

3

u/zetret Jul 14 '20

What version of OpenStack have you got? Noone uses the term "snapshot" anymore, so I am confused.

You take an instance, create an image of it. You export the image in any format you want (raw, qcow2 etc.). They you import that image into the second OpenStack cluster. That's the procedure.

3

u/rawmainb Jul 14 '20

Yes, I used this guide: https://docs.openstack.org/nova/latest/admin/migrate-instance-with-snapshot.html

It should be image. But described as snapshot.

Version is 3.17.0

But I tried .raw and .qcow2 format, both of them generated 0 size file.