Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 via 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 the AWS CLI.

👍 What you get

Your AWS instance disk exported to S3 in VHD format and imported into Plenit via its URL, ready to deploy the target server.

Before you begin

  • Log 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.

❗️ What AWS does not allow you to export

Before you begin, check that 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.

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 non-root additional user to work over SSH.

  • Check that the machine uses GRUB (Legacy or GRUB 2) as the boot loader.

  • Check that the root file system is one of these: EXT2, EXT3, EXT4, Btrfs, JFS or XFS.

To verify the file system and boot:

Step 1. Install the AWS CLI on your computer

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

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

AWS CLI version check

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 going to export. If the instance is in Ireland (eu-west-1), the bucket must be too.

In Object properties, check ACLs enabled.

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

S3 bucket creation with name and region

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 · unblocking public access to the bucket */}

Bucket public access settings

2.3 Add the Plenit beneficiary in the ACL

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

🚧 Confirm the grantee string

It is the Plenit account identifier that will pick up 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 adding the grantee with read/write */}

Bucket ACL edit to add the grantee

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 · ID of the instance to export */}

Copying the instance ID in EC2

3.2 Create the access keys

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

{/* 📸 SCREENSHOT 6 · creation and download of the access keys */}

Creation of AWS access keys

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 export will be stored):

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

3.4 Load the credentials and launch the export

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

In GNU/Linux it's the same with export:

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

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

Loading variables and instance export command

3.5 Retrieve the VHD URL

The process takes as long as the server size. When it finishes, go to the S3 bucket, open the folder for the prefix you defined (for example, vms/), and, on the VHD, copy the URL of the object. That 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

Step 4. Import the disk into Plenit

In Cloud Services → Migrations, click New migration.

🚧 Import from the same computer used for the AWS operation

The URL-based import must be launched from the computer where you carried out the entire AWS process.

4.1 Service and source type

Select Servers and, as the type, Virtual.

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

Selection of Servers and Virtual type in the wizard

4.2 Disk format, method, and data

Select Compatible Virtual Disks as the format and download via URL as the delivery method (faster than FTP, because it avoids the intermediary). 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's main, system disk; the rest, data disks.

  • Display Name: the disk identifier in the console.

Click Next.

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

Format, URL method, and disk data

4.3 Organization, subscription, and deployment

Indicate the organization, the subscription and the availability zone where to upload the disk. For the question about deploying a new server with the imported disks, the usual answer is Yes.

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

Selection of organization, subscription and deployment

4.4 Target server

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

{/* 📸 SCREENSHOT 12 · wizard · target server configuration */}

Target server configuration

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

Conclusion

This migration is the most laborious 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 completely determine it: respecting AWS export limits (no Windows, SQL Server, Marketplace images, or volumes larger than 1 TB) and having the Plenit beneficiary correctly set in the bucket ACL, because that is what allows the export to be retrieved. With the VHD already in S3, importing it into Plenit is just pasting its URL into the wizard, provided you do it from the same computer where you did the work in AWS.

Last updated

Was this helpful?