P2V FreeBSD 6.1 :: Not so simple
So lately I have been doing P2V conversions on legacy systems to maintain old applications while their replacements are in production.
The first 6 systems I converted were Redhat 7.2-7.3 and Debian 3.0-3.1 installs. No big deal if the disk sizes were fine I used Clonezilla to make a disk image then restored the disk image to the VMware image. If I wanted to resize the disk I would download the old installer CD create the partitions, install the kernel then reboot and untar a copy of the physcal machines file system onto the clean partitions. Some times I had to use a rescue CD afterwards to rebuild the initrd image. But all in all not really any issues.
Now starts the FreeBSD saga. My problems will illustrate why I really would rather use a Linux distribution than FreeBSD for application servers.
- UFS is strange. The whole paritions inside of slices thing really confounds 3rd party utilities. If you want to clone a UFS disk, you have to use a UFS based system and use the utilites provide. And even then with out jumping through a bunch of hoops (like creating and mounting a virtual image on another disk and using disklable and dump restore) getting that image onto a virtual machine would have involved even more work
Fine so I chose the reinstall untar filesystem option. - FreeBSD release process just plain sucks. The problem was I tried to install the RELEASE version of FreeBSD 6.1, this version had an issue with mpt driver which is needed for the VMware virtual SCSI controllers. So I couldn’t do an install.Now, this problem was fixed in FreeBSD 6.1 STABLE. Ok, let’s see if we can find an install image for STABLE. Well guess what FreeBSD doesn’t create a new periodic install set of their STABLE releases. Debian and Ubuntu do this for example 3.1r1, 3.1r2 etc. Occasionaly there will be SNAPSHOT installs for STABLE, but guess what these are not archived for very long, the oldest I could find was a 6.2 STABLE snapshot. I did find the SNAPSHOT STABLE release I needed on some server in tiawan but it was going to take 24 hours to download.
The number one thing I hate about BSD in general is the release process and the lack of binary updates for the package tree and for the core distribution. Some people enjoying maintaing their own personal source trees and applying patches to it and compiling and reinstalling from source. I do not, I think it is a waste of time and I see no reason to deal with it when on any mordern Linux distro I can type 2 commands and have all my software up to date or security updates installed. This becomes really important when you are managing more than several systems. I would rather be writing some neat piece of software then sitting on my ass waiting for make world to complete so I can distribute the updates to all of my systems.
Anway the solution was to use a 6.2 install image to create the partitions and install the kernel. Then I untarred the 6.1 user land and etc from the old machine onto the new partitions preserving the fstab from the 6.2 install. After a little cleanup I had everything working quite nicely.
This was quite the learning experience. For anyone else that needs to virtualize a FreeBSD 6.1 system, I would strongly consider just getting your app up and running on a newer FreeBSD release. It probably would have taken less time.