32

I'm using Switchvox, an Asterisk PBX and I'd like to host it on EC2.

Digium Switchvox provides an ISO which contains everything needed to host the pbx server: OS, software, etc. It's basically an image of the server.

How do I instantiate a new EC2 instance using the custom ISO they're providing?

1
  • The accepted answer to this question is no longer correct - Please unaccept and accept the highest ranked answer below Commented Mar 17, 2015 at 15:34

4 Answers 4

43

From this ISO, you can create either a VMware or VirtualBox image. Form there, you may convert this image into an EC2 AMI image and go from there.

Just make sure you are using the same arch (32 v. 64) and proper kernel.

That being said, you might get into more operations then simply fire up an existing vanilla AMI available from the community. There might be one that closely match your OS requirements.

5
  • 1
    Agreed. This is what we do. Get your VHD or VMDK file. Import it and upload it. Search for ImportInstance and ec2-upload-disk-image.
    – MJM
    Commented Apr 3, 2014 at 15:04
  • 1
    ec2 price depends on OS type. What would be the price in case custom OS is used?
    – grabantot
    Commented Aug 7, 2019 at 21:32
  • 1
    @grabantot well ec2 price varying on OS only if you go with OS such as redhat or windows. Otherwise it doesn’t have any incidence if you go with let say centos.
    – pdeschen
    Commented Aug 8, 2019 at 23:36
  • That link is currently dead.
    – d33tah
    Commented Aug 10, 2022 at 14:57
  • This doesn't work when I'm trying to use the arm64 architecture, which is used by AWS's t4g instances - since my own machine uses a different architecture, plus VMWare or VirtualBox don't even seem to support arm64, except for MacOS. What I really need is exactly what the question asked, which is installing an ISO (even arm64) to an EC2 instance. Commented Feb 27, 2023 at 12:27
12

Overview:

  • Check pre-requisites
  • Install your ISO onto VMware vSphere then export as VMDK
  • Upload your VMDK to an S3 bucket on the same AWS account
  • Install and configure AWS command line interface (CLI)
  • Setup a VM Import Service Role
  • Use the CLI to import the VM from S3 into an Amazon Machine Instance (AMI)

This is a lengthy process, so it's worth reading through the pre-requisites. Pay particular attention to the supported operating systems / Linux distributions and versions.

They clearly state "Note that you can only import VMDK files into Amazon EC2 that were created through the OVF export process in VMware."

For example, you can get a VMDK using VirtualBox, but if you try to import this you might see the following error, when checking the status:

aws ec2 describe-import-image-tasks --import-task-ids import-ami-someid

"StatusMessage": "ClientError: Disk validation failed [Unsupported VMDK File Format]"

However, there is some Oracle documentation on exporting a virtual machine in the Open Virtualization Format (OVF).

If all goes well, you can launch the newly imported AMI as usual.

2
  • 4
    Very helpful, thank you. To anyone else trying this, despite Amazon's notes, I was able to imported a VM from VirtualBox. I created the VM as a single VMDK and exported it using OVA 2. It imported just fine.
    – SOS
    Commented Aug 10, 2019 at 7:40
  • Here's a very good walkthrough, together with examples and screenshots: dev.to/otomato_io/… With it I was able to convert my VirtualBox VM to OVA 2 and import it into AWS as well.
    – Davidou
    Commented Apr 25, 2023 at 11:48
5

You can create a VMware virtual machine using your custom ISO and move it from your VMware host to EC2. Read more: VM Import/Export

-5

Only Windows Server 2008 variants can be converted from VMDK to AMI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.