Moving VM hosts with ubuntu install

Stephen cryptworks at gmail.com
Thu Feb 18 08:35:10 MST 2010


a weird little LAMP (weird fro the tasks its doing more than install)
lots of little things installed some of which are not in the normal
repos i have found. and it started as a dev box and then was moved to
production as the tools were intensely popular.

The Xenserver is getting decommissioned in favor of a different
platform (as it is nearly impossible to convert Xen VM's to anything
else)

On Wed, Feb 17, 2010 at 7:03 PM, Lisa Kachold <lisakachold at obnosis.com> wrote:
> User boxen only?  Development system or server?
>
> Each includes a little variation, but KitePilot wins the award on this one.
>
> Clear as mud?
>
> On Wed, Feb 17, 2010 at 5:51 PM, kitepilot at kitepilot.com
> <kitepilot at kitepilot.com> wrote:
>>
>> Option 3 will not work if the machine is running, add I think dd is a can
>> of
>> worms...
>>
>> I have done this some 921752163 times, so here is my cookbook:
>> 1.- Boot both puters with a CD, Ubuntu install will work, but you'll have
>> to
>> "apt-get install ssh" in at least one of them, and set a password for
>> root.
>> For the sake of example, I'll assume that both computers are booted from
>> CD,
>> that both are running SSH and that you are comfortably sitting at your
>> desk
>> with one xterm open in each one.  For the sake of example also, I'll also
>> assume that your src puter's HD has only one filesystem.
>>
>> 2.- In SRC puter do "mount -ext? -o ro /dev/sda? /mnt"
>> (Make RO as safety net...)
>>
>> 3.- In DST puter do:
>> mke2fs -Text4 -U USE-UUID-FROM-SRCputer-HERE /dev/sda1
>> "mount -text? /dev/sda? /mnt"
>>
>> 4.- In SRC puter do:
>> rsync -XHav --checksum --super /mnt/ root at DSTputer:/mnt
>> Go get a pizza...
>>
>> 5.- Reinstall grub, if you used the -U option, the UUIDs are OK and you
>> don't have to tinker with menu.lst.
>>
>> 7.- Verify that /etc/fstab matches your new parameters, including swap.
>> Either assign the same UUID to the swap partition or update /etc/fstab.
>>
>> 8.- Reboot your new puter and enjoy the ride...   :)
>>
>> There are only 245326532456 +1 variations to this recipe, but it has
>> worked
>> flawlessly for me for years.
>> If you want to change the hostname, it may be more involving than just
>> changing /etc/hostname, but I won't go there...
>> YMMV
>> ET
>>
>> PS: If you have any question you will get any answer...   :)
>>
>>
>>
>>
>>
>> Kevin Fries writes:
>>
>> > Tricky question not because it is hard, but because there are multiple
>> > answers depending on what you are trying to achieve.
>> >
>> > Option 1 - backup the installed packages, etc, var, home then have
>> > Ubuntu simply install all your packages again (google for get-selections).
>> >  This lets you move and upgrade at the same time (single core to multicore,
>> > etc)
>> >
>> > Option 2 - create a dd disk image of each of your partitions to a
>> > removable hard drive.  Then recreate your partition scheme on the new
>> > machine (sfdisk makes this very easy), then restore you partitions.  This
>> > will essentially clone your existing machine, exactly as before.  Also great
>> > for tuning a standalone into a VM
>> >
>> > Option 3 - tar your system, then untar it on the new machine.  Quite
>> > simple, but effective.  You won't get new packages like you would in opion
>> > 1, but you can change your partition sizes unlike option 2.
>> >
>> > Linux is quite flexible, with a little more info, we could probably help
>> > you decide the best coarse of action.
>> >
>> > Good luck
>> > Kevin
>> >
>> > Sent from my Nokia phone
>> > -----Original Message-----
>> > From: Stephen
>> > Sent:  02/17/2010 4:09:44 PM
>> > Subject:  Moving VM hosts with ubuntu install
>> >
>> > What is the best suggestion for moving an Ubuntu installation?
>> >
>> > I'm guessing a form of Backup and restore, but this oddly enough is
>> > not something i have done before in Linux.
>> >
>> > anyone have some place i should start?
>> >
>> > --
>> > A mouse trap, placed on top of your alarm clock, will prevent you from
>> > rolling over and going back to sleep after you hit the snooze button.
>> >
>> > Stephen
>> > ---------------------------------------------------
>> > PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
>> > To subscribe, unsubscribe, or to change your mail settings:
>> > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>> >
>> > ---------------------------------------------------
>> > PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
>> > To subscribe, unsubscribe, or to change your mail settings:
>> > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>> ---------------------------------------------------
>> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
>> To subscribe, unsubscribe, or to change your mail settings:
>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
>
>
> --
> Skype: (623)239-3392
> AT&T: (503)754-4452
> http://www.obnosis.com
> http://uncyclopedia.wikia.com/wiki/Linux_Users_Anonymous
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>



-- 
A mouse trap, placed on top of your alarm clock, will prevent you from
rolling over and going back to sleep after you hit the snooze button.

Stephen


More information about the PLUG-discuss mailing list