{"id":204,"date":"2014-12-11T08:28:21","date_gmt":"2014-12-11T07:28:21","guid":{"rendered":"http:\/\/mail-e.dk\/pmsapp.org\/?p=204"},"modified":"2014-12-11T08:30:18","modified_gmt":"2014-12-11T07:30:18","slug":"general-ramblings-on-fencing","status":"publish","type":"post","link":"https:\/\/mail-e.dk\/pmsapp.org\/?p=204","title":{"rendered":"General ramblings on fencing"},"content":{"rendered":"<p>I have been playing around with pmsapp v0.2 in my new vmware environment and I got to thinking that maybe it was possible to fence through vmware&#8230; And it is.<\/p>\n<p>A bit of googling gave me this result\u00a0<a href=\"https:\/\/fedorahosted.org\/cluster\/wiki\/VMware_FencingConfig\" target=\"_blank\">https:\/\/fedorahosted.org\/cluster\/wiki\/VMware_FencingConfig<\/a> it turns out that the fence_vmware agent depends on the VI Perl Toolkit so I googled a bit more to find an installation guide from VMware:\u00a0<a href=\"https:\/\/www.vmware.com\/support\/pubs\/beta\/viperltoolkit\/doc\/perl_toolkit_install.html\" target=\"_blank\">https:\/\/www.vmware.com\/support\/pubs\/beta\/viperltoolkit\/doc\/perl_toolkit_install.html<\/a><\/p>\n<p>As I am working on CentOS the perl dependencies can be installed through RPMs. The following list of RPMs seems to satisfy the dependencies.<\/p>\n<pre>perl-Crypt-SSLeay \\\r\nperl-XML-LibXML \\\r\nperl-libwww-perl \\\r\nperl-Class-MethodMaker \\\r\nperl-devel \\\r\nperl-Test-Simple<\/pre>\n<p>I followed VMwares guide to build and install the VI Perl Toolkit, but afterwards it still did not work.<\/p>\n<p>I got an error message saying:<\/p>\n<pre>fence_vmware_helper returned Undefined subroutine &amp;Opts::add_options called at \/usr\/sbin\/fence_vmware_helper line 82.<\/pre>\n<p>Googling for that error gave me this result:\u00a0<a href=\"http:\/\/www.redhat.com\/archives\/linux-cluster\/2011-January\/msg00134.html\" target=\"_blank\">http:\/\/www.redhat.com\/archives\/linux-cluster\/2011-January\/msg00134.html<\/a><\/p>\n<p>Basicly, I need to edit \/usr\/local\/share\/perl5\/VMware\/VIRuntime.pm and add:<\/p>\n<pre>use VMware::VILib;<\/pre>\n<p>above the line:<\/p>\n<pre>use VMware::VIM2Runtime;<\/pre>\n<p>Now I am able to check the status of a VM with fence_vmware<\/p>\n<pre>fence_vmware -o status -a vcenterserver -l [username] -p [password] -n [vmname]<\/pre>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li><a href=\"#\" class=\"sharing-anchor sd-button share-more\"><span>Share<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><div class=\"sharing-hidden\"><div class=\"inner\" style=\"display: none;\"><ul><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-204\" class=\"share-twitter sd-button share-icon\" href=\"https:\/\/mail-e.dk\/pmsapp.org\/?p=204&amp;share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span>Twitter<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-204\" class=\"share-facebook sd-button share-icon\" href=\"https:\/\/mail-e.dk\/pmsapp.org\/?p=204&amp;share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\"><span>Facebook<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>I have been playing around with pmsapp v0.2 in my new vmware environment and I got to thinking that maybe it was possible to fence through vmware&#8230; And it is. A bit of googling gave me this result\u00a0https:\/\/fedorahosted.org\/cluster\/wiki\/VMware_FencingConfig it turns &hellip; <a href=\"https:\/\/mail-e.dk\/pmsapp.org\/?p=204\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li><a href=\"#\" class=\"sharing-anchor sd-button share-more\"><span>Share<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><div class=\"sharing-hidden\"><div class=\"inner\" style=\"display: none;\"><ul><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-204\" class=\"share-twitter sd-button share-icon\" href=\"https:\/\/mail-e.dk\/pmsapp.org\/?p=204&amp;share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span>Twitter<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-204\" class=\"share-facebook sd-button share-icon\" href=\"https:\/\/mail-e.dk\/pmsapp.org\/?p=204&amp;share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\"><span>Facebook<\/span><\/a><\/li><li class=\"share-end\"><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div><\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[1],"tags":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p2gkts-3i","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mail-e.dk\/pmsapp.org\/index.php?rest_route=\/wp\/v2\/posts\/204"}],"collection":[{"href":"https:\/\/mail-e.dk\/pmsapp.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mail-e.dk\/pmsapp.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mail-e.dk\/pmsapp.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mail-e.dk\/pmsapp.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=204"}],"version-history":[{"count":2,"href":"https:\/\/mail-e.dk\/pmsapp.org\/index.php?rest_route=\/wp\/v2\/posts\/204\/revisions"}],"predecessor-version":[{"id":206,"href":"https:\/\/mail-e.dk\/pmsapp.org\/index.php?rest_route=\/wp\/v2\/posts\/204\/revisions\/206"}],"wp:attachment":[{"href":"https:\/\/mail-e.dk\/pmsapp.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mail-e.dk\/pmsapp.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mail-e.dk\/pmsapp.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}