> For the complete documentation index, see [llms.txt](https://docs.plenit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plenit.com/docs-en/productos/migrations/how-to/como-migrar-un-servidor-gnulinux-desde-aws-a-plenit.md).

# How to Migrate a GNU/Linux Server from AWS to Plenit

To migrate a GNU/Linux server from AWS to Plenit, you export the instance disk to an S3 bucket in VHD format and then import it into Plenit by the object's URL.

Most of the work is on the AWS side: preparing the machine, setting up an S3 bucket with the correct permissions, and launching the export with AWS CLI.

<br>

> 👍 What you get
>
> The disk from your AWS instance exported to S3 in VHD format and imported into Plenit by its URL, ready to deploy the target server.

<br>

### Before you start

* Sign in to the Plenit platform with company administrator permissions or on a subscription of **Servers**.
* Have access to the section **Migrations** within **Cloud Services**.
* Have an AWS subscription with at least one server to export.

<br>

> ❗️ What AWS does not allow you to export
>
> Before you begin, make sure your case does not run into AWS limits:
>
> * It does not export images with third-party AWS software: neither **Windows**, nor **SQL Server**, nor images created from the **AWS Marketplace**.
> * It does not export images with snapshots of **encrypted EBS** in the block device mapping.
> * It only exports EBS data volumes from the block device mapping; not those **added after launching** the instance.
> * It does not export images **shared from another AWS account** .
> * Maximum **5 conversion tasks per region** in parallel (expandable to 20).
> * It does not export volumes **larger than 1 TB**.

<br>

### Step 0. Prepare the GNU/Linux machine

Before exporting, get the source server ready:

* Enable **SSH** for remote access and allow SSH sessions in the machine's firewall (for example, in `iptables`).
* Create a **additional non-root user** to work over SSH.
* Check that the machine uses **GRUB** (Legacy or GRUB 2) as the bootloader.
* Check that the root filesystem is one of these: **EXT2, EXT3, EXT4, Btrfs, JFS or XFS**.

<br>

To verify the filesystem and boot:

```bash
lsblk -f            # filesystem type of each volume
ls /boot/grub*      # presence of GRUB / GRUB2
```

<br>

### Step 1. Install AWS CLI on your machine

Install the AWS command-line interface on the machine from which you will launch the migration (on Windows, the installer `.msi`, adding it to the Path; on Linux, via Python and Pip). Then check that it responds:

```bash
aws --version
```

{/\* 📸 SCREENSHOT 1 · AWS CLI version check \*/}

![AWS CLI version check](https://REEMPLAZA-URL/servidores-migracion-aws-01.png)

<br>

### Step 2. Prepare the S3 bucket

#### 2.1 Create the bucket in the same region

In the AWS console, search for **S3** and click **Create bucket**. Give it a **name** and choose the **region**.

> ❗️ Same region as the instance
>
> The S3 bucket must be in the same region as the machine you are exporting. If the instance is in Ireland (`eu-west-1`), the bucket too.

<br>

In **Object properties**, check **ACLs enabled**.

{/\* 📸 SCREENSHOT 2 · bucket creation with name, region, and ACLs enabled \*/}

![Creation of the S3 bucket with name and region](https://REEMPLAZA-URL/servidores-migracion-aws-02.png)

<br>

#### 2.2 Allow the necessary access

In **Block public access**, uncheck **Block all public access** and accept the warning. Leave the rest as default and click **Create bucket**.

{/\* 📸 SCREENSHOT 3 · unlocking the bucket's public access \*/}

![Bucket public access settings](https://REEMPLAZA-URL/servidores-migracion-aws-03.png)

<br>

#### 2.3 Add Plenit's grantee in the ACL

Open the bucket, tab **Permissions → Access control list (ACL) → Edit**. Click **Add grantee**, enter Plenit's canonical grantee string, check **Read** and **Write** and **Save changes**.

<br>

> 🚧 Confirm the grantee string
>
> It is the identifier of the Plenit account that will collect the export from your bucket. Use the current value provided by Partner Success; if it is not correct, the export will not be delivered.

{/\* 📸 SCREENSHOT 4 · editing the ACL by adding the grantee with read/write \*/}

![Editing the bucket ACL to add the grantee](https://REEMPLAZA-URL/servidores-migracion-aws-04.png)

### Step 3. Export the AWS instance

#### 3.1 Locate the instance ID

In the console, search for **EC2 → Instances**, locate the machine to migrate and copy its **instance ID** (`i-…`). Keep it.

{/\* 📸 SCREENSHOT 5 · EC2 · instance ID to export \*/}

![Copying the instance ID in EC2](https://REEMPLAZA-URL/servidores-migracion-aws-05.png)

<br>

#### 3.2 Create the access keys

From the user profile, go to **Security credentials → Access keys → Create an access key**. Copy the **Access key ID** and the **secret key** and download the key file. You will use them to authenticate AWS CLI.

{/\* 📸 SCREENSHOT 6 · creating and downloading the access keys \*/}

![Creation of the AWS access keys](https://REEMPLAZA-URL/servidores-migracion-aws-06.png)

<br>

#### 3.3 Prepare the export file

Create a file `file.json` with the output format (**VHD**, to import it into Plenit), the bucket and the prefix (the folder where the exported content will be stored):

```json
{
  "DiskImageFormat": "VHD",
  "S3Bucket": "your-bucket",
  "S3Prefix": "vms/"
}
```

Note the path where you save the file; you will need it in the command. On Linux, give the file read permission.

<br>

#### 3.4 Load the credentials and launch the export

Load the environment variables with your region and keys. In PowerShell (Windows):

```powershell
$Env:AWS_DEFAULT_REGION='eu-west-1'
$Env:AWS_ACCESS_KEY_ID='<ACCESS-KEY-ID>'
$Env:AWS_SECRET_ACCESS_KEY='<SECRET-KEY>'
echo $Env:AWS_DEFAULT_REGION   # check that it loaded
```

On GNU/Linux it's the same with `export`:

```bash
export AWS_DEFAULT_REGION='eu-west-1'
export AWS_ACCESS_KEY_ID='<ACCESS-KEY-ID>'
export AWS_SECRET_ACCESS_KEY='<SECRET-KEY>'
echo $AWS_DEFAULT_REGION
```

Launch the export task with the instance ID and the path to the `file.json`:

```bash
aws ec2 create-instance-export-task --instance-id <INSTANCE-ID> --target-environment microsoft --export-to-s3-task file://<PATH-TO-FILE>
```

{/\* 📸 SCREENSHOT 7 · PowerShell · variable loading and export command \*/}

![Loading variables and export command for the instance](https://REEMPLAZA-URL/servidores-migracion-aws-07.png)

<br>

#### 3.5 Retrieve the VHD URL

The process takes time depending on the size of the server. When it finishes, go into the S3 bucket, open the folder for the prefix you defined (for example, `vms/`), and, on the VHD, **copy the URL** of the object. This is the one you will use to import into Plenit (you can also download the VHD, but for the migration the practical option is the URL).

{/\* 📸 SCREENSHOT 8 · S3 bucket · VHD object with the option to copy the URL \*/}

![Copying the VHD URL in the S3 bucket](https://REEMPLAZA-URL/servidores-migracion-aws-08.png)

<br>

### Step 4. Import the disk into Plenit

In **Cloud Services → Migrations**, click **New migration**.

> 🚧 Import from the same machine used for the AWS operation
>
> The import by URL must be launched from the machine on which you did the entire AWS process.

<br>

#### 4.1 Source service and type

Select **Servers** and, as type, **Virtual**.

{/\* 📸 SCREENSHOT 9 · wizard · service Servers and type Virtual \*/}

![Selection of Servers and Virtual type in the wizard](https://REEMPLAZA-URL/servidores-migracion-aws-09.png)

<br>

#### 4.2 Format, method, and disk data

Select **Compatible Virtual Disks** as the format and **download via URL** as the delivery method (faster than FTP, by avoiding intermediary handling). Fill in the disk data:

* **File name** with its extension (the one from Step 3).
* **Disk URL**: the one you copied from the bucket.
* **Disk type**: the operating system one, the system disk; the rest, data.
* **Display name**: the disk identifier in the console.

Click **Next**.

{/\* 📸 SCREENSHOT 10 · wizard · download by URL and disk data \*/}

![Format, method by URL and disk data](https://REEMPLAZA-URL/servidores-migracion-aws-10.png)

<br>

#### 4.3 Organization, subscription, and deployment

Indicate the **organization**, the **subscription** and the **availability zone** where to upload the disk. When asked whether to deploy a new server with the imported disks, the usual thing is **Yes**.

{/\* 📸 SCREENSHOT 11 · wizard · organization, subscription, zone, and deploy option \*/}

![Selection of organization, subscription and deployment](https://REEMPLAZA-URL/servidores-migracion-aws-11.png)

<br>

#### 4.4 Destination server

If you chose to deploy, indicate the **name** (spaces are allowed), the **operating system**, the **size** (CPU and RAM) and the **network type** (standard or VPC). Click **Finish**.

{/\* 📸 SCREENSHOT 12 · wizard · destination server configuration \*/}

![Destination server configuration](https://REEMPLAZA-URL/servidores-migracion-aws-12.png)

With this, the foundations of the migration are laid and the internal processes start that lead to the deployment of the server in the chosen subscription.

<br>

### Conclusion

This migration is the most labor-intensive in the block because almost everything happens in AWS: preparing the machine, leaving the S3 bucket with the correct region and permissions, loading the credentials, and launching the export to VHD.

Two things determine it completely: respecting AWS export limits (no Windows, SQL Server, Marketplace images, or volumes larger than 1 TB) and making sure the bucket ACL has Plenit's grantee set correctly, because that is what allows the export to be collected. With the VHD already in S3, importing it into Plenit is just pasting its URL into the wizard, from the same machine where you did the work in AWS.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.plenit.com/docs-en/productos/migrations/how-to/como-migrar-un-servidor-gnulinux-desde-aws-a-plenit.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
