How import OVF in Amazon Web Services (AWS) EC2
Below the steps to load SWS appliance on Amazon Cloud:
1) Dowload and install AWS CLI from this link (https://docs.aws.amazon.com/en_us/cli/latest/userguide/cli-chap-install.html)
2) Execute AWS CLI with the command aws configure
3) Load the virtual machine disk (.vmdk) on S3 bucket using this command of AWS CLI:
Code Block |
---|
|
aws s3 cp "<vmdk-path>" s3://<nome-bucket-S3>/
Example → aws s3 cp "C:\Users\utente\Desktop\SWS\Disk.vmdk" s3://my-bucket-S3/ |
4) When the loading is complete, create the AMI with this command:
Code Block |
---|
|
aws ec2 import-image --description "SWS AMI" --disk-containers "Format=vmdk,UserBucket={S3Bucket=<nome-bucket-S3>,S3Key=<vmdk-path>}"
Example -> aws ec2 import-image --description "SWS AMI" --disk-containers "Format=vmdk,UserBucket={S3Bucket=il-mio-bucket-S3,S3Key=Disk.vmdk}" |
5) Now is possible to monitore the AMI creation with this command:
Code Block |
---|
|
aws ec2 describe-import-image-tasks |
6) When the AMI creation is complete, will be available at this path:
EC2 Section → Images → AMIs
Now is possible deploy EC2 istance.
At step 1 and 2 describe how install aws client on the workstation that will be used for all the import activity of the application solution. The aws client just created will be used for next steps.
At step 3 the data disk (vmdk file) of the sws appliance is loaded. Usually the data disk is called "swsappliance-release-number-sws-1.vmdk" the disk in order to be imported must be loaded on an s3 bucket of the customer who can freely choose among those he has or can create at the moment. The latter will be used to convert the data disk from vmdk files to the native AWS format
At step 4 the disk conversion takes place and the values between <...> must be replaced with those that the customer has chosen to use:
Code Block |
---|
|
aws ec2 import-image --description "SWS AMI" --disk-containers "Format=vmdk,UserBucket={S3Bucket=<S3-bucket-name>,S3Key=<vmdk-path>}"
Exampe -> aws ec2 import-image --description "SWS AMI" --disk-containers "Format=vmdk,UserBucket={S3Bucket=swsrocks,S3Key=swsappliance-2-5-33-1.vmdk}"
|
At this step the vmdk file remains in the bucket, but an AMI with description SWS AMI is created in the default region with which aws cli has been configured (it is set when the client configuration is carried out at step 2)
At step 5 is possible to monitor the procedure started at step 4 (because this step is very slow)
At step 6 is possible to monitor from AWS panel console if the AMI has been imported correctly and is ready to be used.