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

This document outlines the step-by-step process of migrating a Ubuntu server from AWS to Ace Cloud.  &#x20;

### Step 1: Create a Bucket in AWS&#x20;

a. Navigate to the AWS Management Console.

b. Select **S3** from the list of services.

c. Click on **Create Bucket**.<br>

<figure><img src="/files/5YTRHiY6pjU316mdpQ8Z" alt=""><figcaption></figcaption></figure>

### Step 2: Name the Bucket and Enable ACLs

a. Give your bucket a unique name.

b. Under **Object Ownership**, choose **ACLs enabled**.

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

c. Click **Next** to proceed.

### Step 3: Configure Permissions for the Bucket

a. Go to the **Permissions** tab.

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

b. Scroll down to the **Access Control List (ACL)** section and click on **Edit**.

<figure><img src="/files/5znKO8J7852VlYdvHQM1" alt=""><figcaption></figcaption></figure>

c. Click on **Add grantee.**

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

d. Provide the below permission and grantee ID for your region.

* `READ_ACP` (In the Amazon S3 console, Bucket ACL should have the Read permission)
* `WRITE` (In the Amazon S3 console, Objects should have the Write permission)

**Note:** Click [here](https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport-prerequisites.html) to find the grantee ID for your region.

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

e. Review the settings and click on **Create Bucket**.

### Step 4: Set Up AWS CLI on the Server

Install and configure AWS CLI on the server where you want to temporarily store your server image.

a. Run the below commands to install 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
```

b. Run the following command to configure AWS CLI:

```
aws configure
```

c. Enter your AWS credentials and set the default region.

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

d. Run the below command to find your bucket:

```
aws s3 ls | grep -i <bucket name>
```

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

### Step 5: Export the VM to the S3 Bucket

a. Run the below command to export your Ubuntu server as an image to the S3 bucket created in **Step 1**:

```
aws ec2 create-instance-export-task --instance-id <InstanceID> --target-environment vmware --export-to-s3-task DiskImageFormat=vmdk,S3Bucket=<BucketName>
```

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

Get the instance ID from the instance overview.

<figure><img src="/files/5847vzl3Ao64PuWFnPJF" alt=""><figcaption></figcaption></figure>

b. To see the progress and state of VM export, use the command below. Make changes to the export ID given by the previous command.

```
aws ec2 describe-export-tasks --export-task-ids <ExportTaskId>
```

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

### Step 6: Download the VM Image to the Server

Once the export task is complete, download the VM image to the server using the following command:

```
aws s3 cp s3://<BucketName>/<ImageName> .
```

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

### Step 7: Install OpenStack CLI

On the same server, install the OpenStack CLI using the below command:

```
apt install python3-openstackclient -y && apt install python3-glanceclient -y
```

### Step 8: Download RC File

You need an RC file to work with OpenStack CLI. This file contains the environment variables necessary to interact with your OpenStack environment.

To download the RC file, follow the below steps:

a. Log in to the [Customer portal](http://customer.acecloudhosting.com/).

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

b. Navigate to **Services** and then click on **My Services.**

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

c. Click on your project.

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

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

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

e. Click on **Create User**.

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

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

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

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

<figure><img src="/files/5jrWpF000sO55MtqWcAU" alt=""><figcaption></figcaption></figure>

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

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

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

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

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

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

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

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

### Step 9: Upload the RC File to the Server

a. Transfer the downloaded RC file to the server where OpenStack CLI is installed.

b. You can use scp or any other file transfer method.

### Step 10: Source the RC File and Upload the Image

a. Source the RC file to load the environment variables using the below command:

```
source /path/to/<RCFileName>
```

**Note:** Enter the path location in place of \</path/to/\<RCFileName>>

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

b. Use the following command to upload the image downloaded from the AWS S3 bucket to Ace Cloud:

```
openstack image create --disk-format vmdk --container-format bare --file <path/to/image/downloaded/from/S3/bucket> --private <ImageName>
```

As per volume size, it will take time. Once it is active, launch a VM.

c. Check image status using the below command:

```
openstack image list | grep -i <image name>
```

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

### Step 11: Launch a VM with the Uploaded Image

a. Navigate to **Compute** and then click on **Instances**. Here, you can view the list of all instances.

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

b. Click on **Create Instance**.

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

c. Enter the instance details and hit **Next**.

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

d. Click on **Select** **Source,** then select **Image** from the **Boot Source** drop-down.

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

e. Click on **Custom Images** and select your image.

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

f. Select **Flavor** and hit **Next**.

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

**g.** Select the **Security Groups** and click **Next**. (You can also create a security group. Click [here](/knowledge-base/network/how-to-manage-a-security-group.md) to learn how.)

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

h. Choose a network of your own choice. Select the **Security Groups** and click **Next**. (You can also create a security group. Click [here](/knowledge-base/network/how-to-manage-a-security-group.md) to learn how.)

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

i. Review the details and click on **Launch Instance**.

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acecloud.ai/knowledge-base/utilities/how-to-migrate-a-server-from-aws-to-ace-cloud.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
