Re: Cloning a FreeBSD system

2012-03-03 Thread Fbsd8

Stephen Cook wrote:

On 3/2/2012 11:57 PM, Shane Ambler wrote:

On 28/02/2012 03:24, Stephen Cook wrote:

I have FreeBSD 9.0 installed as a VirtualBox guest, and I plan on
cloning it repeatedly to set up a fake network for me to toy with (e.g.
setting up clusters of replicated databases, web server pools, etc).


Another option to look at is using FreeBSD's Jails. Handbook chapter 16

Basically you can setup multiple jails on the machine that use the
kernel of the base system (so it's not an entire emulated machine) but
each jail has it's own environment, apps etc.



I read up on jails and I am impressed, I had a vague idea about them but 
they are apparently a lot more powerful than I thought. This will get 
some use from me in the future when I'm setting up real servers.


However, for what I'm currently doing, I want to stick with a bunch of 
VirtualBox VMs so I can simulate database failover by killing the VM in 
rude way, dynamically throw another machine into the mix, etc.


Thanks!

-- Stephen



Cloning or duplicating a running system using dump/restore
http://forums.freebsd.org/showthread.php?t=11680


You should check out the qjail port for simple jail cloning.
Only takes 30 seconds to clone a jail.
http://qjail.sourceforge.net/

Both vm's and jails are targeted by ip address, killing one results in 
same outcome on the network no matter which one you use. I don't use 
Virtual Box but if it does not have a dump/restore function then cloning 
at that level is not possible.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cloning a FreeBSD system

2012-03-02 Thread Shane Ambler

On 28/02/2012 03:24, Stephen Cook wrote:

Hello all!

I'm relatively new to FreeBSD but I'm enjoying it so far.

I have FreeBSD 9.0 installed as a VirtualBox guest, and I plan on
cloning it repeatedly to set up a fake network for me to toy with (e.g.
setting up clusters of replicated databases, web server pools, etc).


Another option to look at is using FreeBSD's Jails. Handbook chapter 16

Basically you can setup multiple jails on the machine that use the 
kernel of the base system (so it's not an entire emulated machine) but 
each jail has it's own environment, apps etc.



---

Shane Ambler
FreeBSD (at) ShaneWare (dot) Biz

http://ShaneWare.Biz
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cloning a FreeBSD system

2012-03-02 Thread Stephen Cook

On 3/2/2012 11:57 PM, Shane Ambler wrote:

On 28/02/2012 03:24, Stephen Cook wrote:

I have FreeBSD 9.0 installed as a VirtualBox guest, and I plan on
cloning it repeatedly to set up a fake network for me to toy with (e.g.
setting up clusters of replicated databases, web server pools, etc).


Another option to look at is using FreeBSD's Jails. Handbook chapter 16

Basically you can setup multiple jails on the machine that use the
kernel of the base system (so it's not an entire emulated machine) but
each jail has it's own environment, apps etc.



I read up on jails and I am impressed, I had a vague idea about them but 
they are apparently a lot more powerful than I thought. This will get 
some use from me in the future when I'm setting up real servers.


However, for what I'm currently doing, I want to stick with a bunch of 
VirtualBox VMs so I can simulate database failover by killing the VM in 
rude way, dynamically throw another machine into the mix, etc.


Thanks!

-- Stephen
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cloning a FreeBSD system

2012-02-27 Thread Damien Fleuriot


On 2/27/12 5:54 PM, Stephen Cook wrote:
 Hello all!
 
 I'm relatively new to FreeBSD but I'm enjoying it so far.
 
 I have FreeBSD 9.0 installed as a VirtualBox guest, and I plan on
 cloning it repeatedly to set up a fake network for me to toy with (e.g.
 setting up clusters of replicated databases, web server pools, etc).
[snip]
 3) Create new SSH keys
 3a) For host keys, I can delete the existing ones in /etc/ssh/ and
 reboot, is there a better way?
 3b) Should I bother changing the SSH keys for any users I have? It
 is basically one user (I use to log in with) which will be the same
 across the board anyway.
 

Why bother changing keys if this is only a fake network for you to toy
with ?
Let them be.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cloning a FreeBSD system

2012-02-27 Thread Adam Vande More
On Mon, Feb 27, 2012 at 10:54 AM, Stephen Cook scli...@gmail.com wrote:


2a) I saw (on the internet) some people having problems because
 VirtualBox generates a new MAC address for cloned machines, which somehow
 screws up the naming of the network interfaces (e.g. they get renumbered,
 thereby ignoring any configuration you have set up). Now I can't find it
 anymore, at least not for FreeBSD. Some Linux forums have info about
 /etc/udev/rules.d/70-**persistent-net.rules which doesn't exist in
 FreeBSD as far as I can tell. Is this a concern? I don't seem to be having
 a problem but TBH I'd rather understand what is going on than just be lucky.


You can set the MAC address statically in the VB machine.  I don't know if
it changes it by cloning a system, but even if it does you can change to
what you want even with the GUI tools.

FreeBSD doesn't use udev, and you should be thankful for it.  What a
nightmare when you want to do advanced things with your NIC's.  What I'm
guessing your reading about are people who have multiple nic's in the Vbox
guest, and upon cloning mac addresses are changed for the devices.  Since
Linux device detection doesn't enumerate things the same way each time they
created udev so devices would appear to have this.  Well as you've seen
evidence of, this doesn't work so well when tryin to script things on
unknown devices.  All this trouble to save a few seconds of boot time.


 3) Create new SSH keys
3a) For host keys, I can delete the existing ones in /etc/ssh/ and
 reboot, is there a better way?


ssh-keygen(1) is the typical method.


-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cloning a FreeBSD system

2012-02-27 Thread Damien Fleuriot


On 2/27/12 7:05 PM, Adam Vande More wrote:
 On Mon, Feb 27, 2012 at 10:54 AM, Stephen Cook scli...@gmail.com wrote:
 
 3) Create new SSH keys
3a) For host keys, I can delete the existing ones in /etc/ssh/ and
 reboot, is there a better way?

 
 ssh-keygen(1) is the typical method.
 

Or just delete the existing keys and sshd will recreate them at first
boot ;)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Cloning a FreeBSD system

2012-02-27 Thread Michael Sierchio
On Mon, Feb 27, 2012 at 10:21 AM, Damien Fleuriot m...@my.gd wrote:

 ssh-keygen(1) is the typical method.


 Or just delete the existing keys and sshd will recreate them at first
 boot ;)

No, sshd will not create the keys.  They are created by
/etc/rc.d/sshd, which invokes ssh-keygen if it doesn't find the key
files.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org