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?
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.
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.
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
Only Windows Server 2008 variants can be converted from VMDK to AMI.
Related
Does any one know how to migrate an instance to a hyper v environment?
Normally we do migration from a virutal environment to cloud. But we do have a request from client to move the workloads from aws to physical data center.
We run Hyper-v on the physical environment.
You can use VM Import/Export, Hyper-V is supported. The operations will be performed primarily through the aws-cli tool, there are some limitations included:
Exporting instances and volumes is subject to the following limitations:
You can't export an instance from Amazon EC2 unless you previously imported it into Amazon EC2 from another virtualization environment.
You must export your instances and volumes to one of the following image formats that your virtualization environment supports:
Open Virtual Appliance (OVA), which is compatible with VMware vSphere versions 4, 5, and 6.
Virtual Hard Disk (VHD), which is compatible with Citrix Xen and Microsoft Hyper-V virtualization products.
Stream-optimized ESX Virtual Machine Disk (VMDK), which is compatible with VMware ESX and VMware vSphere versions 4, 5, and 6.
You can't export Amazon EBS data volumes.
You can't export an instance that has more than one virtual disk.
You can't export an instance that has more than one network interface.
You can't export an instance from Amazon EC2 if you've shared it from another AWS account.
You can't have more than five export tasks per region in progress at the same time.
VMs with volumes larger than 1 TiB are not supported.
Documentation where I got this information:
https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html
I have an aws ec2 instance ( Ubuntu 14.04 ) and I have some data in it.
Also I have IBM System X 3550 machine on which Ubuntu is installed. I want copy the data from AWS instance IBM. What way you recommend ?
Use elastic ip of amazon machine and use scp.
I was reading through Rackspace's article about using Vagrant with Rackspace open cloud which shows you how you can use a vagrant vm that is hosted on a Rackspace server.
I'm wondering if there's any way that I could work from a vm that is provisioned like a Rackspace server on my local machine via Vagrant. I can't seem to find a box specifically for emulating Rackspace servers and I can't find information on what base OS and basic tools rackspace cloud servers actually use so I could provision my own environment.
Is there a place where I can find a rackspace specific vagrant box or at least find out the os info?
Edit:
Correction, it is possible, but it takes a few steps:
Export (from Rackspace) the image that you want to run locally see here for more info
Download image from Cloud Files
Convert/import the vhd file into VirtualBox see this for example
At this point, you should be able to use that image with Vagrant to run a Rackspace image locally.
I need to setup a web server and a database server on EC2.
It should be easy to migrate to another service provider later.
Currently, I have a web server and a database server, each running on separate EC2 micro instances with software installed there remotely.
Can we run a vagrant box on these micro instances with pre-installed and pre-configured softwares like LAMP stack and use that instead. So I will end with 2 vagrant boxes , one for web server another for database server.
Amazon provides already means to copy an instance but it is copied to another EC2 instance only probably .. If there is need to move to some other provider, it will be same process of re-installing all. So, an own virtual box installed on Amazon's virtual box is what i was looking into..
I don't know how good or bad it is.. I doubt if this will affect performance as well. Please share your views. Target is to have env prepared locally and have flexibility to deploy it on any service provider easily.
Running vagrant inside your AWS box is probably not the right solution. Have you looked into the Vagrant AWS provider?
That will allow you to setup and provision your AWS boxes with Vagrant and Puppet or Chef... if you are using Puppet or Chef to provision your servers then you will have a very portable "scripted" install for your servers that can easily be moved to another provider at a later date...
So running a virtual machine, on another virtual machine probably isn't the best. But if you want to install Vagrant on Amazon Linux you can do:
wget https://releases.hashicorp.com/vagrant/2.2.4/vagrant_2.2.4_x86_64.rpm
sudo rpm -ivh vagrant_2.2.4_x86_64.rpm
The RPM is the Centos version from the downloads page here: https://www.vagrantup.com/downloads.html
But then you cannot install virtualbox to run a VM. So it doesn't actually work anyways.
Is there any way of getting the saved EC2 instance image and running it on virtualbox on my personal computer?
The official way is only if it was originally imported into EC2
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ExportingEC2Instances.html
If you have previously imported an instance into Amazon EC2, you can
use the command line tools to export that instance to Citrix Xen,
Microsoft Hyper-V, or VMware vSphere. Exporting an instance can be
useful when you want to deploy a copy of your EC2 instance in your
on-site virtualization environment.
You cannot export an instance unless it was previously imported into AWS
it looks like you can directly import/export ec2 and virtualbox/vmware images.
http://aws.amazon.com/ec2/vmimport/
The amazon tool is very restrictive. But you can dump your EBS, download it and make a VDI image out of it. I have done it with two of my EC2 instances and described the steps on my blog.
http://diogomelo.net/blog/16/export-amazon-ec2-instance-to-virtualbox