> For the complete documentation index, see [llms.txt](https://docs.acecloud.ai/knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acecloud.ai/knowledge-base/compute/how-to-migrate-a-server-from-ace-cloud-to-aws.md).

# How to Migrate a Server from Ace Cloud to AWS?

This guide provides a step-by-step process for migrating a Ubuntu server from Ace Cloud to AWS. The process involves creating snapshots, converting them into images, and transferring these images to AWS.

### Step 1: Create a Snapshot <a href="#step-1-create-a-snapshot-of-the-openstack-server" id="step-1-create-a-snapshot-of-the-openstack-server"></a>

To create a snapshot, follow the steps below:

a. [Login](https://customer.acecloudhosting.com/index.php?m=ace_product_register_addon\&action=login) to your account.

<figure><img src="/files/f2uyxjHWqLEls0tLlgPQ" alt=""><figcaption></figcaption></figure>

b. Navigate to **Compute** and then click on **Instances**.

<figure><img src="/files/smvhGVaLn1CZTkNTlYok" alt=""><figcaption></figcaption></figure>

e. Select the Instance from the list and click on the action icon.&#x20;

<figure><img src="/files/Sss0Y2tgnISiSjKcUcPD" alt=""><figcaption></figcaption></figure>

f.  Choose **Create Snapshot.**

<figure><img src="/files/BXhFwO8hzOzor0eIuzCy" alt=""><figcaption></figcaption></figure>

g. Enter the **Snapshot Name** and hit **Submit**.

<figure><img src="/files/sqFTU26cTEaa3aLbxjC6" alt=""><figcaption></figcaption></figure>

### Step 2: Create Volume from the Snapshot <a href="#step-2-create-volumes-from-the-snapshots" id="step-2-create-volumes-from-the-snapshots"></a>

a. Navigate to **Storage** then click on **Volumes**, locate the volume created from the snapshot.

<figure><img src="/files/cVWKhn8MuT6T3myq6AaT" alt=""><figcaption></figcaption></figure>

**b.** Click the **Create Volume** button.

<figure><img src="/files/WDYde9gssfKMmO24b769" alt=""><figcaption></figcaption></figure>

c. Enter the **Volume Name** and set the **Volume Size** as needed.

d. In the **Volume Source** dropdown, select **Snapshot** and choose the appropriate snapshot from the list.

<figure><img src="/files/Tw4sEIeZCDUXLBDYViFg" alt=""><figcaption></figcaption></figure>

e. Click **Submit**.

### Step 3: Upload Volume to Glance as Image <a href="#step-3-upload-volumes-to-glance-as-images" id="step-3-upload-volumes-to-glance-as-images"></a>

a. Click on **Utilities,** then on **User**.

<figure><img src="/files/JCzaLeQ0Zlhhni7z6Vw3" alt=""><figcaption></figcaption></figure>

b. Click on **Create User**.

<figure><img src="/files/QoVJyQzhD9qDaIDvbNid" alt=""><figcaption></figcaption></figure>

c. Enter the **Username** and **Description** for the user and click on **Create User**.

<figure><img src="/files/UNtIOWsCUdPYXFlMMwKS" alt=""><figcaption></figcaption></figure>

d. Click on **Download** to save the user credential.

<figure><img src="/files/M1cWpGEoGysTP2TDic4n" alt=""><figcaption></figcaption></figure>

e. Login to the [horizon portal ](https://console.openstack.acecloudhosting.com/auth/login/?next=/identity/users/)with the credential created above.

<figure><img src="/files/thKerGgWvlUT7ni0q4fE" alt=""><figcaption></figcaption></figure>

f. Navigate to the **Volumes** tab and click on **Volumes**.

<figure><img src="/files/KpnECaPZl5BTAhZFgdrK" alt=""><figcaption></figcaption></figure>

g. Select the volume from the list and click on the action icon. Select the **Upload to Image** option from the dropdown.

<figure><img src="/files/cuMFXXWEaFBRXKjPNk7h" alt=""><figcaption></figcaption></figure>

h. Enter the **Image Name** and select the **Disk Format** (e.g., `qcow2`). Click on **Upload**.

<figure><img src="/files/EFSRNlsBOqrgmVhjMo27" alt=""><figcaption></figcaption></figure>

### Step 4: Download Images Using OpenStack CLI <a href="#step-4-download-images-using-openstack-cli" id="step-4-download-images-using-openstack-cli"></a>

**i. Access a server with sufficient disk space:** Ensure the server has enough volume space to store the images that will be downloaded.

**ii. Install and configure OpenStack CLI on the server: I**nstall the OpenStack CLI using the below command:

```
sudo apt-get install python3-openstackclient -y
```

**iii. Download the RC file from the horizon dashboard:**

To download the RC file, follow the below steps:

a. Login to the [horizon portal ](https://console.openstack.acecloudhosting.com/auth/login/?next=/identity/users/)with the credentials created above.

<figure><img src="/files/Gk5aS9voRj4r4LUOQYGC" alt=""><figcaption></figcaption></figure>

b. Click on the region in the top-left corner and select the region.

<figure><img src="/files/2WumjYOyW2mgLeqeBWQn" alt=""><figcaption></figcaption></figure>

c. Click on the user icon in the top-right corner.

<figure><img src="/files/WavCsZLrb4qnuV2VJuTv" alt=""><figcaption></figcaption></figure>

d. Click on **OpenStack RC File** to download the RC file.

<figure><img src="/files/4yZKskoVzY6fMnBxxvEU" alt=""><figcaption></figcaption></figure>

iv. Use the following command to list images and check their status:

```
openstack image list | grep -i <Image-Name>
```

**Note:** Replace `<Image-Name>` with the name of the image you uploaded.

**v. Wait for the images to be in the "active" state:** The image should be in the "active" state before proceeding to download.

**vi. Download the image using the Glance client:**

a. Once the image is active, use the following command to download it:

```
glance image-download --file <Image_Name> <Image-ID> --progress
```

&#x20;**Note:** Replace `<Image_Name>` with the desired name for the downloaded image file and replace `<Image-ID>` with the ID of the image.

### **Step 5: Upload Images to AWS S3**

**a. Configure AWS CLI on the server:**

```
//Installing AWS CLI
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
apt install unzip -y
unzip awscliv2.zip
sudo ./aws/install
aws configure
//Enter you credentials
```

Enter your AWS credentials and set the default region.

**b. Upload the images to AWS S3:**

```
aws s3 cp <Image-name> s3://<Bucket_Name>/
```

**Note:** Replace `<Image_Name>` with the name of the downloaded image file and replace `<Bucket_Name>` with the name of your S3 bucket.

### Step 6: Register Images as AMIs in AWS <a href="#step-6-register-images-as-amis-in-aws" id="step-6-register-images-as-amis-in-aws"></a>

**a. Import the images as AMIs:**

```
aws ec2 import-image \
    --description "Description" \
    --disk-containers "Format=RAW,UserBucket={S3Bucket=ace-pc-cloudevopsteam, S3Key=logo/Ubuntu-20.04-ovh}"
```

**Note:** Replace `<Image_Description>` with a description of the image, `<Bucket_Name>` with your S3 bucket name and `<Image_path>` with the key of the image file in S3.

<figure><img src="/files/vz8zaDR2feElNgp7aGEK" alt=""><figcaption></figcaption></figure>

**b. Monitor the import status:**

```
aws ec2 describe-import-image-tasks --import-task-ids <Import_Task_ID>
```

**Note:** Replace `<Import_Task_ID>` with the ID returned from the `import-image` command.<br>

<figure><img src="/files/tU0fuDcWWyLpGTo0IUbK" alt=""><figcaption></figcaption></figure>

Let it complete.<br>

<figure><img src="/files/lA0B1pVgdmjSCVyYjCB8" alt=""><figcaption></figcaption></figure>

**c.** Once the import is complete, the image will be available in the AMI section of AWS EC2. You can find it under **Images > AMIs** in the AWS Management Console.<br>

<figure><img src="/files/i81xjLKrNTAre8FHAIx4" alt=""><figcaption></figcaption></figure>

d. Using this uploaded image, you can launch your instance.
