AusGamers Forums
Show: per page
1
Migrating VM to VPS
Red
Sydney, New South Wales
956 posts
I have a mail server running in a VM on vmware server 2. I want to somehow migrate this onto a vps, perferably one of the mammoth ones (cos damn they be cheap :D). Now I've had the official word from the team that there's no one-click import type facility, so I'm looking for some crowd support on how I might be able to achieve this kind of migration using some manner of scripting, tarring, rsyncing, red bull, jolt cola or the like.

Thoughts?
03:32pm 27/03/12 Permalink
adBot
ads
Internet
--
ads keep websites free
03:32pm 27/03/12 Permalink
do0b
Brisbane, Queensland
4237 posts
what hypervisor is the vps?
03:44pm 27/03/12 Permalink
trog
AGN Admin
Brisbane, Queensland
35972 posts
Oh that was YOU, eh!

After I wrote that I remembered that we'd had a discussion about doing an import directly via you creating a raw image of your existing OS and then importing it using our Finnix recovery CD thing. I'm just asking about that now to see if I'm making things up or if it is possible.

edit: is your existing VM Windows or Linux?
03:51pm 27/03/12 Permalink
Red
Sydney, New South Wales
957 posts
twas me indeed.

existing vm is linux, ubuntu 9.04 to be precise. running the usual assortment of goodies, lamp, postfix, courier...

you guys use Xen, right?
03:57pm 27/03/12 Permalink
trog
AGN Admin
Brisbane, Queensland
35973 posts
Yeh Xen. I'll see if I can trick Jim or Nats into dropping here and providing some more info but at a high level, it sounds possible, but involved and fiddly to do as we don't have a reliable step-by-step process to give you to get it working first go.

It sounds like the gist of it is basically create a raw disk image of your existing VM and then (using Finnix) write it to your new Mammoth VPS using dd. Nathan mentions that there's a bit of messing around with grub required to actually make it all work though.

If you have unlimited spare time and just want to give it a go let me know and I can hook you up with a discount code so you can at least try it on the cheap.
04:20pm 27/03/12 Permalink
Red
Sydney, New South Wales
958 posts
If there's one thing I have, it's free time. That makes sense. Where would the image sit while getting copied to the disk? this vm is some 18gb in size.

I know grubs. I can imagine the kinda tinkering being talked about.
04:25pm 27/03/12 Permalink
Nathan
Brisbane, Queensland
3982 posts
I dont think 9.04 has a new enough kernel, so you would have to use our Xen kernel instead rather than the distributions.

If you just have a single partition for / (and no others except swap), at a high level the process is like this
1. Get a Mammoth VPS with Ubuntu 11.10
2. In mPanel, Change its kernel to Finnix Recovery CD
3. In Finnix, start SSH and set a root password so you can scp
4. Boot your existing mail VM off a live CD
5. While using the live CD, transfer the data to the VPS. There's many options; to transfer the whole disk
dd bs=64k if=/dev/sda1 | ssh [email protected] "dd bs=64k of=/dev/xvda". Another option is to wipe /dev/xvda on the VPS with mkfs , and then rsync
6. In Finnix, mount /dev/xvda /mnt ; chroot /mnt ; vi /etc/fstab and edit to suit (eg, replace /dev/sda with /dev/xvda ) , vi /etc/network/interfaces and edit to suit.
7. In mPanel, change the kernel to 2.6.32.12 and with any luck it will boot up.

If you have multiple partitions on the existing VM your best bet is to mkfs on the VPS, and then rsync everything into the single VPS partition
04:44pm 27/03/12 Permalink
adBot
ads
Internet
--
ads keep websites free
04:44pm 27/03/12 Permalink
AusGamers Forums
Show: per page
1
This thread is archived and cannot be replied to.
 

Advertise with Us | Download Media Kit | Privacy Policy | Contact Us
© Copyright 2001-2013 AusGamers™ Pty Ltd. ACN 093 772 242.
A Mammoth Media web development, hosted by Mammoth VPS.