You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Imran Ahmed <im...@eaxiom.net> on 2017/09/07 12:08:49 UTC

Migrating VMs from AWS to CloudStack

Hi All,
I have got a task to migrate VMs from AWS to CloudStack  (private cloud) .
Any ideas to get this done efficiently?

Regards,
Imran


Re: Migrating VMs from AWS to CloudStack

Posted by Sebastian Gomez <ti...@gmail.com>.
Puppet/Chef/Ansible will not help you to optimize the current task of
migrating your servers from AWS to CS, but will reduce you if you have to
do it again in the future. If you have to re-deploy the servers perhaps you
can think about it. Automatic setup also reduces operative tasks, reduces
human error factor, increases QoS, and of course, if you fail, you will do
it in a big way ;)

We use Scalr over AWS and Cloudstack with VMware, and once you have defined
your services with Scalr is easy to re-deploy them on the private cloud, or
on any public cloud providers like AWS, GCE or Azure.

But if you finally find a good way to do it, please don't forget sharing it!

Good luck!





Atentamente,
Sebastián Gómez

On Thu, Sep 7, 2017 at 8:11 PM, Imran Ahmed <im...@eaxiom.net> wrote:

> Hi Eric,
>
> I must thank you for your detailed advice.  I myself am a python lover and
> I
> use Ansible for automation  and DevOps. The issue here is that this aws
> account was being maintained by the customer himself. Now after we designed
> and implemented this CloudStack solution for him, the customer has asked us
> to do the complete shifting of instances  from AWS to his own CloudStack
> that we have setup for him. And that's why here I am to learn from others
> experiences and then device the final strategy and jumpstart the actual
> process.
>
> Regards,
>
> Imran
>
> -----Original Message-----
> From: Eric Green [mailto:eric.lee.green@gmail.com]
> Sent: Thursday, September 07, 2017 10:18 PM
> To: users@cloudstack.apache.org
> Subject: Re: Migrating VMs from AWS to CloudStack
>
> Not happening unless your instances on Amazon are Centos or some other
> "standard" Linux distribution, not standard Amazon Linux. Amazon Linux is
> its own thing and won't run outside the Amazon ecosphere, and Windows
> instances on AWS don't react well at all to having their hypervisor yanked
> out from under them and a new hypervisor slid under them.
>
> When I did this recently, I instead set up a Puppet server with a clone of
> the puppetry that set up my AWS instances (my full puppet configuration
> tree
> was in a git repository so that was not a big deal), modified it to set up
> the same software on Centos rather than Amazon Linux (took some slight mods
> because the standard OS packages are slightly different between the two),
> then set up some fresh instances using a template that had puppet
> pre-installed on it and the userdata scripts from my CloudFormation
> templates minus the AWS-specific bits (the userdata scripts are responsible
> for configuring the instances to connect to the puppet server with the
> proper instance type in order to do the final configuration).
>
> If you are not using a configuration management system like Puppet, Chef,
> or
> Ansible, you're doing things wrong. You've *been* doing things wrong.
> Managing a fleet of virtual machines by hand is not the way to do things in
> the 21st Century.
>
>
> > On Sep 7, 2017, at 05:08, Imran Ahmed <im...@eaxiom.net> wrote:
> >
> > Hi All,
> > I have got a task to migrate VMs from AWS to CloudStack  (private cloud)
> .
> > Any ideas to get this done efficiently?
> >
> > Regards,
> > Imran
> >
>
>

RE: Migrating VMs from AWS to CloudStack

Posted by Imran Ahmed <im...@eaxiom.net>.
Hi Eric,

I must thank you for your detailed advice.  I myself am a python lover and I
use Ansible for automation  and DevOps. The issue here is that this aws
account was being maintained by the customer himself. Now after we designed
and implemented this CloudStack solution for him, the customer has asked us
to do the complete shifting of instances  from AWS to his own CloudStack
that we have setup for him. And that's why here I am to learn from others
experiences and then device the final strategy and jumpstart the actual
process.

Regards,

Imran 

-----Original Message-----
From: Eric Green [mailto:eric.lee.green@gmail.com] 
Sent: Thursday, September 07, 2017 10:18 PM
To: users@cloudstack.apache.org
Subject: Re: Migrating VMs from AWS to CloudStack

Not happening unless your instances on Amazon are Centos or some other
"standard" Linux distribution, not standard Amazon Linux. Amazon Linux is
its own thing and won't run outside the Amazon ecosphere, and Windows
instances on AWS don't react well at all to having their hypervisor yanked
out from under them and a new hypervisor slid under them.

When I did this recently, I instead set up a Puppet server with a clone of
the puppetry that set up my AWS instances (my full puppet configuration tree
was in a git repository so that was not a big deal), modified it to set up
the same software on Centos rather than Amazon Linux (took some slight mods
because the standard OS packages are slightly different between the two),
then set up some fresh instances using a template that had puppet
pre-installed on it and the userdata scripts from my CloudFormation
templates minus the AWS-specific bits (the userdata scripts are responsible
for configuring the instances to connect to the puppet server with the
proper instance type in order to do the final configuration). 

If you are not using a configuration management system like Puppet, Chef, or
Ansible, you're doing things wrong. You've *been* doing things wrong.
Managing a fleet of virtual machines by hand is not the way to do things in
the 21st Century.


> On Sep 7, 2017, at 05:08, Imran Ahmed <im...@eaxiom.net> wrote:
> 
> Hi All,
> I have got a task to migrate VMs from AWS to CloudStack  (private cloud) .
> Any ideas to get this done efficiently?
> 
> Regards,
> Imran
> 


Re: Migrating VMs from AWS to CloudStack

Posted by Eric Green <er...@gmail.com>.
Not happening unless your instances on Amazon are Centos or some other "standard" Linux distribution, not standard Amazon Linux. Amazon Linux is its own thing and won't run outside the Amazon ecosphere, and Windows instances on AWS don't react well at all to having their hypervisor yanked out from under them and a new hypervisor slid under them.

When I did this recently, I instead set up a Puppet server with a clone of the puppetry that set up my AWS instances (my full puppet configuration tree was in a git repository so that was not a big deal), modified it to set up the same software on Centos rather than Amazon Linux (took some slight mods because the standard OS packages are slightly different between the two), then set up some fresh instances using a template that had puppet pre-installed on it and the userdata scripts from my CloudFormation templates minus the AWS-specific bits (the userdata scripts are responsible for configuring the instances to connect to the puppet server with the proper instance type in order to do the final configuration). 

If you are not using a configuration management system like Puppet, Chef, or Ansible, you're doing things wrong. You've *been* doing things wrong. Managing a fleet of virtual machines by hand is not the way to do things in the 21st Century.


> On Sep 7, 2017, at 05:08, Imran Ahmed <im...@eaxiom.net> wrote:
> 
> Hi All,
> I have got a task to migrate VMs from AWS to CloudStack  (private cloud) .
> Any ideas to get this done efficiently?
> 
> Regards,
> Imran
> 


Re: Migrating VMs from AWS to CloudStack

Posted by Ivan Kudryavtsev <ku...@bw-sw.com>.
Hi, if you have LVM2, you can try to dd snapshot to barely deployed VM with
livecd (dd + gzip | ssh dd).

7 сент. 2017 г. 19:47 пользователь "Erik Weber" <te...@gmail.com>
написал:

> On Thu, Sep 7, 2017 at 2:08 PM, Imran Ahmed <im...@eaxiom.net> wrote:
> > Hi All,
> > I have got a task to migrate VMs from AWS to CloudStack  (private cloud)
> .
> > Any ideas to get this done efficiently?
>
> Your most efficient long term bet is probably to re-deploy everything
> using some sort of automation (ansible, puppet, chef, cfengine, salt,
> ++).
> That way it'll be even easier next time or if you need more of the same.
>
> --
> erik
>

Re: Migrating VMs from AWS to CloudStack

Posted by Rodrigo Baldasso <ro...@loophost.com.br>.
Hello

Use r1soft to take an imagem from that vm's and deploy a new VM in CS with
the same partitioning, then use r1soft bare metal restore and you're set.
Exactly the same VM on your new platform.

Enviado de GMail Mobile

Em 7 de set de 2017 10:20, "Dag Sonstebo" <Da...@shapeblue.com>
escreveu:

> Taking into account Ivan and Makrands suggestions – if you did manage to
> dd the image off the EC2 instance you could use qemu-img to convert it from
> raw to qcow2. Your challenge is going to be how to get the raw image out of
> EC2 and onto on premise storage or an S3 bucket.
>
> Overall though – I agree with Erik – the effort this is going to take you
> is possibly better spent rebuilding and automating a fresh rollout on
> premise. Even if you did succeed I could see you having a lot of niggles
> with the exported VMs.
>
> Regards,
> Dag Sonstebo
> Cloud Architect
> ShapeBlue
>
> On 07/09/2017, 13:54, "Makrand" <ma...@gmail.com> wrote:
>
>     Take a note that AWS used XEN (Open source) hyeprvisor for EC2. Even
> if you
>     get your VM exported somehow, importing it into ACS on KVM will be an
> issue.
>
>
>
>     --
>     Makrand
>
>
>
> Dag.Sonstebo@shapeblue.com
> www.shapeblue.com
> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
> @shapeblue
>
>
>
> On Thu, Sep 7, 2017 at 6:17 PM, Erik Weber <te...@gmail.com> wrote:
>
>     > On Thu, Sep 7, 2017 at 2:08 PM, Imran Ahmed <im...@eaxiom.net>
> wrote:
>     > > Hi All,
>     > > I have got a task to migrate VMs from AWS to CloudStack  (private
> cloud)
>     > .
>     > > Any ideas to get this done efficiently?
>     >
>     > Your most efficient long term bet is probably to re-deploy everything
>     > using some sort of automation (ansible, puppet, chef, cfengine, salt,
>     > ++).
>     > That way it'll be even easier next time or if you need more of the
> same.
>     >
>     > --
>     > erik
>     >
>
>
>

Re: Migrating VMs from AWS to CloudStack

Posted by Dag Sonstebo <Da...@shapeblue.com>.
Taking into account Ivan and Makrands suggestions – if you did manage to dd the image off the EC2 instance you could use qemu-img to convert it from raw to qcow2. Your challenge is going to be how to get the raw image out of EC2 and onto on premise storage or an S3 bucket.

Overall though – I agree with Erik – the effort this is going to take you is possibly better spent rebuilding and automating a fresh rollout on premise. Even if you did succeed I could see you having a lot of niggles with the exported VMs.

Regards,
Dag Sonstebo
Cloud Architect
ShapeBlue

On 07/09/2017, 13:54, "Makrand" <ma...@gmail.com> wrote:

    Take a note that AWS used XEN (Open source) hyeprvisor for EC2. Even if you
    get your VM exported somehow, importing it into ACS on KVM will be an issue.
    
    
    
    --
    Makrand
    
    
    
Dag.Sonstebo@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
  
 

On Thu, Sep 7, 2017 at 6:17 PM, Erik Weber <te...@gmail.com> wrote:
    
    > On Thu, Sep 7, 2017 at 2:08 PM, Imran Ahmed <im...@eaxiom.net> wrote:
    > > Hi All,
    > > I have got a task to migrate VMs from AWS to CloudStack  (private cloud)
    > .
    > > Any ideas to get this done efficiently?
    >
    > Your most efficient long term bet is probably to re-deploy everything
    > using some sort of automation (ansible, puppet, chef, cfengine, salt,
    > ++).
    > That way it'll be even easier next time or if you need more of the same.
    >
    > --
    > erik
    >
    


Re: Migrating VMs from AWS to CloudStack

Posted by Nux! <nu...@li.nux.ro>.
Hello,

For conversion have a look at libguestfs, v2v etc. It can be done provided you managet to somehow get an image of the VMs.

I know people who migrated their cloudstacks from Xenserver to KVM using these tools.

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro

----- Original Message -----
> From: "Makrand" <ma...@gmail.com>
> To: "users" <us...@cloudstack.apache.org>
> Sent: Thursday, 7 September, 2017 13:54:41
> Subject: Re: Migrating VMs from AWS to CloudStack

> Take a note that AWS used XEN (Open source) hyeprvisor for EC2. Even if you
> get your VM exported somehow, importing it into ACS on KVM will be an issue.
> 
> 
> 
> --
> Makrand
> 
> 
> On Thu, Sep 7, 2017 at 6:17 PM, Erik Weber <te...@gmail.com> wrote:
> 
>> On Thu, Sep 7, 2017 at 2:08 PM, Imran Ahmed <im...@eaxiom.net> wrote:
>> > Hi All,
>> > I have got a task to migrate VMs from AWS to CloudStack  (private cloud)
>> .
>> > Any ideas to get this done efficiently?
>>
>> Your most efficient long term bet is probably to re-deploy everything
>> using some sort of automation (ansible, puppet, chef, cfengine, salt,
>> ++).
>> That way it'll be even easier next time or if you need more of the same.
>>
>> --
>> erik

Re: Migrating VMs from AWS to CloudStack

Posted by Makrand <ma...@gmail.com>.
Take a note that AWS used XEN (Open source) hyeprvisor for EC2. Even if you
get your VM exported somehow, importing it into ACS on KVM will be an issue.



--
Makrand


On Thu, Sep 7, 2017 at 6:17 PM, Erik Weber <te...@gmail.com> wrote:

> On Thu, Sep 7, 2017 at 2:08 PM, Imran Ahmed <im...@eaxiom.net> wrote:
> > Hi All,
> > I have got a task to migrate VMs from AWS to CloudStack  (private cloud)
> .
> > Any ideas to get this done efficiently?
>
> Your most efficient long term bet is probably to re-deploy everything
> using some sort of automation (ansible, puppet, chef, cfengine, salt,
> ++).
> That way it'll be even easier next time or if you need more of the same.
>
> --
> erik
>

Re: Migrating VMs from AWS to CloudStack

Posted by Erik Weber <te...@gmail.com>.
On Thu, Sep 7, 2017 at 2:08 PM, Imran Ahmed <im...@eaxiom.net> wrote:
> Hi All,
> I have got a task to migrate VMs from AWS to CloudStack  (private cloud) .
> Any ideas to get this done efficiently?

Your most efficient long term bet is probably to re-deploy everything
using some sort of automation (ansible, puppet, chef, cfengine, salt,
++).
That way it'll be even easier next time or if you need more of the same.

-- 
erik

RE: Migrating VMs from AWS to CloudStack

Posted by Imran Ahmed <im...@eaxiom.net>.
Hi Dag,

Thanks for the link.   Also  I am using  KVM  and CS 4.9

Cheers,

Imran

-----Original Message-----
From: Dag Sonstebo [mailto:Dag.Sonstebo@shapeblue.com] 
Sent: Thursday, September 07, 2017 5:33 PM
To: users@cloudstack.apache.org
Subject: Re: Migrating VMs from AWS to CloudStack

Also – take a look at http://docs.aws.amazon.com/vm-import/latest/userguide/what-is-vmimport.html - in short EC2 only lets you export VMs which have been previously imported, not natively created.

Regards,
Dag Sonstebo
Cloud Architect
ShapeBlue

On 07/09/2017, 13:28, "Dag Sonstebo" <Da...@shapeblue.com> wrote:

    Which hypervisor are you using in CloudStack?
    
    Regards,
    Dag Sonstebo
    Cloud Architect
    ShapeBlue
    
    On 07/09/2017, 13:08, "Imran Ahmed" <im...@eaxiom.net> wrote:
    
        Hi All,
        I have got a task to migrate VMs from AWS to CloudStack  (private cloud) .
        Any ideas to get this done efficiently?
        
        Regards,
        Imran
        
        
    
    
    Dag.Sonstebo@shapeblue.com 
    www.shapeblue.com
    53 Chandos Place, Covent Garden, London  WC2N 4HSUK
    @shapeblue
      
     
    
    


Dag.Sonstebo@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
  
 



Re: Migrating VMs from AWS to CloudStack

Posted by Dag Sonstebo <Da...@shapeblue.com>.
Also – take a look at http://docs.aws.amazon.com/vm-import/latest/userguide/what-is-vmimport.html - in short EC2 only lets you export VMs which have been previously imported, not natively created.

Regards,
Dag Sonstebo
Cloud Architect
ShapeBlue

On 07/09/2017, 13:28, "Dag Sonstebo" <Da...@shapeblue.com> wrote:

    Which hypervisor are you using in CloudStack?
    
    Regards,
    Dag Sonstebo
    Cloud Architect
    ShapeBlue
    
    On 07/09/2017, 13:08, "Imran Ahmed" <im...@eaxiom.net> wrote:
    
        Hi All,
        I have got a task to migrate VMs from AWS to CloudStack  (private cloud) .
        Any ideas to get this done efficiently?
        
        Regards,
        Imran
        
        
    
    
    Dag.Sonstebo@shapeblue.com 
    www.shapeblue.com
    53 Chandos Place, Covent Garden, London  WC2N 4HSUK
    @shapeblue
      
     
    
    


Dag.Sonstebo@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
  
 


Re: Migrating VMs from AWS to CloudStack

Posted by Dag Sonstebo <Da...@shapeblue.com>.
Which hypervisor are you using in CloudStack?

Regards,
Dag Sonstebo
Cloud Architect
ShapeBlue

On 07/09/2017, 13:08, "Imran Ahmed" <im...@eaxiom.net> wrote:

    Hi All,
    I have got a task to migrate VMs from AWS to CloudStack  (private cloud) .
    Any ideas to get this done efficiently?
    
    Regards,
    Imran
    
    


Dag.Sonstebo@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue