Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Nov 2007 18:32:10 +0100
From:      Uwe Laverenz <uwe@laverenz.de>
To:        freebsd-questions@freebsd.org
Subject:   Re: Duplicate existing FreeBSD Server in VM
Message-ID:  <20071103173210.GA12558@laverenz.de>
In-Reply-To: <003e01c81cf2$27ff3840$77fda8c0$@com>
References:  <003e01c81cf2$27ff3840$77fda8c0$@com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 02, 2007 at 12:46:09PM +1100, Terry Sposato wrote:

> I have just installed a machine and have it setup running a web based CRM
> solution. I want to have an exact duplicate of this machine running as a VM
> for redundancy reasons. 

The best and easiest way I know of is using /usr/ports/net/rsync for
this task. I often used it to move BSD or Linux systems to new hardware
or transfer them into a VM.

I usually make sure that the kernel supports all important hardware on
the target machine and that /etc/fstab is correct. After that I start
to transfer filesystem after filesystem with e.g.:

   # rsync -avxH --delete --exclude /etc/fstab / root@target:/

You might want to exclude other files (e.g. /etc/rc.conf) from being
overwritten, I guess.

The nice thing with rsync is that only diffs are transferred, so it would
be easy and fast to keep your VM in sync with the source machine.

Uwe

P.S.:
Yesterday I moved a FreeBSD 4.5 system from a Proliant 3000 (~7 years old)
to a VMware Server VM using rsync. All I had to take care of was the use
of a GENERIC kernel, a new /etc/fstab and a changed ifconfig line in
/etc/rc.conf.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071103173210.GA12558>