\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u3068\u30a8\u30af\u30b9\u30dd\u30fc\u30c8<\/a><\/p>\n\u4eca\u56de\u306fVM\u30a4\u30f3\u30dd\u30fc\u30c8\u3001VM\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3092\u5b9f\u969b\u306bAWS CLI\u3067\u884c\u3046\u65b9\u6cd5\u306e\u4f8b\u3092\u5099\u5fd8\u9332\u3068\u3057\u3066\u8a18\u8f09\u3057\u3066\u304a\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n
AWS Amazon EC2 VM Import(VM\u30a4\u30f3\u30dd\u30fc\u30c8)\/VM Export(VM\u30a8\u30af\u30b9\u30dd\u30fc\u30c8)\u306eAWS CLI\u3092\u7528\u3044\u305f\u5b9f\u884c\u65b9\u6cd5\u30fb\u5b9f\u884c\u624b\u9806\u30fb\u5b9f\u884c\u4f8b\u30fb\u5b9f\u8df5\u4f8b\u30fb\u30b3\u30de\u30f3\u30c9\u4f8b\u30fb\u30b5\u30f3\u30d7\u30eb<\/h2>\nVM Import\u306e\u5b9f\u884c\u624b\u9806<\/h3>\n
VM Import\u306e\u5b9f\u884c\u306f\u304a\u304a\u307e\u304b\u306b\u300cVM Import\u3092\u884c\u3046Role\u306e\u4f5c\u6210\u300d\u300cVM Import\u3092\u884c\u3046Role\u306b\u30dd\u30ea\u30b7\u30fc\u3092\u9069\u7528\u3059\u308b\u300d\u300cVM Import\u306eAWS CLI\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u30e6\u30fc\u30b6\u306b\u30dd\u30ea\u30b7\u30fc\u3092\u9069\u7528\u3059\u308b\u300d\u300cVM Import\u306eAWS CLI\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u300d\u306e\u624b\u9806\u3067\u884c\u3044\u307e\u3059\u3002<\/p>\n
VM Import\u3092\u884c\u3046Role\u306e\u4f5c\u6210<\/h4>\n
VM Import\u3092\u884c\u3046Role\u3092\u8a2d\u5b9a\u3059\u308bJSON\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n
\r\nvim trust-policy.json\r\n{\r\n "Version":"2012-10-17",\r\n "Statement":[\r\n {\r\n "Sid":"",\r\n "Effect":"Allow",\r\n "Principal":{\r\n "Service":"vmie.amazonaws.com"\r\n },\r\n "Action":"sts:AssumeRole",\r\n "Condition":{\r\n "StringEquals":{\r\n "sts:ExternalId":"vmimport"\r\n }\r\n }\r\n }\r\n ]\r\n}\r\n<\/pre>\nVM Import\u3092\u884c\u3046Role\u3092\u8a2d\u5b9a\u3059\u308bJSON\u30d5\u30a1\u30a4\u30eb\u3092AWS CLI\u30b3\u30de\u30f3\u30c9\u3067\u9069\u7528\u3057\u307e\u3059\u3002<\/p>\n
\r\naws iam create-role --role-name vmimport --assume-role-policy-document file:\/\/trust-policy.json\r\n<\/pre>\nVM Import\u3092\u884c\u3046Role\u306b\u30dd\u30ea\u30b7\u30fc\u3092\u9069\u7528\u3059\u308b<\/h4>\n
VM Import\u3092\u884c\u3046Role\u306b\u30dd\u30ea\u30b7\u30fc\u3092\u9069\u7528\u3059\u308bJSON\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n
\r\nvim role-policy.json\r\n{\r\n "Version":"2012-10-17",\r\n "Statement":[\r\n {\r\n "Effect":"Allow",\r\n "Action":[\r\n "s3:ListBucket",\r\n "s3:GetBucketLocation"\r\n ],\r\n "Resource":[\r\n "arn:aws:s3:::\uff1c\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308bVM\u30a4\u30e1\u30fc\u30b8\u3092\u914d\u7f6e\u3057\u305fS3\u30d0\u30b1\u30c3\u30c8\u540d\uff1e"\r\n ]\r\n },\r\n {\r\n "Effect":"Allow",\r\n "Action":[\r\n "s3:GetObject"\r\n ],\r\n "Resource":[\r\n "arn:aws:s3:::\uff1c\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308bVM\u30a4\u30e1\u30fc\u30b8\u3092\u914d\u7f6e\u3057\u305fS3\u30d0\u30b1\u30c3\u30c8\u540d\uff1e\/*"\r\n ]\r\n },\r\n {\r\n "Effect":"Allow",\r\n "Action":[\r\n "ec2:ModifySnapshotAttribute",\r\n "ec2:CopySnapshot",\r\n "ec2:RegisterImage",\r\n "ec2:Describe*"\r\n ],\r\n "Resource":"*"\r\n }\r\n ]\r\n}\r\n<\/pre>\nVM Import\u3092\u884c\u3046Role\u306b\u30dd\u30ea\u30b7\u30fc\u3092\u9069\u7528\u3059\u308bJSON\u30d5\u30a1\u30a4\u30eb\u3092AWS CLI\u30b3\u30de\u30f3\u30c9\u3067\u9069\u7528\u3057\u307e\u3059\u3002<\/p>\n
\r\naws iam put-role-policy --role-name vmimport --policy-name vmimport --policy-document file:\/\/role-policy.json\r\n<\/pre>\nVM Import\u306eAWS CLI\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u30e6\u30fc\u30b6\u306b\u30dd\u30ea\u30b7\u30fc\u3092\u9069\u7528\u3059\u308b<\/h4>\n
VM Import\u306eAWS CLI\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u30e6\u30fc\u30b6\u306b\u30dd\u30ea\u30b7\u30fc\u3092\u9069\u7528\u3059\u308bJSON\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u3053\u306e\u30dd\u30ea\u30b7\u30fc\u3092aws ec2 import-image\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308bIAM\u30e6\u30fc\u30b6\u306b\u9069\u7528\u3057\u307e\u3059\u3002<\/p>\n
\r\n{\r\n "Version": "2012-10-17",\r\n "Statement": [\r\n {\r\n "Effect": "Allow",\r\n "Action": [\r\n "s3:ListAllMyBuckets"\r\n ],\r\n "Resource": "*"\r\n },\r\n {\r\n "Effect": "Allow",\r\n "Action": [\r\n "s3:CreateBucket",\r\n "s3:DeleteBucket",\r\n "s3:DeleteObject",\r\n "s3:GetBucketLocation",\r\n "s3:GetObject",\r\n "s3:ListBucket",\r\n "s3:PutObject"\r\n ],\r\n "Resource": ["arn:aws:s3:::\uff1c\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308bVM\u30a4\u30e1\u30fc\u30b8\u3092\u914d\u7f6e\u3057\u305fS3\u30d0\u30b1\u30c3\u30c8\u540d\uff1e","arn:aws:s3:::\uff1c\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308bVM\u30a4\u30e1\u30fc\u30b8\u3092\u914d\u7f6e\u3057\u305fS3\u30d0\u30b1\u30c3\u30c8\u540d\uff1e\/*"]\r\n },\r\n {\r\n "Effect": "Allow",\r\n "Action": [\r\n "ec2:CancelConversionTask",\r\n "ec2:CancelExportTask",\r\n "ec2:CreateImage",\r\n "ec2:CreateInstanceExportTask",\r\n "ec2:CreateTags",\r\n "ec2:DeleteTags",\r\n "ec2:DescribeConversionTasks",\r\n "ec2:DescribeExportTasks",\r\n "ec2:DescribeInstanceAttribute",\r\n "ec2:DescribeInstanceStatus",\r\n "ec2:DescribeInstances",\r\n "ec2:DescribeTags",\r\n "ec2:ImportInstance",\r\n "ec2:ImportVolume",\r\n "ec2:StartInstances",\r\n "ec2:StopInstances",\r\n "ec2:TerminateInstances",\r\n "ec2:ImportImage",\r\n "ec2:ImportSnapshot",\r\n "ec2:DescribeImportImageTasks",\r\n "ec2:DescribeImportSnapshotTasks",\r\n "ec2:CancelImportTask"\r\n ],\r\n "Resource": "*"\r\n }\r\n ]\r\n}\r\n<\/pre>\nVM Import\u306eAWS CLI\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b<\/h4>\nVM Import\u3067\u7528\u3044\u308bAWS CLI\u30b3\u30de\u30f3\u30c9\u306eJSON\u30d5\u30a9\u30fc\u30de\u30c3\u30c8<\/h5>\n\r\nvim import-image.json\r\n{\r\n "Description": "\uff1cVM\u30a4\u30e1\u30fc\u30b8\u306e\u8a73\u7d30\u8a18\u8ff0\u6b04\uff1e", \r\n "DiskContainers": [ \r\n {\r\n "Description": "\uff1c\u30c7\u30a3\u30b9\u30af\u30b3\u30f3\u30c6\u30ca\u30bf\u30b9\u30af\u306e\u8a73\u7d30\u8a18\u8ff0\u6b04\uff1e", \r\n "UserBucket": { \r\n "S3Bucket": "\uff1c\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308bVM\u30a4\u30e1\u30fc\u30b8\u3092\u914d\u7f6e\u3057\u305fS3\u30d0\u30b1\u30c3\u30c8\u540d\uff1e", \r\n "S3Key" : "\uff1c\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308bVM\u30a4\u30e1\u30fc\u30b8\u3092\u914d\u7f6e\u3057\u305f\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\uff1e" \r\n }\r\n } \r\n ]\r\n}\r\n<\/pre>\nVM Import\u3067\u7528\u3044\u308bAWS CLI\u30b3\u30de\u30f3\u30c9\u306eJSON\u4f8b<\/h5>\n
s3:\/\/my-centos-image-import\/CentOS.vmdk
\nS3\u30d0\u30b1\u30c3\u30c8\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308bVM\u30a4\u30e1\u30fc\u30b8\u3092\u4e0a\u8a18\u306e\u3088\u3046\u306b\u914d\u7f6e\u3057\u305f\u5834\u5408\u306eJSON\u306e\u4f8b\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n
\r\n{\r\n "Description": "CentOS VMDK", \r\n "DiskContainers": [ \r\n {\r\n "Description": "CentOS VM Import", \r\n "UserBucket": { \r\n "S3Bucket": "my-centos-image-import", \r\n "S3Key" : "CentOS.vmdk" \r\n }\r\n } \r\n ]\r\n}\r\n<\/pre>\nVM Import\u3067\u7528\u3044\u308bAWS CLI\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c<\/h5>\n
\u4e0a\u8a18\u3067\u4f5c\u6210\u3057\u305fJSON\u30d5\u30a1\u30a4\u30eb\u3092\u5f15\u6570\u306bAWS CLI\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n
\r\naws ec2 import-image --cli-input-json file:\/\/import-image.json\r\n<\/pre>\n\u203b\u5b9f\u884c\u3059\u308bIAM\u30e6\u30fc\u30b6\u306bIP\u5236\u9650\u3092\u4ed8\u3051\u3066\u3044\u308b\u3068\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002
\n\u3082\u3057\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u5b9f\u884c\u3067\u304d\u306a\u3044\u5834\u5408\u306b\u306fIAM\u30e6\u30fc\u30b6\u306e\u30dd\u30ea\u30b7\u30fc\u304b\u3089IP\u5236\u9650\u3092\u89e3\u9664\u3057\u3066\u8a66\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n
VM Import\u306e\u5b9f\u884c\u7d50\u679c\u30fb\u30a4\u30f3\u30dd\u30fc\u30c8\u72b6\u6cc1\u306e\u9032\u6357\u3092\u78ba\u8a8d\u3059\u308b<\/h4>\n
aws ec2 import-image\u30b3\u30de\u30f3\u30c9\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u306e\u9032\u6357\u72b6\u6cc1\u306f\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u306b\u3066\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n
\r\naws ec2 describe-import-image-tasks\r\n<\/pre>\nVM Export\u306e\u5b9f\u884c\u624b\u9806<\/h3>\n
VM Export\u306e\u5b9f\u884c\u306f\u304a\u304a\u307e\u304b\u306b\u300cVM Export\u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u305f\u30a4\u30e1\u30fc\u30b8\u3092\u4fdd\u5b58\u3059\u308bS3\u30d0\u30b1\u30c3\u30c8\u306e\u30a2\u30af\u30bb\u30b9\u8a31\u53ef\u3092\u8ffd\u52a0\u3059\u308b\u300d\u300cVM Export\u306eAWS CLI\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u300d\u306e\u624b\u9806\u3067\u884c\u3044\u307e\u3059\u3002<\/p>\n
VM Export\u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u305f\u30a4\u30e1\u30fc\u30b8\u3092\u4fdd\u5b58\u3059\u308bS3\u30d0\u30b1\u30c3\u30c8\u306e\u30a2\u30af\u30bb\u30b9\u8a31\u53ef\u3092\u8ffd\u52a0\u3059\u308b<\/h4>\n
AWS\u30de\u30cd\u30b8\u30e1\u30f3\u30c8\u30b3\u30f3\u30bd\u30fc\u30eb\u3067VM Export\u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u305f\u30a4\u30e1\u30fc\u30b8\u3092\u4fdd\u5b58\u3059\u308bS3\u30d0\u30b1\u30c3\u30c8\u306e\u30a2\u30af\u30bb\u30b9\u8a31\u53ef\u3092\u4e0b\u8a18\u306e\u5185\u5bb9\u3067\u8ffd\u52a0\u3059\u308b
\n\u88ab\u4ed8\u4e0e\u8005\uff1avm-import-export@amazon.com
\n\u6a29\u9650\uff1a\u300c\u30ea\u30b9\u30c8\u300d\u3001\u300c\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\/\u524a\u9664\u300d\u3001\u300c\u30a2\u30af\u30bb\u30b9\u8a31\u53ef\u306e\u8868\u793a\u300d<\/p>\n
VM Export\u306eAWS CLI\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b<\/h4>\n
\u4e0b\u8a18\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u8981\u9818\u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u30d1\u30e9\u30e1\u30bf\u3092\u6307\u5b9a\u3057\u3066AWS CLI\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n
VM Export\u3067\u7528\u3044\u308bAWS CLI\u30b3\u30de\u30f3\u30c9\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8<\/h5>\n\r\naws ec2 create-instance-export-task \\\r\n--description "\uff1c\u30bf\u30b9\u30af\u306e\u8a73\u7d30\u8a18\u8ff0\u6b04\uff1e" \\\r\n--instance-id \uff1c\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9ID\uff1e \\\r\n--target-environment \uff1c\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u5f62\u5f0f\uff1e \\\r\n--export-to-s3-task DiskImageFormat=\uff1c\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u30c7\u30a3\u30b9\u30af\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\uff1e,ContainerFormat=\uff1c\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u30b3\u30f3\u30c6\u30ca\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\uff1e,S3Bucket=\uff1c\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308bS3\u30d0\u30b1\u30c3\u30c8\u540d\uff1e,S3Prefix=\uff1c\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\uff1e\r\n<\/pre>\nVM Export\u3067\u7528\u3044\u308bAWS CLI\u30b3\u30de\u30f3\u30c9\u4f8b<\/h5>\n\r\naws ec2 create-instance-export-task \\\r\n--description "CentOS VM Export" \\\r\n--instance-id i-12345678 \\\r\n--target-environment vmware \\\r\n--export-to-s3-task DiskImageFormat=vmdk,ContainerFormat=ova,S3Bucket=my-centos-image-export,S3Prefix=CentOS\r\n<\/pre>\n\u4e0a\u8a18\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3055\u308c\u305f\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u30bf\u30b9\u30afID\u304cexport-i-abcdefgh\u3067\u3042\u308b\u5834\u5408\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002
\n\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u540d\uff1aCentOSexport-i-abcdefgh.ova
\n\u51fa\u529b\u3055\u308c\u308bS3\u30d1\u30b9\uff1as3:\/\/my-centos-image-export\/CentOSexport-i-abcdefgh.ova<\/p>\n
VM Export\u306e\u5b9f\u884c\u7d50\u679c\u30fb\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u72b6\u6cc1\u306e\u9032\u6357\u3092\u78ba\u8a8d\u3059\u308b<\/h4>\n
aws ec2 create-instance-export-task\u30b3\u30de\u30f3\u30c9\u306e\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u306e\u9032\u6357\u72b6\u6cc1\u306f\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u306b\u3066\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n
\r\naws ec2 describe-export-tasks --output json\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"AWS\u306b\u304a\u3044\u3066Amazon EC2\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u3001\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u306e\u4eee\u60f3\u74b0\u5883\u306eVM\u3092\u305d\u306e\u307e\u307eAmazon EC2\u3067\u79fb\u884c\u3057\u3066\u5229\u7528\u3057\u305f\u3044\u3068\u3044\u3046\u30cb\u30fc\u30ba\u306f\u591a\u304f\u767a\u751f\u3059\u308b\u3068\u601d\u3044\u307e\u3059\u3002 \u6700\u8fd1\u306eAmazon EC2\u3067\u306fWindows\u3060\u3051\u3067\u306f […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[3,81,22,29],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/posts\/2343"}],"collection":[{"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/comments?post=2343"}],"version-history":[{"count":4,"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/posts\/2343\/revisions"}],"predecessor-version":[{"id":5480,"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/posts\/2343\/revisions\/5480"}],"wp:attachment":[{"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/media?parent=2343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/categories?post=2343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.magtranetwork.com\/wp-json\/wp\/v2\/tags?post=2343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}