Migrate an instance from another OpenStack Cloud provider

If you have used a different OpenStack Cloud provider before, you might want to migrate an instance to JSC Cloud. Before migrating an instance, you need to make sure that you have access to your projects on the previous cloud provider and JSC Cloud. Also make sure you have the OpenStack credentials (open.rc files) and the OpenStack CLI installed.

1. Create a Snapshot

First shutdown the instance you want to migrate. Then take a snapshot of this instance. This snapshot will be used to create a new instance on the JSC Cloud.

openstack server list
openstack server stop <instance-id>
openstack server image create --name <snapshot-name> <instance-id>
openstack image list

2. Download the snapshot

Use the OpenStack CLI to download the image snapshot to your local machine. The command to download the snapshot is:

openstack image list
openstack image show <image_id> | grep disk_format
openstack image save --file <instance-id>-snapshot.<disk_format> <image_id>

3. Upload the snapshot

Use the OpenStack CLI to upload the image snapshot to the JSC Cloud. The command to upload the snapshot is:

source <jsc-cloud-project-openrc.sh>
openstack image create --container-format bare --disk-format <disk_format> --file <image_file_path> <snapshot_name>
openstack image list

4. Boot the snapshot in the JSC Cloud

Ensure that you have configured the network. This may involve setting up keypairs, security groups, floating IPs, and configuring virtual networks.

Check the available flavors, the available networks, security groups, keypairs and choose suitable options. Then create a new instance with the created snapshot:

openstack flavor list
openstack network list
openstack security group list
openstack keypair list
openstack server create --flavor <flavor> --network <network_id> --security-group <security-group-id> --image <snapshot_name> --key-name <keypair_name> <name_of_new_instance>

5. Data transfer

If the instance contains data that needs to be migrated, copy the data from the source instance to the new instance in the JSC Cloud provider. This may involve using tools like rsync or scp to transfer files over the network.

6. Verify

Verify that the new instance is working correctly on the JSC Cloud. Test the instance by connecting to it, running applications, and performing other tasks to make sure that everything is working as expected.

7. Decommission the old instance

Once you have verified that the new instance is working correctly, you can decommission the old instance in the source OpenStack cloud provider. This may involve deleting the old instance and associated resources, such as disks and IP addresses.