Created
April 11, 2013 08:51
-
-
Save ruhenheim/5361830 to your computer and use it in GitHub Desktop.
execute AWS VM Import sample DOS batch for VPC.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set JAVA_HOME=<JAVA_JRE_HOME> | |
set EC2_HOME=<EC2_API_TOOLS_HOME> | |
set EC2_URL=https://ec2.ap-northeast-1.amazonaws.com | |
REM ## if use Proxy ## | |
REM set EC2_JVM_ARGS=-Dhttp.proxySet=true -Dhttps.proxySet=true -Dhttp.proxyHost=<YOUR_PROXY_HOST_FOR_HTTP> -Dhttp.proxyPort=<HTTP_PROXY_PORT> -Dhttps.proxyHost=<YOUR_PROXY_HOST_FOR_HTTPS> -Dhttps.proxyPort=<HTTPS_PROXY_PORT> | |
set PATH=%PATH%;%EC2_HOME%\bin | |
set AWS_ACCESS_KEY=<YOUR_ACCESS_KEY> | |
set AWS_SECRET_KEY=<YOUR_SECRET_KEY> | |
set VMDK=<YOUR-VMDK-FILENAME>.vmdk | |
set S3_OWNER_ACCESS_KEY=<YOUR_S3_BUCKET_ACCESS_KEY> | |
set S3_OWNER_SECRET_KEY=<YOUR_S3_BUCKET_SECRET_KEY> | |
set S3_BUCKET_NAME=<YOUR_BUCKET_NAME> | |
ec2-import-instance \ | |
%VMDK% \ | |
--region ap-northeast-1 \ | |
-z ap-northeast-1a \ | |
-t m1.small \ | |
-b %S3_BUCKET_NAME% \ | |
-f VMDK \ | |
-a [i386|x86_64] \ | |
-o %S3_OWNER_ACCESS_KEY% \ | |
-w %S3_OWNER_SECRET_KEY% \ | |
-g <YOUR_VPC_SECURTY_GROUP> \ | |
--subnet <SUBNET_ID[ex.)subnet-xxxxxx]> \ | |
--private-ip-address 10.192.xxx.xxx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment