#
Import Flight Solo Image to AWS
Several different cloud hosting services can use the downloaded Flight Solo image. This page shall describe how to do it with AWS. This only needs to be done once, and then the imported image can be used multiple times.
#
Setting up a bucket
To set this up, you will need to install the AWS Command Line Interface(CLI). Confirm that you have the prerequisites for the AWS CLI.
Install the AWS CLI by following the AWS guide.
Configure basic the basic AWS CLI by following this guide. There is more information about configuration in other parts of the AWS documentation.
Download the Flight Solo AWS image here.
You will need to create a bucket, this is covered by the AWS documentation
Create a directory in the bucket and upload the Flight Solo image either on the CLI or on the Web Interface.
- Upload the downloaded Flight Solo image to a directory called
images
in the S3 bucket with this command:
aws s3 cp SOLO2-2022.2-0211221545_aws.raw s3://<bucketname>/images/
- Wait until it has finished uploaded before proceeding.
- Go to the AWS S3 Web Interface for buckets. It should look like this:
Make sure that your region is set correctly.
- Click on your bucket to view it.
- This is what it should look like:
- Make a folder by clicking "Make Folder" and name it
images
.
Click "Create Folder" to finish creation.
Enter the
images
folder by clicking on its name.
- Click on "Upload" to open the upload screen. Click on "Add Files", and select the downloaded Flight Solo image.
- Click "Upload" to begin uploading, and wait for it to complete before proceeding.
#
Import as Disk Snapshot
- Create a vmimport policy file to enable vm import operations. Make a file called
trust-policy.json
with these contents:
{
"Version": "2022-11-03",
"Statement": [
{
"Effect": "Allow",
"Principal": { "Service": "vmie.amazonaws.com" },
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals":{
"sts:Externalid": "vmimport"
}
}
}
]
}
- Create a role from the vmimport policy file.
aws iam create-role --role-name vmimport --assume-role-policy-document "file://trust-policy.json"
- Create a bucket association with the vmimport role in a file called
role-policy.json
, replacing<bucketname>
with the name of your S3 bucket.
{
"Version": "2022-11-03",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:GetObject",
"s3:ListBucket",
"s3:PutObject",
"s3:GetBucketAcl"
],
"Resource": [
"arn:aws:s3:::<bucketname>",
"arn:aws:s3:::<bucketname>/*"
]
},
{
"Effect": "Allow",
"Action": [
"ec2:ModifySnapshotAttribute",
"ec2:CopySnapshot",
"ec2:RegisterImage",
"ec2:Describe*"
],
"Resource": "*"
}
]
}
- Apply the role policy.
aws iam put-role-policy --role-name vmimport --policy-name vmimport --policy-document "file://role-policy.json"
- Create a file called
containers.json
with raw disk image information. These are the contents (replace<bucketname>
with your bucket name):
{
"Description": "SOLO2-2022.2-0211221545_aws.raw",
"Format": "raw",
"UserBucket": {
"S3Bucket": "<bucketname>",
"S3Key": "images/SOLO2-2022.2-0211221545_aws.raw"
}
}
- Import the raw image as a disk snapshot.
aws ec2 import-snapshot --description "SOLO2-2022.2-0211221545_aws.raw" --disk-container "file://containers.json"
- Wait until the import is complete. You can check the progress with this command: (replace the import task ID with the ID output of the previous command)
aws ec2 describe-import-snapshot-tasks --import-task-ids import-snap-00000000000000000
#
Create AMI from Snapshot
- Navigate to the snapshots page of AWS EC2. It should look something like this:
Make sure that your region is set correctly.
Locate the newly created snapshot
Right-click on the snapshot and select "Create image from snapshot".
- Name it something descriptive like
Flight Solo
.
- Set the Size to at least 8 GB.
Leave everything else default.
Click "Create Image" to create the AMI. The creation process can take several minutes to complete.