# FreeBSD as a Virtual Machine



## Stra (Nov 25, 2008)

I'm in the process of consolidating several old machines into a single one, using some sort or virtualization.

Which virtual environment is best for having FreeBSD in? (This is for personal use, so any commercial products are out of the question. :\)

There's a topic stating that it doesn't work with VirtualBox, for example, so which one is best? VMWare? QEMU? Xen? KVM? Something else? The host system will probably be Linux.

Thanks!


----------



## mumahuanhun (Nov 25, 2008)

I like VMWare.


----------



## SirDice (Nov 25, 2008)

Yeah, I've got 7-STABLE running on VMWare Server 2.0. Works like a charm.


----------



## vermaden (Nov 25, 2008)

Stra said:
			
		

> There's a topic stating that it doesn't work with VirtualBox, for example, so which one is best? VMWare? QEMU? Xen? KVM? Something else? The host system will probably be Linux.



If you want to use virtualization other then FreeBSD Jails, then FreeBSD is not for you, get OpenSolaris / Solaris where you can use xVM (Xen 3.1) or VirtualBox.

You can also can run Xen 3.3 with NetBSD, just get the 5.0 BETA/SNAPSHOT.


----------



## DutchDaemon (Nov 25, 2008)

Vermaden, you're talking about FreeBSD as a virtualization host ("Dom0"), the OP is talking about FreeBSD as a virtualization guest ("DomU"), I believe.


----------



## SirDice (Nov 25, 2008)

vermaden said:
			
		

> If you want to use virtualization other then FreeBSD Jails, then FreeBSD is not for you, get OpenSolaris / Solaris where you can use xVM (Xen 3.1) or VirtualBox.
> 
> You can also can run Xen 3.3 with NetBSD, just get the 5.0 BETA/SNAPSHOT.



The wrong way around  If I understood correctly the OP wants a FreeBSD guest, not a host.


----------



## vermaden (Nov 25, 2008)

MHmm, that changes a lot 

For guest just remmeber to set *kern.hz=100* in */boot/loader.conf* 

You can generally use about everything: VirtualBox / VMware / Parallels / Xen (domU or HVM) / KVM / ...


----------



## Stra (Nov 25, 2008)

FreeBSD as a guest system, yes, that's what I meant. Thanks for the answers.

vermaden: how do you mean VirtualBox? Last time I tried FreeBSD inside one, it didn't work. And for Xen I read now on Wikipedia the support is limited.

That's why I was asking, I would like a system that will work out of the box, with as little tinkering as possible.

How many choices does that leave me with? VMWare? How about KVM/QEMU?


----------



## DutchDaemon (Nov 25, 2008)

I know someone who runs FreeBSD 7 under VMware on Vista. Everything works fine, including low-level stuff like nmap and tcpdump. Don't know about the Linux implementation of VMware, but I guess it's worth a shot.


----------



## anomie (Nov 25, 2008)

I am running a FreeBSD 6.3 guest under vmware. (The host is Windows 2003, maintained by someone else.) 

For a FBSD 6.x guest there are a couple caveats: http://ivoras.sharanet.org/freebsd/vmware.html

Also, as mentioned, read this thread to understand/fix a clock issue you'll see: http://daemonforums.org/showthread.php?t=1824

I installed the vmware tools (vmware-freebsd-tools.tar.gz) from the vmware cd so that the host could send shutdown signals to the guest.


----------

