Hi,

Migrating a physical server to a VM can be accomplished in different
ways.

In the case that live migration is not required, any VM will happily
accept that its virtual disks be filled from a partition image which you
can create offline using any tool you may choose (e.g. the infamous
Ghost, or my favorite : the System Rescue CD --
http://www.sysresccd.org, a free product ; the site features rather
comprehensive documentation).

Since you mentioned the VmWare Converter, I assume you may be looking at
"live" migration. If your source OS is Linux, this can be done much in
the same way the VmWare Converter would work, although it will require
either that you tune the cloned OS before you can boot the VM to the
cloned OS, and / or that you automate the changes should you need to
migrate several servers.

Quick recipe :
    - make sure you can SSH as root to your source server
    - create your destination VM
    - configure the VM to use the system rescue cd iso image for booting
    - boot the VM into sysresccd
    - partition the destination vdi(s) using either sfdisk or
parted /gparted (refer to the System Rescue CD docs)
    - if the source OS uses LVM, create snapshots of the filesystems you
want to clone
    - mount the VDI partitions you just created, after formatting them
    - rsync either the snapshots or the running filesystems from your
source machine to the corresponding VDI partition(s) you just mounted
    - tune your configuration files on the target filesystems (see
below)
    - setup the target OS's bootloader
and you should pretty much be done.

According to the distribution your source Linux server is running, you
may have to adjust /etc/fstab on the target root filesystem so that
partitions are mounted by device names.
If you wish to change the hostname and IP address for the VM so that you
can run the source and clone side by side until you've made sure that
migration was successfull, you'll have to adjust the target OS's
configuration files accordingly.

As an example, you may :
    #: for file in `grep -RH <old_hostname> /etc 2>/dev/null | cut -f1
-d: | sort --unique`; do echo $file ; sed -e  -i
's/<old_hostname>/<new_hostname>/g'  $file ; done
(for a one liner)
The above will :
    - list all files in /etc which contain <old_hostname> (insert actual
value here, of course)
    - replace <old_hostname> with <new_hostname> wherever it appears in
each of the reported files

You may want to begin by checking which files will be modified and their
contents ; I strongly advise to do this the first time you clone a given
distro.
Just run the command between backquotes above (from "grep" to
"--unique") without the backquotes on a single line to make sure you do
not get superfluous matches, then open each file in some editor (unless
you've no doubt at all as to their contents:), and check whether the
value you want to replace can actually be changed everywhere it appears.
Obviously the same method may be used to adjust any other value on the
target OS.

As to the boot loader, you'll want to chroot to the target root
filesystem in order to set it up. Please refer to the documentation for
lilo or grub to get it right.

Apologies if this summary feels either too short or too long. Better too
much said than too little, isn't it ?
Should it be too little, you may send me a private message so as not to
discuss issues that are purely OS-related and do not pertain to VBox on
this list.

On a side note, the VmWare Converter will actually convert a linux
server to a VM, but AFAIK only if you can use a VmWare Infrastructure
product, which is not only costly (tens of thousands if I'm not misled)
but may also require a dedicated server.

Regards,

Dr. Moe

Le vendredi 13 mars 2009 à 08:08 -0700, Michael Barto a écrit :

> I want to move both a Linux Server and a Windows 2000 server to
> Virtual Box Image. VMware has a converter Tool for Windows, but not
> for Linux and hence it is kind of useless to me.
> Does Virtual Box have a method, tool or process to do this? It is
> really needed.
> 
> -- 
> 
> 
> _________________
> Michael Barto
> Software
> Architect
> 
> 
>  LogiQwest Circle
> 
> LogiQwest Inc.
> 16458 Bolsa Chica
> Street, # 15
> Huntington Beach,
> CA  92649
> http://www.logiqwest.com/
> 
> 
>    
> mba...@logiqwest.com
> Tel:  714 377
> 3705
> Fax: 714 840 3937
> Cell: 714 883
> 1949
> 
> 
> 'tis a gift to be
>           simple 
> _________________
>  This e-mail may
> contain LogiQwest
>    proprietary
>  information and
> should be treated
> as confidential. 
> 
> _______________________________________________
> vbox-users mailing list
> vbox-users@virtualbox.org
> http://vbox.innotek.de/mailman/listinfo/vbox-users

<<inline: circle.gif>>

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée

_______________________________________________
vbox-users mailing list
vbox-users@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-users

Reply via email to