How to make a FreeBSD vm in virtualbox.

Alfred Perlstein alfred at freebsd.org
Wed Dec 31 06:04:39 UTC 2014


On Dec 30, 2014, at 8:24 PM, Glen Barber wrote:

> On Tue, Dec 30, 2014 at 07:42:36PM -0800, Alfred Perlstein wrote:
>> After he linked it to me, I decided that it would make sense if
>> this was scripted and would really make sense as part of the release
>> process.
>> 
> 
> We already provide VMDK images.  There is nothing, that I can see, that
> is different from how I've been testing the various images.  Creating
> a new VM and attaching the VMDK to the disk controller is the intended
> workflow.

The difference is that with a vmdk you must get the exact combinations of items correct or you will wind up with a FreeBSD instance that will not boot.  With the ova, you just run a single command "VBoxManage FreeBSD.ova" and stuff "just works", or you can even just double click on the downloaded file from within your OS X / Windows/ whatever host and it "just works".


> 
>> I've written a script that will make a .ova that you can one-click
>> import into Virtualbox (and I think Fusion as well) here:
>> 
>>  https://gist.github.com/splbio/84bd4d2122782e99fc5c
>> 
> 
> Can you send the script as an attachment?

Uh sure.  It's attached.

For updates you can check here:
https://github.com/splbio/freebsd-vmtools/blob/master/vbox/freebsd-vbox.sh

or here via subversion:

svn co https://github.com/splbio/freebsd-vmtools/trunk

I moved it to its own repo now, for updates/pull requests. 


> 
>> What is the best way to get this made into part of the release
>> process so that we can get .ovas shipped as well.
>> 
> 
> I'm inclined to think this is an overkill solution, to be honest.

Here is why I strongly disagree.

Creating a proper .ova is fraught with small errors that easily turn users away.

The most simple thing, accidentally picking 32bit BSD, has bitten many a newcomer and just makes things unpleasant.

Please read through the blog post by Ryan on the EXACT config needed for FreeBSD to work correctly:
http://blog.kidicarus.cool/blog/2014/12/24/freebsd-guest-on-mac-osx-host-via-virtualbox/

It's tiring, long and easy to get wrong. 

By reducing steps we make it easier for people to use FreeBSD in a virtual environment.

> 
>> One final question, is there a possibility we could add some
>> changes to the image so that it auto-dhcp's an address?  Most people
>> who just download the image won't know to "dhclient em0" or even
>> what an "em0" is.
>> 
> 
> I think 'ifconfig_DEFAULT="DHCP"' in rc.conf(5) is what you want.

Do we want this by default in all images?  (I would vote yes).

-Alfred

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freebsd-vbox.sh
Type: application/octet-stream
Size: 2448 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20141230/5da11ed4/attachment.obj>


More information about the freebsd-hackers mailing list