Installing OpenBSD 4.2 in VMware
If you’re interested in security, you’ve probably already heard about OpenBSD. It’s a Unix-like operating system whose primary focus is security and cryptography (it’s based in Canada, so no export restrictions). Out-of-the-box, it is arguably the most secure Unix, and is commonly used for firewalls and other appliances. Of course, it’s also a fully fledged Unix with which you can do just about anything you could do with any other Unix.
Installing on VMware is surprisingly easy and straight forward even though VMware has no OpenBSD option (we use the FreeBSD option instead - close enough).
OpenBSD does not have a graphical installer. Its install is expert-mode only, but that doesn’t necessarily mean it’s difficult.
Just follow these easy steps to get up and running:
1. Download the OpenBSD 4.2 ISO image from OpenBSD.org. We will be using the i386 image.
2. Create a new virtual machine. Select Other > FreeBSD as the operating system. Use the default for the disk, and then select NAT for the networking (unless you want to give it an external interface, in which case you need more than one IP address).
3. Go to Edit Virtual Machine Settings, select CD-ROM, Use ISO Image, then select the ISO for OpenBSD 4.2
4. Start the virtual machine. After a load of blue text, you will be asked to Install, Upgrade, or take a Shell. Press I for Install and hit enter.
5. Hit enter to keep terminal type vt220
6. kbd(8) mapping corresponds to your keyboard mapping. Press L and enter for a list, then select your mapping (for example, if you’re in the US, type “us”). Hit enter.
7. Type “yes” and hit enter to proceed with install.
8. Press enter to select wd0 as the root disk.
9. Type “yes” and hit enter to use all of the disk.
10. Now the fun stuff - partitioning the hard drive. I wanted to keep this simple and didn’t really care about properly slicing up the drive as this system isn’t going to be used in production and is just a VMware virtual machine. We’ll put everything on one big slice. This assumes you made the drive 8GB when setting up the vm. Enter the following commands:
a a
<enter>
7168M
<enter>
<enter>
/
<enter>
a b
<enter>
<enter>
1024M
<enter>
<enter>
q
<enter>
11. Type “yes” and hit enter to format the drive.
12. Choose a hostname and hit enter.
13. Hit enter to configure the network. Hit enter again to select pcn0. Hit enter to keep the hostname. Hit enter for no. Type “dhcp” and hit enter - VMware has built in DHCP when you use NAT. Hit enter 7 more times to select all the defaults - it should have figured out what to use from DHCP.
14. Enter your root password, then hit enter.
15. Hit enter 3 times to select the CD to install the sets.
16. A default set of packages is selected. Use the on-screen instructions if you want to change this list. When done, hit enter to install the sets.
17. OpenBSD installs itself while you eat a cheeseburger or something.
18. Hit enter for done, then hit enter to start sshd by default, then hit enter for no NTP server.
19. Running X? Enter yes.
20. Answer defaults to the next several questions, then enter your timezone.
21. Type halt and hit enter to shutdown the system. Now, restart the virtual machine and you should be up and running with OpenBSD!
You now have a basic installation of OpenBSD in VMware. With only two exceptions in its history, the default OpenBSD install has had no known remote exploits.
To learn more about your new system, head on over to OpenBSD.org. The project has excellent documentation for getting up and running and installing additional packages.
Loading...
Perfect - clear and simple.
Thank you for this working example !!
jorge blasi - August 27th, 2008 at 1:52 pm
This guide worked perfectly for me.
:) 
I’ve heard that OpenBSD is the most secure OS available, and
wanted to play around with it in VMWare before buying an extra
computer to work as a firewall.
Thanks for the help!
Poul Wittig - November 25th, 2008 at 10:55 am