Restoring Backed-Up VM to Amazon AWS: Step-by-Step Guide

Restoring Backed-Up VM to Amazon AWS: Step-by-Step Guide

KB ID: 115115
Purpose
This knowledge base article outlines the steps to restore a backed-up virtual machine (VM) to Amazon AWS using a VHD or VHDX file downloaded from the Vembu BDR Server.
Solution
1. Steps to Be Done in BDRSuite Backup Server
1.1. Log in to the Vembu BDR Server console and navigate to the Recovery page.
1.2. In the Recovery page, click the restore icon of the respective backup and select the recovery type as "Download."
1.3. Select the latest restore point and choose the required VMs.
1.4. Choose "VHD" or "VHDX" as your virtual disk format from the drop-down list.
Note: Refer to the detailed download process here
2. Steps to Deploy Downloaded VHD/VHDX File on Amazon AWS
2.1. Install AWS CLI on the machine where you downloaded the VHD/VHDX file using the MSI Installer.
2.2. Configure AWS CLI settings to interact with AWS. Use the command `aws configure` to set up your AWS CLI installation.
Example:
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2 (You can specify your preferred region.)
Default output format [None]: ENTER
Note: For detailed information on configuring AWS CLI, refer to this Link
2.3. Create an S3 Bucket and upload the VHD/VHDX file to the created S3 Bucket using the following command:
Command: aws s3 cp <filename> s3:/<bucketname>/<prefix>
Example: aws s3 cp DISK0_MERGE.vhdx  s3:/vembuvhdximport/AWSuploadgen1
2.4. Create the required service role and enable the necessary permissions to import the VHD/VHDX file to Amazon AWS. Refer to this Link
2.5. Import your VHD/VHDx file using the `ec2 import-image` command as mentioned below:
aws ec2 import-image --description "My server VM" --disk-containers "file://C:\import\containers.json"
Refer to an example containers.json file.
[
    {
        "Description": "First disk",
        "Format": "vhdx",
        "UserBucket": {
            "S3Bucket": "vembuvhdximport",
            "S3Key": "AWSuploadgen1/DISK0_MERGE.VHDX"
        }
      }
   ]
2.6. To monitor an import image task, use the following `describe-import-image-tasks` example to check the status of the specified import image task.
 aws ec2 describe-import-image-tasks \ --import-task-ids import-ami-1234567890abcdef0
Refer to this Link
2.7. After creating the Amazon Machine Image (AMI), you can launch the instance following the default AWS EC2 procedure.