User:Mjb/FreeBSD on VirtualBox
VirtualBox emulates IBM PC-compatible hardware. It's like an imaginary rack of PCs. Each PC is a Virtual Machine (VM) with its own pretend hardware (motherboard, RAM, keyboard, mouse, display, networking, storage). Your real computer running VirtualBox is the "host". The VMs are "guests".
I'm running FreeBSD in a VirtualBox VM. The host system is Windows 7. Here are some of my notes about it.
See also:
Install VirtualBox
I already had VirtualBox 4.3.20 installed for other projects. I don't recall if there was anything special I did to set it up.
I tried to upgrade to a newer version at one point, and the newer version was not compatible with my system, so I am staying at 4.3.20 for now.
Download a FreeBSD installer DVD image
You need an uncompressed ISO-format image of an i386 release version of FreeBSD. Go to ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/i386/ISO-IMAGES/ and pick the latest version available. In my case it was 10.2, and the file I wanted was FreeBSD-10.2-RELEASE-i386-dvd1.iso
.
Download and save the .iso file somewhere.
Create a Virtual Machine for FreeBSD
- Name: whatever you want, e.g. FreeBSD 10.2-RELEASE
- Type: BSD
- Version: FreeBSD (32-bit)
- Memory size: 128 MB is recommended but that's the bare minimum. I chose 1024 MB (1 GB). It will be using the host's RAM, so you have to decide how much you can spare.
- Hard drive: Create a virtual hard drive now, file type VDI, Dynamically allocated. The size can be whatever you can spare. It will live in a file on one of your host's drives.
Now click on the Settings icon; don't turn on your VM yet.
- System > Motherboard > [X] Hardware Clock in UTC Time
- Storage > under Controller: IDE, there's a CD/DVD icon and the word "Empty". Click on it. Now on the right side, under Attributes, click on the new CD/DVD icon that's next to "IDE Secondary Master", and choose "Choose a virtual CD/DVD disk file...". Find the .iso you saved (see previous section) and point it to that. You have just done the equivalent of putting a DVD into the VM's drive! Click OK.
- Network > Attached to: Bridged Adapter. This defaults to NAT, but you want Bridged Adapter so that it will be visible and fully accessible to other machines on your LAN, including your host machine (i.e. they can establish inbound connections to the VM). If you choose NAT, then the VM is hidden "behind" your host machine and is only capable of outbound connections.
OK, now you're ready. Click Start to power on the VM. The DVD should boot and you're ready to install. Just follow the prompts.
Before rebooting at the end of the install process, you will need to "remove" the DVD from the drive, or it will boot back into the DVD. If that happens, it's OK just to power off the VM.