opnsense-starterkit icon indicating copy to clipboard operation
opnsense-starterkit copied to clipboard

AWS import does not work

Open EugenMayer opened this issue 7 years ago • 9 comments

When exporting the image to aws and importing it it fails with

 "StatusMessage": "ClientError: No valid partitions. Not a valid volume."

Tried to use MBR as the layout for the bootloader, but did not help. The image does work in KVM/VBox anyway.

could be related to the partition layout

EugenMayer avatar Jan 09 '18 13:01 EugenMayer

to import, i tried 2 things

./tools/package_for_cloud.sh and then uploaded output/cloud/disk.raw to an S3 then

imported using this as disk.json

[
 {
    "Description": "First disk",
    "Format": "raw",
    "UserBucket": {
        "S3Bucket": "vmsharekw",
        "S3Key": "opnsense/disk.raw"
    }
  }

Tried the very same with importing the OVF into vbox and exporting as an v2 OVA - same result. Also tried to use the VMDK, same result

EugenMayer avatar Jan 09 '18 13:01 EugenMayer

Hello,

For me it's works with:

  • Make a raw from a VMDK
  • Upload to S3 bucket
  • Upload a snapshot with aws ec2 import-snapshot --description "OPNSene 18.1.6" --disk-container file://containers.json
  • Convert the snapshot to image with Virtualization type to "Hardware-assisted virtualization"
  • Deploy an instance
  • Run the instance

At this time, Opnsense is load but the default interface is LAN with 192.168.1.1 IP. I have to find a workaround for that...

KevDBG avatar Jul 12 '18 19:07 KevDBG

thats awesome!

EugenMayer avatar Jul 12 '18 19:07 EugenMayer

AWS authorize only one NIC on the image ... When Opnsense start the default is LAN with autoconfigure 192.168.1.1 IP. There is no console on AWS to modify somethings in the instance. If someone have an idea !

KevDBG avatar Jul 12 '18 19:07 KevDBG

you need to predploy a configuration as I did, where you open the ssh port and activate ssh from the start + have either a default password or a predployed key. check my work for that

EugenMayer avatar Jul 13 '18 06:07 EugenMayer

It's works ! (manualy at this time, but i will check your automation asap).

Thanks for your help ! On the road again with Opnsense AMI.

KevDBG avatar Jul 13 '18 08:07 KevDBG

@Zophren any news on this?

EugenMayer avatar Sep 07 '18 06:09 EugenMayer

I haven't tested but this will probably remove the need for predeploying a configuration: https://aws.amazon.com/about-aws/whats-new/2021/03/introducing-ec2-serial-console/

iJebus avatar Apr 01 '21 04:04 iJebus

Hello,

For me it's works with:

  • Make a raw from a VMDK
  • Upload to S3 bucket
  • Upload a snapshot with aws ec2 import-snapshot --description "OPNSene 18.1.6" --disk-container file://containers.json
  • Convert the snapshot to image with Virtualization type to "Hardware-assisted virtualization"
  • Deploy an instance
  • Run the instance

At this time, Opnsense is load but the default interface is LAN with 192.168.1.1 IP. I have to find a workaround for that...

i have trying this but, when launching an instance, i got error on "Instance status check"(system status check is passed no error), how to solve this?

ec2 instance status:

{
    "InstanceStatuses": [
        {
            "AvailabilityZone": "ap-southeast-1c",
            "InstanceId": "i-xxxxxxxxxxxxxxxa8",
            "InstanceState": {
                "Code": 16,
                "Name": "running"
            },
            "InstanceStatus": {
                "Details": [
                    {
                        "ImpairedSince": "2023-08-02T07:19:00+00:00",
                        "Name": "reachability",
                        "Status": "failed"
                    }
                ],
                "Status": "impaired"
            },
            "SystemStatus": {
                "Details": [
                    {
                        "Name": "reachability",
                        "Status": "passed"
                    }
                ],
                "Status": "ok"
            }
        }
    ]
}

fiantyogalihp avatar Aug 02 '23 05:08 fiantyogalihp