Both open-vm-tools and VMware Tools not working correctly in pfSense 2.2



  • Greetings,

    I installed a fresh new pfSense 2.2 (amd64) VM on ESXi 5.5 U2 (with vmxnet3 adapters) and have issues with the open-vm-tools-nox11 package that you can install through the package manager: They install and start fine, and the status is shown correctly in the vSphere Client, but when I try to do a Guest shutdown or reboot of pfSense through the vSphere Client then this fails with "VMware Tools script errors".

    I then tried to install the official VMware Tools following my own guide at http://www.v-front.de/2013/06/how-to-install-or-update-vmware-tools.html, but after that I ran into the same problem as another forums user (see https://forum.pfsense.org/index.php?topic=85595.0): Only ping to pfSense works, but nothing else. As a first try I disabled the VMware supplied vmxnet3 driver by uncommenting it in /boot/loader.conf, so that the FreeBSD builtin vmxnet3 was used again (like before the installation of any tools), and that brought networking back, but when trying to restart the VM via the vSphere Client I ran into the same problem (VMware Tools script errors) that I already had with the open-vm-tools package.

    Any ideas what's wrong here and how to fix that?

    Thanks!


  • LAYER 8 Global Moderator

    click shutdown again..



  • That doesn't help, it will throw the same error on every try.

    Are there any log files that I can check?



  • If you call it on /usr/local/etc/rc.d do you see any errors?



  • Okay, I'm back with trying the open-vm-tools package again …

    To be clear: It installs and starts fine - when I check the vmtoolsd process with ps it is displayed like this:

    root 54120  0.0  3.3 101192 33300  -  I    8:31AM  0:00.29 /usr/local/bin/vmtoolsd -c /usr/local/share/vmware-tools/tools.conf -p /usr/local/lib/open-vm-tools/plugins/vmsvc

    It is strange though that neither the file /usr/local/share/vmware-tools/tools.conf nor the directory /usr/local/lib/open-vm-tools/plugins/vmsvc exist on my system!?

    If I try to shut down or reboot the pfSense VM through the vSphere Client then this fails at the first try, but succeeds with the second try (only with the original VMware Tools it fails every time). This is somehow annoying … Is there a way to make it work on first try?
    I attached a picture of the error event in the vSphere Client. They show that there is also an error after VM bootup with the poweron script of the vmtools.




  • Okay, I think I found the issue and a workaround:

    The VMware Tools scripts are in /usr/pbi/open-vm-tools-amd64/local/share/vmware-tools. They try to call the system scripts /etc/rc.d/netif and /etc/rc.d/dhclient, but these do not exist, so they fail.

    Since I do not need the VMware Tools scripts at all I disabled them following the instructions at https://pubs.vmware.com/vsphere-50/topic/com.vmware.vmtools.install.doc/GUID-0D493762-56EB-4021-9A7A-591336F88CA4.html.
    The commands
      vmware-toolbox-cmd script power disable
      vmware-toolbox-cmd script resume disable
      vmware-toolbox-cmd script suspend disable
      vmware-toolbox-cmd script shutdown disable

    created the tools.conf file in /usr/pbi/open-vm-tools-amd64/local/share/vmware-tools with the following contents:
      [powerops]
      poweron-script=
      resume-script=
      suspend-script=
      poweroff-script=

    and after a restart of the VMware Tools the issue was resolved and a guest shutdown/restart in the vSphere Client always succeeds.



  • Found another issue with the open-vm-tools package: The boot script /usr/local/etc/rc.d/vmware-kmod.sh loads kernel modules from /usr/local/lib/vmware-tools/modules/drivers, but that directory does not exist.

    As a workaround I created a symlink:

    cd /usr/local/lib
    ln -s /usr/pbi/open-vm-tools-amd64/local/lib/vmware-tools vmware-tools



  • @VFrontDe:

    Found another issue with the open-vm-tools package: The boot script /usr/local/etc/rc.d/vmware-kmod.sh loads kernel modules from /usr/local/lib/vmware-tools/modules/drivers, but that directory does not exist.

    As a workaround I created a symlink:

    cd /usr/local/lib
    ln -s /usr/pbi/open-vm-tools-amd64/local/lib/vmware-tools vmware-tools

    Can anyone write a summary howto install vmware-tools and get it to work on a newly/fresh installed pfsense 2.2?


  • LAYER 8 Global Moderator

    I just disabled the scripts on the vclient.. But guess you could disable them on pfsense as well.

    When I get a chance I will update the pfsense doc for installing openvm tools..  that ln should really be created when the package for pfsense is installed.  But I can update the doc with this info, etc.



  • @johnpoz:

    I just disabled the scripts on the vclient.. But guess you could disable them on pfsense as well.

    When I get a chance I will update the pfsense doc for installing openvm tools..  that ln should really be created when the package for pfsense is installed.  But I can update the doc with this info, etc.

    a big thank you for this



  • @johnpoz:

    I just disabled the scripts on the vclient.. But guess you could disable them on pfsense as well.

    When I get a chance I will update the pfsense doc for installing openvm tools..  that ln should really be created when the package for pfsense is installed.  But I can update the doc with this info, etc.

    I wrote a new blog post with instructions and some more details:
    http://www.v-front.de/2015/01/pfsense-22-was-released-how-to-install.html


  • LAYER 8 Global Moderator

    Dude you rock – you might as well have just updated the doc yourself.. hehehe  Now just need to find time to edit it..  Of course I will give credit to your fantastic work..  Nice to see you directly on the forums - even if only 6 posts ;)



  • @johnpoz:

    Dude you rock – you might as well have just updated the doc yourself.. hehehe  Now just need to find time to edit it..  Of course I will give credit to your fantastic work..  Nice to see you directly on the forums - even if only 6 posts ;)

    Thanks,
    I registered for the forum just to discuss this topic … but I will try to return here from time to time to help people or when I need help myself :-)
    pfSense rocks, Open Source rocks! I know that like me a lot of people use pfSense on VMware at home or in labs, even for production. I just want to give back to the community by helping others.


  • LAYER 8 Global Moderator

    I am curious what the deal with the native tools are..  Very strange.. When they next update them will try again..  I think when I find time will do a clean install of native freebsd and see if same issues.  If happens with that clearly needs to be reported to vmware.


  • Banned

    I must be missing something… is this actually needed for anything on 2.2 (beyond heartbeat)? Sounds like installing this stuff is a lot of work causing more harm than good.


  • LAYER 8 Global Moderator

    The open tools is just click install package - but seems to be a bit of issue with that package..  Needs a couple of tweaks to get them working.  Only real use I have now that vmx3 is out of the box supported is the ability to gracefully shutdown the vm from esxi.  This is nice to have for example power outage and my ups sends shutdown commands.

    Guess could have it shutdown each vm directly to that os vs having esxi do it, etc.



  • Hi,
    I just followed the instructions from www.v-front.de/2015/01/pfsense-22-was-released-how-to-install.html

    As I was upgrading from 2.1.5 with installed openvm-tools (added via the web package manager) my sequence after the upgrade was the following:

    vmware-toolbox-cmd script power disable
    vmware-toolbox-cmd script resume disable
    vmware-toolbox-cmd script suspend disable
    vmware-toolbox-cmd script shutdown disable
    /usr/local/etc/rc.d/vmware-guestd.sh restart
    cd /usr/local/lib
    rm -rf vmware-tools # these still existed from old installation
    ln -s /usr/pbi/open-vm-tools-amd64/local/lib/vmware-tools vmware-tools
    /usr/local/etc/rc.d/vmware-kmod.sh restart
    
    

    So, I had to cleanup a bit in between… :)
    Now everything seems to be working smoothly. Can anyone contact the maintainer of the openvm package that these things happen automatically?



  • what is the status of the open vm tools package being compatible without doing CLI hacking ?


Log in to reply