FreeBSD and VMWare

3 March 2010

Well my first choice of Ubuntu’s JeOS is probably a lot more work than I want to go through, so I am preparing my backup plan.  Going to my favorite OS of choice, FreeBSD.  while looking up VMWare and linux hosts I came across a link that referenced FreeBSD, so I did a little more searching and now I want to list those links so I can find them later and hopefully get that to work when I get frustrated with JeOS (since I am not intending on using it as it’s creators intended, I am expecting it to fail, but want to try anyways as VMWare supports Ubuntu based OS as a Host OS and JeOS is a watered down Ubuntu Server, and overhead is a primary concern when dealing with Virtual Machines.  Maybe if I document well enough and it does work, my notes will get added to the VMWare and Ubuntu knowledgebases).

Anyways, FreeBSD links involving VMWare and/or just VMs

  1. Although dated December 2004 for the first post, this VMWare forum post includes responses from VMWare employees regarding not supporting FreeBSD as a Host OS.  Also includes links to a site where a non-employee had been providing a FreeBSD port for VMWare, but stopped maintaining it after VMWare Workstation 3.5 last post in the thread was dated Jan 16th 2010, and still no official support. (fyi I am looking into this, as I just got assigned to a VMWare support team and so I am trying to get more familiar with their products.  I would like to run VMWare on the most secure, least overhead Host OS possible, and I am already somewhat familiar with FreeBSD)
  2. instructions for enabling VMWare tools in *BSD guests
  3. instructions on installing VMWare tools in FreeBSD 8.x guest
  4. fantastic instructions on setting up FreeBSD 8 with KDE graphical environment, clear step by step install and post install instructions.  I will try them instead of doing Ubuntu’s JeOS as having this running even without VMWare would make me most happy.
  5. the FreeBSD Handbook page for third party applications for installing, upgrading, and building from source
  6. the FreeBSD Hanbook’s page on setting up VirtualBox in BSD
  7. the FreeBSD official wiki-site for setting up VirtualBox

Getting ready to setup my PC as a VMWare Server, got a new WD Caviar Black 500GB 32MB cache Internal drive so I can dump all my files on it to clean off a pair of 250GB drives to run the VM’s on.  I learned a long time ago you want different HDD’s for each VM if they are to be active, as the slowest part of a computer these days are the HDD’s and the last thing you want is more than one OS trying to run off the same HDD. Would be nice if I could talk myself into the cost of a few SSDs.  Below are some links I am finding while I research that sound useful or interesting, not all are exactly pertaining to what I am trying to do, some may be helpful with things I am going to do after I get it setup, so I’ll be adding things to this post as I find them, to build up some information links for setting up my VMWare server.

  1. a forum post where someone describes exactly what they install as their host linux machine to run the VMWare server on, unfortunately this is for CentOS, which is okay, just not my preferred Linux distro.  and unfortunately according to VMWare’s website, Ubuntu, CentOS, and RHEL are the only supported Linux Distro’s… I wonder while they do not support FreeBSD as well? oh well, we shall see how it goes.
  2. a great article on setting up Ubuntu JeOS, although JeOS is designed for being set up as a virtual machine, I want to see if it can be used as the host OS for VMWare Server also, and will be the first Host OS I will try when my new drive arrives. (that should be interesting, I’ll try and keep good notes)
  3. Using Kernel Mode Virtual Machine on any Linux Distro with kernel 2.6.20 or newer.  Also not what I was looking for, but a great alternative, this is a guide book giving step by step instructions for setting it up and installing your guest OS, including command line inputs for setup.
  4. setting up an IPCop Virtual Machine to manage your internet traffic, of course now I need to go and figure out exactly what it does (I can guess, but like to know more details).  Still not exactly what I started looking for, but these are the things I have been finding while looking and are still useful.  Setting up IPCop like this is definitely something I would be interested in doing to simplify my network protection; although I have a Sheeva Plug computer that I purchased specifically to do this, and just never got around to setting it up. (Still have to get it flashed to a new version on it’s NAND rom so the SD cards can work, so I can put a decent sized storage card on their to do all I want to do with it.)

(must be a problem with IE8 that is preventing me from inserting the web links, I’ll update this post later from Google Chrome and if it doesn’t work, then I’ll try it from Fedora and see if it works then.  Until then, I am sorry but I will not be posting referrence links to everything I type.)

(well everything works fine from Google Chrome under Windows 7, as you can see from the improvements to this post.  Unless of course you are seeing it for the first time now…  :)

ok, so I woke up and now can’t get back to sleep.  nothing new, but this time I decided to do something instead of just laying there hoping to fall asleep before the sun rises.  Now, I thought that I already had this working, but apparently not… —edit okay, so I need to note I was doing these steps while writing this post and when I got to the step to reboot Fedora, step 6, I fell asleep.

I was and am currently using, a Fedora 12 VM from my laptop, now I thought I had the shared folders from the host OS (Win XP) setup, but could not find the mount point, so I just attempted to re-mount it.  fyi I’m using VirtualBox 3.1.2  so I attempted to remount the shared folder to a simple location…

$ sudo mount -t vboxsf documents /home/finndo/Documents/local

mount: unknown filesystem type ‘vboxsf’

so I do some Googling and come up with some interesting tidbits…

so, if you didn’t look at the link, here it is in a nutshell, to get the mount to work (yes I installed the VM additions, but did not notice the error…) please read the whole post before trying this, as there are some steps you may need to do a little differently and I have noted this, but not until after I list them!

ok, let me start from the beginning…

step by step instructions for getting shared folders to work in a Fedora 12 VM on VirtualBox (after you get fedora installed)

  1. open a console window (I am a huge fan of Yakuake)
  2. type “sudo yum install system-config-display”
  3. give it your password (you may have to do this every time you type sudo)
  4. type “sudo system-config-display”
  5. this will open a window in your GUI (KDE, Gnome, XFCE, ICE, whatever) choose the options for your display (if using Yakuake you need to hit F12 to make the console window go away so you can see this new window)
  6. type “sudo yum install gcc kernel kernel-devel kernel-headers”
  7. restart the VM to boot with the newest kernel
  8. goto the Devices menu and select install Guest additions
  9. back to the console and type “sudo mount /cdrom /media”
  10. type “sudo /media/VBoxLinuxAdditions-x86.run”
  11. (special note, if you have already run the VBox Additions from the cd, skip steps 7-10 and  just type this “sudo /etc/init.d/vboxadd setup”
  12. now I do not remember if I had to create the share for My Documents in VirtualBox or if it was there by default, but I have one, called “documents” and that is the one I am using in this example. so, type the following “sudo mkdir /mnt/shared-docs”
  13. type “mount -t vboxsf documents /mnt/shared-docs”
  14. then you can now access your Windows XP My Documents folder from your Fedora 12 install in the /mnt/shared-docs folder!!!

Really not that hard, but nowhere in the documentation for VirtualBox does it tell you that you have to do all of that!

Now, you can type “su -” and give it your password, then you do not have to use “sudo” at all for the entire process.  you may ask why I do it then, and it is because I work on linux and unix systems for a living (or at least I am trying to) and for security reasons they tell you to never su to root (become the root user) as it is too easy to type an accidentally command in that will make the entire system irreversibly broken (with out restoring from a backup) and since I have been logged into some servers that are used in the monitoring/maintenance of the space shuttle and international space station, so making one of those stop working for several hours or more is a really bad idea! therefore you sudo every command you need to run as root instead of becoming root, gets annoying at times, but almost eliminates the chance of accidental termination of your employment!

Ok, so a note, I am running this Fedora 12 VM on a single core laptop with 2GB of Ram (1.5GB given to Fedora, and nothing running in the host except the VM) and when I ran step 5, it practically halted my system and took almost 30 minutes (part of the reason why I fell asleep) it would say it was downloading a 8.6 meg file and take 14 minutes to do so, at 858Mb/s (which is impossible I know, but that is what it did and said) anyway, the main reason I did this, is that I had downloaded some other Fedora .iso files and filled my Virtual HDD and needed to get them off!!

So, now you know… and as we all know… Knowing is half the battle!

[finndo@fedora12KDE yum.repos.d]$ sudo mount -t vboxsf documents /home/finndo/Documents/local
mount: unknown filesystem type ‘vboxsf[finndo@fedora12KDE yum.repos.d]$ sudo mount -t vboxsf documents /home/finndo/Documents/local
mount: unknown filesystem type ‘vboxsf’
6 visitors online now
6 guests, 0 members
Max visitors today: 7 at 12:52 am EST
This month: 29 at 03-04-2010 08:18 pm EST
This year: 29 at 03-04-2010 08:18 pm EST
All time: 29 at 03-04-2010 08:18 pm EST