{"id":113,"date":"2023-03-19T08:37:05","date_gmt":"2023-03-19T07:37:05","guid":{"rendered":"http:\/\/10.4.44.99:10084\/?p=113"},"modified":"2023-03-19T08:37:05","modified_gmt":"2023-03-19T07:37:05","slug":"vmware-install-vcli-at-redhat-centos-to-check-with-nagios","status":"publish","type":"post","link":"https:\/\/www.winni.at\/wordpress\/?p=113","title":{"rendered":"VMware | Install vCLI at Redhat\/Centos to check with Nagios"},"content":{"rendered":"\n<p><strong>Schrittweise Anleitung zur Installation der VMware vCLI unter Redhat\/Centos<\/strong><\/p>\n\n\n\n<p><strong>HowTo install Vmware vCLI under Redhat\/Centos OS<\/strong><\/p>\n\n\n\n<p><strong>1.) Install epel Repository<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install epel-release<\/code><\/pre>\n\n\n\n<p><strong>2.) Install a huge amount of yum perl Librarys<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install openssl-devel libxml2-devel e2fsprogs-devel expat-devel perl-YAML perl-Devel-CheckLib perl-CPAN libxml2-devel.x86_64 perl-Archive-Zip gcc libuuid libuuid-devel uuid-perl uuid-devel perl-SOAP-Lite perl-libxml-perl perl-SOAP-Lite perl-XML-SAX perl-XML-Simple perl-Crypt-SSLeay perl-Data-Dump glibc.i686 perl-Class-MethodMaker perl-Time-Piece perl-XML-SAX perl-Nagios-Plugin perl-XML-LibXML perl-Nagios-Plugin\n<\/code><\/pre>\n\n\n\n<p><strong>3.) Install PHP (maybe some other php librarys are necessary)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install php56w php56w-common php56w-devel<\/code><\/pre>\n\n\n\n<p><br><br><strong>4.) Install CPAN Dependencies<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cpan -f -i GAAS\/libwww-perl-5.837.tar.gz\n<\/code><\/pre>\n\n\n\n<p><strong>5.) Install following CPAN Modules &#8211;&gt; many thanks to&nbsp;<a href=\"http:\/\/morgajel.net\/2015\/05\/20\/1681\">http:\/\/morgajel.net\/2015\/05\/20\/1681<\/a><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>install Locale::Maketext::Simple\ninstall Params::Check\ninstall Class::Inspector\ninstall Class::MethodMaker\ninstall Compress::Raw::Bzip2\ninstall Crypt::OpenSSL::RSA\ninstall Crypt::OpenSSL::Random\ninstall Crypt::X509\ninstall Data::Dump\ninstall Devel::CheckLib\ninstall Digest::MD5\ninstall Encode::Locale\ninstall Env\ninstall ExtUtils::CBuilder\ninstall ExtUtils::MakeMaker\ninstall File::Listing\ninstall HTML::Parser\ninstall HTML::Tagset\ninstall HTTP::Cookies\ninstall HTTP::Daemon\ninstall HTTP::Date\ninstall HTTP::Message\ninstall HTTP::Negotiate\ninstall IO::CaptureOutput\ninstall IO::Compress\ninstall IO::HTML\ninstall IO::SessionData\ninstall IO::Socket::INET6\ninstall IO::Socket::SSL\ninstall IPC::Cmd\ninstall Import::Into\ninstall JSON::PP\ninstall LWP\ninstall LWP::MediaTypes\ninstall LWP::Protocol::https\ninstall Module::Build\ninstall Module::CoreList\ninstall Module::Load\ninstall Module::Load::Conditional\ninstall Module::Metadata\ninstall Module::Runtime\ninstall Mozilla::CA\ninstall Net::HTTP\ninstall Net::INET6Glue\ninstall Net::SSLeay\ninstall Path::Class\ninstall Perl::OSType\ninstall SOAP::Lite\ninstall Socket6\ninstall Sub::Uplevel\ninstall Task::Weaken\ninstall Test::Simple\ninstall Test::Warn\ninstall URI\ninstall UUID\ninstall UUID::Random\ninstall WWW::RobotRules\ninstall XML::LibXML\ninstall XML::Parser::Lite\ninstall XML::SAX\ninstall XML::SAX::Base\ninstall autodie\ninstall version\n<\/code><\/pre>\n\n\n\n<p><strong>4.) Download vCLI from VMWare<\/strong><\/p>\n\n\n\n<p>5.1 (<a href=\"https:\/\/my.vmware.com\/de\/group\/vmware\/details?downloadGroup=VSP510-VCLI-510&amp;productId=285&amp;download=true&amp;fileId=d3d88a3016d0bc04324b8d270fb8821e&amp;secureParam=3cae15bd2fdaabf6c8e212cbb6e06771&amp;uuId=81ef1833-de7c-4429-be7a-b7c3f791ea73&amp;downloadType=\">https:\/\/my.vmware.com\/de\/group\/vmware\/details?downloadGroup=VSP510-VCLI-510&amp;productId=285&amp;download=true&amp;fileId=d3d88a3016d0bc04324b8d270fb8821e&amp;secureParam=3cae15bd2fdaabf6c8e212cbb6e06771&amp;uuId=81ef1833-de7c-4429-be7a-b7c3f791ea73&amp;downloadType=<\/a><\/p>\n\n\n\n<p>5.5 (<a href=\"https:\/\/my.vmware.com\/group\/vmware\/get-download?downloadGroup=VCLI55U2\">https:\/\/my.vmware.com\/group\/vmware\/get-download?downloadGroup=VCLI55U2<\/a>)<\/p>\n\n\n\n<p>&nbsp;I prefer the 5.1 Version because of the easy install and less problems at working. Version 5.1. vCLI are also working with vSphere 5.5.<\/p>\n\n\n\n<p><strong>5.) &nbsp;Installation of vCLI<\/strong><\/p>\n\n\n\n<p><em>&#8211; Copy \/ download \/ Upload the VMWare vCLI file at your Redhat\/Centos server<\/em><\/p>\n\n\n\n<p>I have choosen the&nbsp;<strong>\/tmp<\/strong>&nbsp;directory&nbsp;<\/p>\n\n\n\n<p><em>&#8211; Unpack the tar file<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tar -zxvf VMware-vSphere-CLI-5xxxxxxxx.tar.gz<\/code><\/pre>\n\n\n\n<p><em>&#8211; Open the unpacked directory<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd vmware-vsphere-vcli-distrib\n<\/code><\/pre>\n\n\n\n<p><em>&#8211; Set Proxy Settings (vmware will need some Proxy information at installing. Set them before you start the install. In my case I do not use a proxy Server so I set (export http_proxy=). If I do not set a URL after = it means no proxy<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export http_proxy=\n\nexport ftp_proxy=\n\nexport  PERL_LWP_SSL_VERIFY_HOSTNAME=0\n<\/code><\/pre>\n\n\n\n<p><em>&#8211; Install vCLI<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/vmware-install.pl --prefix=\/opt\/vmwarecli EULA_AGREED=yes<br><br>&lt;...&gt;<br>Do you want to install precompiled Perl modules for RHEL?<br>&#91;yes] <strong>no<\/strong><br>&lt;...&gt;<\/code><\/pre>\n\n\n\n<p>Now the vCLI tools are correct installed.<\/p>\n\n\n\n<p>If there are any Problems where the VMware sdk cannot be reached:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install perl-IO-Socket-SSL<\/code><\/pre>\n\n\n\n<p>Edit the perl https.pm<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/usr\/lib\/perl5\/site_perl\/5.8.8\/LWP\/Protocol\/https.pm<\/code><\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/usr\/local\/share\/perl5\/LWP\/Protocol\/https.pm<\/code><\/pre>\n\n\n\n<p>Look for the following line near the top:<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp;$ssl_opts{SSL_verify_mode} ||= 1;<\/p>\n\n\n\n<p>&nbsp;Change it to:<\/p>\n\n\n\n<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; $ssl_opts{SSL_verify_mode} ||= 0;<\/p>\n\n\n\n<p>This is on CentOS 5.5, you might have different paths on different platforms<\/p>\n\n\n\n<p>If there are any Problems with Zlib\/Extra.pm:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sed -i 's\/length(\/scalar(\/g' \/usr\/lib64\/perl5\/IO\/Compress\/Zlib\/Extra.pm\n<\/code><\/pre>\n\n\n\n<p>If you follow those steps you will get an successfully installation of the vmware vCLI Tools.<\/p>\n\n\n\n<p><strong>6.) VMWare Nagios Check<\/strong><\/p>\n\n\n\n<p>I\u00b4m using this nagios check script from box293 published on exchange.nagios.org:<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/exchange.nagios.org\/directory\/Plugins\/Operating-Systems\/%2A-Virtual-Environments\/VMWare\/box293_check_vmware\/details\n<\/div><\/figure>\n\n\n\n<p>With the obove steps (1 to 5) I was able to use any centos machine&nbsp;instead of the VMWare vMA<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Schrittweise Anleitung zur Installation der VMware vCLI unter Redhat\/Centos HowTo install Vmware vCLI under Redhat\/Centos OS 1.) Install epel Repository<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[3],"tags":[117,123,179,180,181,182,190,192],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-kb","tag-linux","tag-linux-vcli-install","tag-vcli","tag-vcli-install","tag-vcli-nagios-install","tag-vmware","tag-vmware-nagios","tag-vmware-vcli"],"_links":{"self":[{"href":"https:\/\/www.winni.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winni.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winni.at\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winni.at\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winni.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=113"}],"version-history":[{"count":0,"href":"https:\/\/www.winni.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winni.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winni.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winni.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}