Failing Back a Recovered Linux Machine from AWS
The same Amazon EC2 CLI tool is used to fail back a Linux machine to either VMware or Hyper-V.
To failback a Linux machine to VMware:
1. In a Command Prompt window run the following EC2 CLI command:
ec2-create-instance-export-task instance_id -e target_environment ‑f disk_image_format ‑c container_format ‑b bucket_name
Parameter | Description |
instance_id | The ID of the instance to fail back. |
-e target_environment | The target environment. Set this parameter to VMware |
-f disk_image_format | The format used for disk images. Set this parameter to VMDK |
-c container_format | The container format used to combine disk images with metadata. If absent, only the disk image is exported. Set this parameter to OVA |
-b bucket_name | The name of the destination Amazon S3 bucket where the file will be exported. |
The instance is exported to the S3 bucket as an OVA file.
Note: You can monitor the export of your instance, at the command prompt, by typing the following command:
ec2-describe-export-tasks
Or, for the specific task:
ec2-describe-export-tasks filename
where filename is the name of the file for the instance in the S3 bucket.
Monitor the export to determine when the export has completed.
2. In the S3 bucket, right-click the file and select Download.
3. Right-click the Download link and save the OVA file to your site, for example, in Internet Explorer via Save target as and in Google Chrome via Save Link as.
4. In the VMware Web Client or the VMware Client console, deploy the OVA file.
a) Select File > Deploy OVF Template.
b) In the Deploy OVF Template wizard, select the OVA file as the OVF package.
c) Continue through the wizard.
The Linux machine is deployed in the vCenter Server. By default, the name of the machine is the name of the file for the instance in the S3 bucket.
To failback a Linux machine to Hyper-V:
1. In a Command Prompt window run the following EC2 CLI command:
ec2-create-instance-export-task instance_id -e target_environment ‑f disk_image_format ‑b bucket_name
Parameter | Description |
instance_id | The ID of the instance to fail back. |
-e target_environment | The target environment. Set this parameter to Microsoft |
-f disk_image_format | The format used for disk images. Set this parameter to VHD |
-b bucket_name | The name of the destination Amazon S3 bucket where the file will be exported. |
The instance is exported to the S3 bucket as a VHD file.
Note: You can monitor the export of your instance, at the command prompt, by typing the following command:
ec2-describe-export-tasks
Or, for the specific task:
ec2-describe-export-tasks filename
where filename is the name of the file for the failed back instance in the S3 bucket.
2. In the S3 bucket, right-click the file and select Download.
3. Right-click the Download link and save the VHD file to your site, for example, in Internet Explorer via Save target as and in Google Chrome via Save Link as.
4. In the Hyper-V Manager, right-click the Hyper-V host and select New > Virtual Machine.
a) Specify the generation to use for the machine and the startup memory.
b) Continue through the New Virtual machine wizard until the Connect Virtual Hard Disk step and in this step select to use an existing virtual hard disk and specify the file downloaded from the S3 bucket.
c) Click Finish.
The Linux machine is deployed under the Hyper-V host.