VMware Tools Installation Question
-
I realize there is a pre-built VMware appliance, but I wanted to give a manual VMware Tools installation on a clean image using the ISO. I want to do this to get familiar with the how FreeBSD is laid out and become familiar with installing packages, updating packages, etc.
To begin, I installed 1.2.1-RC2 on a blank VMware ESXi 3.5 VM and loaded up a fresh install, then transferred the installation to the hard drive. I then installed the following packages:
icu-3.8.1_1.tbz
libdnet-1.11_2.tbz
open-vm-tools-nox11-102166_7.tbzThe package informs you to add some lines to the /etc/defaults/rc.conf to get all the kernel modules to load up. After adding these and renaming the 2 files in /usr/local/etc/rc.d/ (the package does not add the '.sh' extension), everything works and loads properly after a reboot. So far so good.
I then went to look at the pre-built appliance, and noticed that all the kernel modules load successfully at boot time, yet there are no additional lines in the /etc/defaults/rc.conf file. How the heck are these VMware modules loaded properly? What is different between the pre-built VM appliance and the fresh installation with a manual install of VMware Tools? For the life of me, I cannot see where the system is told to load the additional modules.
Any pointers will be appreciated
Thanks.
-
look at the /usr/local/etc/rc.d/ script
-
Thanks very much sullrich. I see that the vmware-kmod.sh script is different than the one supplied in the package. I understand now how the kernel modules are loaded at boot time now.
Appreciate the insight. Thanks again.
-
The scripts are modified as we don't use rc.conf.
On a stock FreeBSD, all your changes go in /etc/rc.conf and that file contains overrides from the /etc/defaults/rc.conf. You should never edit /etc/defaults/rc.conf on a stock FreeBSD box, as it says in that file:
This is rc.conf - a file full of useful variables that you can set
to change the default startup behavior of your system. You should
not edit this file! Put any overrides into one of the ${rc_conf_files}
instead and you will be able to update these defaults later without
spamming your local configuration information.
-
Thanks very much for that tip. Please pardon the elementary question, but my stock image does not have a /etc/rc.conf file that already exists. I assume I will need to create this manually. Please advise if this is the case.
Thanks.
-
Well, I tried creating the file manually, then making it executable. However it's not persistent after a reboot. How can I make this persistent.
Thanks.
-
Well, I tried creating the file manually, then making it executable. However it's not persistent after a reboot. How can I make this persistent.
Thanks.
pfSense does not use rc.conf and the freebsd rc system. We have our own.
-
Ahh, that makes sense why the file keeps getting deleted then. After comparing the vmware-kmod.sh file in the appliance with the manual install, I noticed that half the file was edited. The most notable parts are where the defaults are set. If I read this correctly, those parts define whether of not to load the module by default and use the rc.conf system to override the setting. This gives a user more control of what he/she wants loaded. Since pfSense does not use the rc.conf system, you had to edit the script to make modules load at default instead of giving a choice in the matter.
I'm I following this correctly?
-
Is there a reason you don't want it to load certain things?
You'll have to manually edit the startup script to change what is loaded.
-
It's not that I want to load or unload certain modules. I'm just trying to understand the "hows". There are also a few things that I would change with the virtual appliance, and installing a fresh image and creating my own "master" template would be preferred. The few things I am changing are:
1. The file size seems too big. If I install a fresh image using the ISO, manually install the tools package, then zip up the vmdk, the file size is just around 50M or the same as the ISO. This is what I was expecting, but the standard virtual appliance is over 3x larger. I cannot figure out why this is.
2. I use VMware ESX server, and the virtual appliance is created using COW (copy-on-write, aka thin) vmdks with the "virtual" size of 4GB. When I convert this COW to Thick disks, it uses the full 4GB. Now, this is really not a big deal considering how much free space there is, but it is really a lot of wasted space.
In my tests, I've created a version of a virtual appliance using a 1GB vmdk and can be compressed to just over 50M.
-
1. The file size seems too big. If I install a fresh image using the ISO, manually install the tools package, then zip up the vmdk, the file size is just around 50M or the same as the ISO. This is what I was expecting, but the standard virtual appliance is over 3x larger. I cannot figure out why this is.
I wondered the same, there is only about 100 MB of data on the vmdk, but even after a defrag it's significantly larger than that. Wrote it off, as I don't have time to chase that one down right now.