Duplicate existing FreeBSD Server in VM

Uwe Laverenz uwe at laverenz.de
Sat Nov 3 11:05:29 PDT 2007

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 at 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.


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

More information about the freebsd-questions mailing list