vmware-cmd fails to run with a Can't locate VMware/VmPerl.pm error
search cancel

vmware-cmd fails to run with a Can't locate VMware/VmPerl.pm error

book

Article ID: 342439

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

You are experiencing these issues:

  • vmware-cmd fails.
  • You receive these errors:
    • /usr/bin/vmware-cmd requires the VMware::VmPerl Perl libraries to be
      installed. Check that your installation did not encounter errors.

    • Can't locate VMware/VmPerl.pm in @INC (@INC contains: blib/arch -Iblib/lib -
      I/usr/lib/perl5/5.6.0/i386-linux -I/usr/lib/perl5/5.6.0 -
      I. /usr/lib/perl5/5.6.1/i386-
      linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-
      linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0/i386-
      linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl . blib/arch
      blib/lib /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0/i386-
      linux /usr/lib/perl5/5.6.0 .) at /usr/bin/vmware-cmd line
      121. /usr/bin/vmware-cmd requires the VMware::VmPerl Perl libraries to be
      installed. Check that your installation did not encounter errors.


Environment

VMware ESX Server 2.5.x
VMware ESX Server 3.5.x
VMware ESX Server 2.0.x
VMware ESX Server 3.0.x
VMware ESX Server 2.1.x

Resolution

This issue occurs when there are installation problems with PERL libraries. These libraries are required to run vmware-cmd utility script.

To troubleshoot vmware-cmd:

  1. Open an SSH terminal connected to the service console of the ESX host.
  2. Ensure that the system time is correct on the ESX host. To check and adjust the time and date settings, see Adjusting ESX Server Time Zone (1436).
  3. If you are using ESX 2.x, or ESX 3.x run the following commands to reinstall the PERL libraries:
    • cd /usr/lib/vmware/perl
    • tar xvf control.tar
    • cd control-only
    • perl Makefile.PL
    • make
    • make install

  4. If you are running ESX 3.x you can use the RPM installer to reinstall the PERL libraries from the setup disc.
    1. Find the PERL installation RPM package on the ESX host setup disc. The file name is similar to: VMware-esx-srvrmgmt-3.0.1-32039.rpm
    2. Run the RPM command to install and update the PERL library package:
      rpm -ivh --replacepkgs VMware-esx-srvmgmt-3.0.1-32039.rpm