Saturday, January 31, 2015

Pfsense 2.2 Upgrade and OpenVM Tools installation

Pfsense 2.2 is out now whereas I couldn't wait to upgrade the guest VM for this.

Then OpenVM Tools seems to be unable to load up. 

Errors appear in the login console:
KLD vmmemctl.ko: depends on kernel - not available or version mismatch
linker_load_file: Unsupported file type
KLD vmxnet.ko: depends on kernel - not available or version mismatch
linker_load_file: Unsupported file type
KLD vmblock.ko: depends on kernel - not available or version mismatch
linker_load_file: Unsupported file type
KLD vmhgfs.ko: depends on kernel - not available or version mismatch
linker_load_file: Unsupported file type

Using command kldstat only shows up somthing like this:
$ kldstat
Id Refs Address    Size     Name
 1    8 0xc0400000 93ca60   kernel
It sounds like vmxnet.ko and the other OpenVM drivers not loading up properly.

Pfsense 2.2 is based on FreeBSD 10.1 which may not be compatible with the way that works in FreeBSD 9.x. Someone in the forum suggested that:

For now Vmware is not supporting FreeBSD version 10. You must wait with upgrade to VSphere 6.

Yet we can't wait, can we? 

Quick solution is trying to install OpenVM Tools from FreeBSD ports via pfsense console itself:

pkg install open-vm-tools-nox11

After installation, try the following as well:

To run the Open Virtual Machine tools at startup, add the following
settings to your /etc/rc.conf :
vmware_guest_vmblock_enable="YES"
vmware_guest_vmhgfs_enable="YES"
vmware_guest_vmmemctl_enable="YES"
vmware_guest_vmxnet_enable="YES"
vmware_guestd_enable="YES"
After a reboot, vmxnet.ko drivers should load up again as follows.
$ kldstat
Id Refs Address    Size     Name
 1    8 0xc0400000 93ca60   kernel
 2    1 0xc0d3d000 6a32c    acpi.ko
 3    1 0xc20d1000 3000     vmmemctl.ko
 4    1 0xc20f5000 4000     vmxnet.ko
 5    1 0xc20f9000 5000     vmblock.ko
 6    1 0xc20fe000 a000     vmhgfs.ko






5 comments:

  1. It is not working...

    There is no rc.conf file.
    If I try to kldload one of the ko's the same message is on screen


    BYE.


    CAT

    ReplyDelete
  2. Try create new rc.conf with the mentioned setings if it is not there. Reboot and see if the drivers are in place. rc.conf tells what to load at startup as it describes by itself. Good luck!

    ReplyDelete
  3. u r wrong.

    a self created rc.conf is deleted after reboot.
    look into many other posts in pfsense forum.
    u can use only a rc.conf.local

    but the other problem is that the kernel modules should be
    after pkg install open-....... /boot/kernel/ but there r no vm modules!

    i'm talking about an upgraded pfsense from 2.1.5, not a clean install.

    BYE


    CAT

    ReplyDelete
  4. Sounds strange, but you are right. Pfsense doc says something similar about rc.conf (read the bottom quote).

    Forget about rc.conf for now. You need to resolve the installation of open-vm-tools-nox11 drivers before getting any further.

    Here're some steps you can perform on pfsense web GUI for upgrading:
    Check [System: Firmware: Settings: Updater Settings: Firmware Branch];
    With the section "Firmware Auto Update URL", click the checkbox "Use an unofficial server for firmware upgrades" and make sure Base URL to be "http://updates.pfsense.org/_updaters".
    Try Auto Update again through web GUI.

    My one upgraded via pfsense's web GUI (System: Firmware) from 2.1.x and things are working after issuing command:

    $ pkg update
    $ pkg install open-vm-tools-nox11

    and then a reboot.

    What have been installed are new startup scripts like these:
    /usr/local/etc/rc.d/vmware-guestd
    /usr/local/etc/rc.d/vmware-guestd.sh
    /usr/local/etc/rc.d/vmware-kmod
    /usr/local/etc/rc.d/vmware-kmod.sh

    First priority is making sure that the drivers are in place.

    If things are there, try a manual startup:
    $ /usr/local/etc/rc.d/vmware-guestd.sh start
    $ /usr/local/etc/rc.d/vmware-kmod.sh start

    If you found nothing, you can try reinstalling open-vm-tools-nox11 (it must have -nox11 suffix) and see if thing is sorted out.

    *According to https://doc.pfsense.org/index.php/Installing_FreeBSD_Packages, rc.conf will definitely get deleted in next reboot. Instead, a custom startup script must be created in /usr/local/etc/rc.d/ and its name must end with .sh and it must be marked executable (chmod +x), and it will run at boot time.

    ReplyDelete
  5. Also, after reinstallation of open-vm-tools-nox11 check the file /boot/loader.conf to see whether the following contents are there:
    ...
    vmblock_load="YES"
    vmmemct_load="YES"
    vmhgfs_load="YES"
    vmxnet_load="YES"

    Or else, take a look at the configuration script to get some ideas:
    https://www.pfsense.org/packages/config/open-vm-tools_2/open-vm-tools.inc

    Good luck!

    ReplyDelete