<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>vSential &#187; Linux</title>
	<atom:link href="http://vsential.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://vsential.com</link>
	<description>virtualization in the real world</description>
	<lastBuildDate>Wed, 25 Jan 2012 15:00:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ESXi 5.0 and APC SmartUPS 1000</title>
		<link>http://vsential.com/2011/09/esxi-5-0-apc-smartups-1000/</link>
		<comments>http://vsential.com/2011/09/esxi-5-0-apc-smartups-1000/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 16:02:00 +0000</pubDate>
		<dc:creator>jamesbowling</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[5.0]]></category>
		<category><![CDATA[ESXi]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[vCLI]]></category>
		<category><![CDATA[vMA]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://vsential.com/?p=491</guid>
		<description><![CDATA[So the company I work for had a deployment scenario in place for there remote branches utilizing VMware Server 2 prior to me coming onboard.  I was tasked with the redesign of our remote branch virtualization infrastructure.  In comes ESXi 5.0 to replace the fading away VMware Server.  Initially they were using a software-based RAID [...]]]></description>
			<content:encoded><![CDATA[<p>So the company I work for had a deployment scenario in place for there remote branches utilizing VMware Server 2 prior to me coming onboard.  I was tasked with the redesign of our remote branch virtualization infrastructure.  In comes ESXi 5.0 to replace the fading away VMware Server.  Initially they were using a software-based RAID which was controlled through a SLES installation.  With the requirements of ESXi we all know that software RAID is not an option.  We have since decided on utilizing an Adaptec 2405 RAID controller for these remote servers.  Now that my test lab can boot into ESXi I can move forward with the remaining requirements.</p>
<p>&nbsp;</p>
<h3>Clean Shutdown of VMs and Host</h3>
<p>In order for us to have the ability to interface with the APC SmartUPS 1000&#8242;s that we have at each location for the server we must find a way to install the APC PowerChute Business Edition Agent (PCBEAgent) for use with monitoring and shutting down the host and VMs.  In comes the vSphere Management Assistant (vMA).</p>
<div class='et-box et-warning'>
					<div class='et-box-content'>Please note that this setup IS NOT a supported solution by either VMware or APC. Use of this method is at the sole discretion of the admin and the teams supporting the sites!</div></div>
<p>In order to install the APC PCBEAgent, we needed either a Linux VM or a Windows VM.  In the light of trying to architect a solution that minimizes costs and addition of other hardware, we selected a Linux VM or in this case the vMA.  The vMA is a SLES4VMware-based appliance and therefore gives us the ability to build or install agents accordingly.  Finally, we just grabbed the installer from APC for the RPM which could be installed on the vMA.  Installation on the vMA was simple:</p>
<div class='et-box et-shadow'>
					<div class='et-box-content'># rpm -ivh pbeagent-xxx.i386.rpm</div></div>
<p>This placed the PBEAgent in /opt/APC/PowerChuteBusinessEdition/Agent.  This will also install the startup script in /etc/init.d.  Once it is installed you will need to do the initial configuration by running the config.sh script from within the aforementioned directory.  This will allow you to setup the administrative username and password to login and control the agent from the webUI that the agent starts.  After you have configured it should start the agent, if not, just start the agent manually.  The startup script is PBEAgent and can be started via /etc/init.d/PBEAgent start.  Once you start the agent you can connect to it via https://&lt;vMA-IP&gt;:6547.  Once you are in the webUI you will notice that there is no communication with the APC unit.  Here brings us into the next step, configure Serial Passthrough on the vMA appliance.</p>
<p>&nbsp;</p>
<h3>Serial Passthrough on the vMA Appliance</h3>
<p>In order to configure Serial Passthrough you must power down the vMA appliance.  Once you have powered down the vMA appliance you can add the Serial Port interface on the VM.  You will select the &#8220;Use physical port&#8221; option and it should show a device similar to this:  /dev/char/serial/uart0</p>
<p>Once this is done power your vMA appliance back on and connect to the PBEAgent webUI.  Make sure that you have the APC SmartUPS serial cable connected.  It is important to note that you MUST use the provided cable as the pinout is special.  From here you will need to configure the UPS.  You will want to select &#8220;Server Shutdown&#8221; option on the left side and then select &#8220;System Settings&#8221;.  Here you will be presented with the options for the signaling type (Smart/Simple/Simple with Interface Expander).  You will want to select Smart and for the port use /dev/sttyS0.  Once you have done this select the &#8220;Smart-UPS 1000&#8243; option on the left side to view the status.  If everything was done correctly you should see the Device Status as On line and some other information on the status page.</p>
<p>&nbsp;</p>
<h3>Configure Server Shutdown Script</h3>
<p>Now that we have the proper communication with the UPS and the vMA we need to configure the shutdown script to execute accordingly when we either reach a specified threshold for battery power or as soon as the unit senses loss of power.  I will not go into the details of how to select or configure each but feel free to sound off in the comments if you need help.  All of the scripts or &#8220;cmdfiles&#8221; (as APC calls them) are located in /opt/APC/PowerChuteBusinessEdition/Agent/cmdfiles.  I have created a simple script that utilizes the vCLI SDK.  Here is the script:</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:535px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/sh</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># VmShutdown.sh - Script to gracefully shutdown VMs and Host</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Shutdown Guest VMs</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>vmware-vcli<span style="color: #000000; font-weight: bold;">/</span>apps<span style="color: #000000; font-weight: bold;">/</span>vm<span style="color: #000000; font-weight: bold;">/</span>vmcontrol.pl <span style="color: #660033;">--username</span> root <span style="color: #660033;">--password</span> password <span style="color: #660033;">--operation</span> shutdown <span style="color: #660033;">--vmname</span> TESTVM01 <span style="color: #660033;">--url</span> https:<span style="color: #000000; font-weight: bold;">///</span>sdk<span style="color: #000000; font-weight: bold;">/</span>webService<br />
<br />
<span style="color: #666666; font-style: italic;"># Shutdown ESXi Host</span><br />
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>vicfg-hostops <span style="color: #660033;">--server</span> <span style="color: #660033;">--username</span> root <span style="color: #660033;">--password</span> password <span style="color: #660033;">--operation</span> shutdown <span style="color: #660033;">--force</span> <span style="color: #660033;">--url</span> https:<span style="color: #000000; font-weight: bold;">///</span>sdk<span style="color: #000000; font-weight: bold;">/</span>webService</div></div>
<p>The script can be expanded upon to fit your needs but for the sake of simplicity I have only regarded a single VM and the host itself.  The script must be chmod&#8217;d for execution which can be done via chmod 755 /opt/APC/PowerChuteBusinessEdition/Agent/cmdfiles/VmShutdown.sh.</p>
<p>&nbsp;</p>
<h3>Configure the cmdfile within the PBEAgent</h3>
<p>Login back into your PBEAgent webUI.  From here select &#8220;Events&#8221; on the left side and then select &#8220;Actions&#8221;.  You will be presented with a long list of Event Actions.  You will want to make sure that the events you want to execute shutdown on are showing that shutdown is selected for the event.</p>
<p>Next we will configure the Shutdown Settings to utilize this cmdfile.  Select &#8220;Server Shutdown&#8221; on the left side and then &#8220;Shutdown Settings&#8221;.  You are then presented with the Shutdown Sequence Summary.  At the bottom you can click on &#8220;Configure&#8221;.  Click Configure and then scroll to the bottom where you can see &#8220;Command File&#8221;.  Check the checkbox and from the dropdown, select the script to execute.  I have configured a file execution duration of 2 minutes to allow for the script to execute fully before the vMA gets shutdown by the PBEAgent itself.  You can adjust this to your liking depending on the need and amount of VMs on the single host.  Once you have configured this, click on &#8220;Apply&#8221;.</p>
<p>&nbsp;</p>
<h3>Fin</h3>
<p>This concludes the configuration of the PBEAgent for use on an ESXi standalone host.  This should now allow for a clean shutdown of both your VMs and the ESXi host itself.  It you have any questions then please sound off in the comments below!  Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://vsential.com/2011/09/esxi-5-0-apc-smartups-1000/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>SLES for VMware and VMware Tools</title>
		<link>http://vsential.com/2010/09/sles-for-vmware-and-vmware-tools/</link>
		<comments>http://vsential.com/2010/09/sles-for-vmware-and-vmware-tools/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 18:28:28 +0000</pubDate>
		<dc:creator>jamesbowling</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[ESX]]></category>
		<category><![CDATA[ESXi]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SLES for VMware]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[vSphere]]></category>

		<guid isPermaLink="false">http://vsential.com/?p=77</guid>
		<description><![CDATA[Eric Gray from vCritical posted a good article in regards to the usage of SLES for VMware and installing VMware Tools.  Since the release of SLES for VMware, I would assume we might see a jump in the use of SLES throughout the virtualized SLES shops.  SLES is a pretty popular distribution to begin with [...]]]></description>
			<content:encoded><![CDATA[<p>Eric Gray from <a href="http://vcritical.com">vCritical</a> posted a good <a href="http://www.vcritical.com/2010/09/installing-vmware-tools-osps-in-sles-for-vmware/">article</a> in regards to the usage of SLES for VMware and installing VMware Tools.  Since the release of <a href="http://www.vmware.com/landing_pages/sles-for-vmware/">SLES for VMware</a>, I would assume we might see a jump in the use of SLES throughout the virtualized SLES shops.  SLES is a pretty popular distribution to begin with and has seem to be relatively stable.  Eric states:</p>
<blockquote><p>Virtual machines are not fully functional until VMware Tools are installed in each guest operating system.  If you are using <a href="http://www.vcritical.com/2010/09/sles-for-vmware-first-look/">SLES for VMware</a>, there is an alternate approach for installing Tools, ensuring the best performance from your VM.</p></blockquote>
<p>Jump over to <a href="http://www.vcritical.com">vCritical</a> and check out the <a href="http://www.vcritical.com/2010/09/installing-vmware-tools-osps-in-sles-for-vmware/">article</a>!</p>
<h6>Sourced from: <a href="http://vCritical.com">vCritical.com</a></h6>
]]></content:encoded>
			<wfw:commentRss>http://vsential.com/2010/09/sles-for-vmware-and-vmware-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

