• Inok Systems

Backup Restore to Cloud (AWS) Part-2

User Rating:  / 0
PoorBest 

 

Import VM as an Image to EC2

·         Once VM file format that compatible with Amazon EC2 CLI is obtained, it can be imported to EC2

·         URL to acquire Amazon CLI: http://docs.aws.amazon.com/cli/latest/userguide/installing.html.

Step-1 EC2 CLI Installation (on Windows)

1.       Install the AWS CLI Using the MSI Installer (Windows).

2.       By default it installs to C:\Program Files\Amazon\AWSCLI (64-bit) or C:\Program Files (x86)\Amazon\AWSCLI (32-bit).

3.       To confirm installation, run these two commands on Windows command prompt:

·         aws –version

·         aws help

 Step-2 Configure EC2 CLI to Use with AWS

1.       Run “aws configure” on Windows command prompt:

·         C:\>aws configure

AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE

AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

Default region name [None]: us-west-2

Default output format [None]: ENTER

2.       AWS Access Key ID and AWS Secret Access Key are your account credentials.

3.       Default region is the name of the region you want to make calls against by default. AWS region must be specified here, refer to this URL for list of available region: http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region.

4.       Check this URL on detail of how to configure AWS CLI: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html.

Step-3 Import VMDK file to EC2

1.       Import VM to EC2 overview

a.       Use ec2-import-instance to create a new import instance task.

b.      The syntax of the command is as follows:
ec2-import-instance disk_image_filename -f file_format -t instance_type -a architecture -b s3_bucket_name -o owner -w secret_key -p platform_name -O your_access_key -W your_secret_key

c.       If the import of the VM is interrupted, you can use the ec2-resume-import command to resume the import from where it stopped

2.       Parameter for running command

·         Image file name: AWS-WIN2k8-disk1.vmdk

·         Format: VMDK

·         Instance type: t2.micro

·         Architecture: i386

·         Bucket name: myvcbucket

·         Owner (AWS user): vCenterAWS

·         Platform Name: Instance Name - AWSWin2K8r2

·         Secret Key: Password of Owner (AWS user).

·         Your Access Key: Access Key ID of Owner (AWS user).

·         Your Secret Key: Secret Access Key of Owner (AWS user).

3.       Example for running command

·         ec2-import-instance ./AWS-WIN2k8-disk1.vmdk -f VMDK -t t2.micro -a i386 -b myvcbucket -o vCenterAWS -w eGl%iaa3gXO-p AWSWin2K8r2 -O AKIAIOSFODNN7EXAMPLE -W wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

 

4.       Successfully imported instance will appear on your AWS EC2 Instances windows, further setting to configure Networking, Public IP, Subnet, etc. (in VPC) may be needed so it will match your DR scenario.

Random Blogpost

Bucket field lets you quickly categorize report records without the need to create formula or custom field in Salesforce object, when using bucket field you defined multiple categories that are used to group report value.

Read more...