-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The functionality you requested is not available in this region. #20
Comments
The "raw" image import mechanism isn't supported in all regions. Try creating a .vhd file and using the |
Thank you very much for your fast answer, I really appreciate. I tried on eu-west-2 and it brings some improvements but doesn't work either. $ /usr/local/bin/bsdec2-image-upload --uefi-preferred --sriov --ena /poudriere/releases/amd64/dev/13-stable/BUILD-LATEST/Vulture-dev-13-stable-open.raw "FreeBSD 13.4-STABLE-HBSD-amd64 UEFI-PREFERRED CLOUD-INIT ZFS" "FreeBSD/amd64 hardened/13-stable/master@87e860b522f7" eu-west-2 <bucket_name2> /aws.key
Uploading /poudriere/releases/amd64/dev/13-stable/BUILD-LATEST/Vulture-dev-13-stable-open.raw to
http://<bucket_name2>.s3.amazonaws.com/dde8ff88f816ebb532764eafef4294a0/
in 1437 part(s)............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. done.
Uploading volume manifest... done.
Importing volume: Pending: 5%....................................................................................
Importing volume: CLIENT_ERROR : RequestId: <request_id> Error: Task timed out after 900.00 seconds.........................^C
{
"ConversionTasks": [
{
"ConversionTaskId": "import-vol-729b2a1edf93dfb7t",
"ExpirationTime": "2024-12-09T17:41:17Z",
"ImportVolume": {
"AvailabilityZone": "eu-west-2a",
"BytesConverted": 0,
"Image": {
"Format": "RAW",
"ImportManifestUrl": "https://<bucket_name2>.s3.eu-west-2.amazonaws.com/d9a0f4cc6c1348218eb3d1d076f6dc61/manifest.xml?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=<creds>&X-Amz-Date=20241202T174116Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=<signature>",
"Size": 15066667008
},
"Volume": {
"Size": 15
}
},
"State": "cancelled",
"StatusMessage": "CLIENT_ERROR : RequestId: <request_id> Error: Task timed out after 900.00 seconds"
}
]
} I also tried with $ /usr/local/bin/bsdec2-image-upload --uefi-preferred --sriov --ena --vhd /poudriere/releases/amd64/dev/13-stable/BUILD-LATEST/Vulture-dev-13-stable-open.vhd "FreeBSD 13.4-STABLE-HBSD-amd64 UEFI-PREFERRED CLOUD-INIT ZFS" "FreeBSD/amd64 hardened/13-stable/master@87e860b522f7" eu-west-2 <bucket_name2> /aws.key
Uploading /poudriere/releases/amd64/dev/13-stable/BUILD-LATEST/Vulture-dev-13-stable-open.vhd to
http://<bucket_name2>.s3.amazonaws.com/5922481baecc4d2189560c21a0a3056e/snap.vhd
bsdec2-image-upload: SSL request failed: Could not write payload: Broken pipe
S3 PUT failed 1 times: /5922481baecc4d2189560c21a0a3056e/snap.vhd
bsdec2-image-upload: SSL request failed: Could not write payload: Connection reset by peer
S3 PUT failed 2 times: /5922481baecc4d2189560c21a0a3056e/snap.vhd
[...]
bsdec2-image-upload: SSL request failed: Could not write payload: Broken pipe
S3 PUT failed 10 times: /5922481baecc4d2189560c21a0a3056e/snap.vhd
bsdec2-image-upload: Failed to upload disk image Is there something missing in my policies ? {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ec2:DescribeImages",
"ec2:DeleteVolume",
"ec2:ImportVolume",
"ec2:CreateTags",
"ec2:RegisterImage",
"ec2:CreateSnapshot",
"ec2:ImportSnapshot",
"ec2:DescribeImportSnapshotTasks",
"ec2:CopyImage",
"ec2:ModifyImageAttribute",
"ec2:DescribeSnapshots",
"ec2:DescribeConversionTasks",
"ec2:DescribeImportImageTasks",
"ec2:DescribeRegions"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::<bucket_name>/*",
"arn:aws:s3:::<bucket_name2>/*"
]
}
]
} |
The policy looks fine. Did you create the 'vmimport' role? Line 29 in 6933b15
|
Yes I have, please take a look and tell me what seams incorrect: {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "vmie.amazonaws.com"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:Externalid": "vmimport"
}
}
}
]
} {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ec2:CopySnapshot",
"ec2:Describe*",
"ec2:RegisterImage",
"ec2:ModifySnapshotAttribute"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Resource": [
"arn:aws:s3:::<bucket_name>",
"arn:aws:s3:::<bucket_name2>"
]
},
{
"Sid": "VisualEditor2",
"Effect": "Allow",
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::<bucket_name>/*",
"arn:aws:s3:::<bucket_name2>/*"
]
},
{
"Sid": "VisualEditor3",
"Effect": "Allow",
"Action": [
"kms:Decrypt"
],
"Resource": [
"arn:aws:iam::<account_id>:role/vmimport"
]
}
]
} |
It is working barely with the CLI: $ aws ec2 import-image --region eu-west-3 --description "VultureOS13import" --disk-containers '[{
"Description": "FreeBSD 13.4-STABLE-HBSD-amd64 UEFI-PREFERRED CLOUD-INIT ZFS",
"Format": "vhd",
"UserBucket": {
"S3Bucket": "<bucket_name>",
"S3Key": "Vulture-dev-13-stable-open.vhd"
}
}]' But it fails at the end because BSD is not supported ? {
"ImportImageTasks": [
{
"Description": "VultureOS13import",
"ImageId": "",
"ImportTaskId": "<task_id>",
"SnapshotDetails": [
{
"DiskImageSize": 7429957120.0,
"Format": "VHD",
"Status": "completed",
"UserBucket": {
"S3Bucket": "<bucket_name>",
"S3Key": "Vulture-dev-13-stable-open.vhd"
}
}
],
"Status": "cancelled",
"StatusMessage": "CLIENT_ERROR : ClientError: Unknown OS / Missing OS files.",
"Tags": []
}
]
} |
"Import Image" only works for operating systems the AWS code knows about. My tool doesn't use that; it uses "Import Snapshot" and then registers an AMI from that. |
Alright, thank you so much for all your informations ! I finally got it working with aws-cli: aws ec2 import-snapshot --region eu-west-3 --description "VultureOS13import" --disk-container '{
"Description": "FreeBSD 13.4-STABLE-HBSD-amd64 UEFI-PREFERRED CLOUD-INIT ZFS",
"Format": "vhd",
"UserBucket": {
"S3Bucket": "<bucket_name>",
"S3Key": "Vulture-dev-13-stable-open.vhd"
}
}' But it doesn't work with bsdec2-image-upload sadly: $ /usr/local/bin/bsdec2-image-upload --uefi-preferred --sriov --ena --vhd /poudriere/releases/amd64/dev/13-stable/BUILD-LATEST/Vulture-dev-13-stable-open.vhd "FreeBSD 13.4-STABLE-HBSD-amd64 UEFI-PREFERRED CLOUD-INIT ZFS" "FreeBSD/amd64 hardened/13-stable/master@87e860b522f7" eu-west-3 <bucket_name> /aws.key
Uploading /poudriere/releases/amd64/dev/13-stable/BUILD-LATEST/Vulture-dev-13-stable-open.vhd to
http://<bucket_name>.s3.amazonaws.com/5922481baecc4d2189560c21a0a3056e/snap.vhd
bsdec2-image-upload: SSL request failed: Could not write payload: Broken pipe
S3 PUT failed 1 times: /7d505314a717f68899bacd7d76e1d60f/snap.vhd
[...]
bsdec2-image-upload: SSL request failed: Could not write payload: Broken pipe
S3 PUT failed 10 times: /7d505314a717f68899bacd7d76e1d60f/snap.vhd
bsdec2-image-upload: Failed to upload disk image Is there a debug mode ? |
No debug mode, but you're getting a failure from S3 which makes it easier. I assume How large is the |
You found the point, good catch !
source: https://docs.aws.amazon.com/AmazonS3/latest/userguide/upload-objects.html |
Ok, I'm afraid we're stuck until I get around to rewriting that code to do multipart uploads. Sorry... |
I guess for now there is still the workaround of "upload to a region which supports raw image imports and then copy to the region you care about". It's not ideal, but it should work. |
Hi,
I am trying to import an image onto AWS but get this error on eu-west-3 region.
Is it correctly passed as argument during import phase ?
The text was updated successfully, but these errors were encountered: