Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Easiest way to move entire Amazon Linux VM?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Easiest way to move entire Amazon Linux VM?

SirFoxySirFoxy Member

What would be the easiest way to move an entire Amazon Linux VM?

I can handle a lot of things Linux, but this puzzles me being it runs on Amazon Linux, aka Cent OS 6 and the entire setup was done by an outsourced programmer.

Essentially I'm trying to move it off Amazon to my own infrastructure.

It'd have to be the entire disk, because of dependencies.

And I'm pretty sure the VM is powered by Xen. Which the new one would be KVM, which further complicates.

Comments

  • FalzoFalzo Member

    if it's based on centos 6, I'd simply try to set up a replacement VM with centos 6, then rsync everything into a folder of that box and carefully replace the essential directories. ideally in rescue mode/netboot. exclude network config and such and check for kernel-version as you probably want to be as close as possible to the original.

    after that hope that it comes on after a reboot, if not try to check what's missing.
    eventually update/upgrade packages after that to get to actual version with correct depencies in centos.

    have done this before from a xen VM to kvm with a more or less simple LAMP setup in debian and it worked, so I'd at least give it a try.

    Thanked by 2SirFoxy vimalware
  • SirFoxySirFoxy Member

    @Falzo said:
    if it's based on centos 6, I'd simply try to set up a replacement VM with centos 6, then rsync everything into a folder of that box and carefully replace the essential directories. ideally in rescue mode/netboot. exclude network config and such and check for kernel-version as you probably want to be as close as possible to the original.

    after that hope that it comes on after a reboot, if not try to check what's missing.
    eventually update/upgrade packages after that to get to actual version with correct depencies in centos.

    have done this before from a xen VM to kvm with a more or less simple LAMP setup in debian and it worked, so I'd at least give it a try.

    I've tried something very similar to this before, but it seems a direct Cent OS 6 and Amazon Linux port doesn't work like it should even though it is based on Cent OS 6.

    It would get stuck on boot.

    I can always try again, could have f#%ked it up.

    Thanked by 1Falzo
  • donlidonli Member

    Have you tried some of the solutions discussed in this thread:
    https://www.lowendtalk.com/discussion/157529/backup-and-restore-kvm-solution

  • SirFoxySirFoxy Member
    edited May 2019

    @donli said:
    Have you tried some of the solutions discussed in this thread:
    https://www.lowendtalk.com/discussion/157529/backup-and-restore-kvm-solution

    I have tried using DD and removing things such as network configs.

    Resulted in booting into the Amazon Linux loading page, but no further.

    Might try creating a Xen VPS and seeing if it works? Don't know.

  • nullnotherenullnothere Member
    edited May 2019

    A few things to look into:

    a) UUIDs and changes (does not apply if you use dd, but it never hurts to check).

    b) Grub - get into rescue mode on the new vps and reinstall grub.

    c) fstab entries - sometimes there are vda vs sda type of differences. You're safe if you're using labels or uuids but check

    d) Don't forget the swap partition/setup (or temporarily disable it in fstab)

    e) network interface naming issues - may bite you.

    f) you said you've already taken care of the network interfaces and address changes - so you're probably covered here.

    (edit: P.S: I've typically used rsync to do all kinds of xen - kvm - openvz type changes and setups, all combinations I must add, and as long as I take care of the above list, I've mostly managed just fine. OpenVZ of course doesn't have grub/boot/kernel).

    Thanked by 1SirFoxy
Sign In or Register to comment.