<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Jonathan Marrott's VM Scripting Blog</title>
    <link>http://communities.vmware.com/blogs/froboy</link>
    <description>A swell blog containing some of the scripts I have written for VM management.</description>
    <pubDate>Thu, 27 Mar 2008 20:58:12 GMT</pubDate>
    <generator>Clearspace 1.10.12 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2008-03-27T20:58:12Z</dc:date>
    <item>
      <title>Session Keeper</title>
      <link>http://communities.vmware.com/blogs/froboy/2008/03/27/session-keeper</link>
      <description>Here's a script that will create a session, save it to a session file and keep it alive.  If at any time the session is terminated, the script will create a new session and new session file.&lt;br /&gt;
&lt;br /&gt;
Usage: SessionKeeper.pl --server &amp;lt;servername&amp;gt; --file &amp;lt;session_filename_to_be_saved&amp;gt;</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">perl</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">script</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vi3</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">session</category>
      <pubDate>Thu, 27 Mar 2008 20:58:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2008/03/27/session-keeper</guid>
      <dc:date>2008-03-27T20:58:00Z</dc:date>
      <clearspace:dateToText>1 year, 7 months ago</clearspace:dateToText>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/session-keeper</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1611</wfw:commentRss>
    </item>
    <item>
      <title>List DCs and Clusters</title>
      <link>http://communities.vmware.com/blogs/froboy/2008/01/22/list-dcs-and-clusters</link>
      <description>These two scripts are both designed for enumeration of objects.  The cluster specific script will also enumerate HA properties about that cluster.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
listdcs.pl --server lewvc --username &amp;lt;username&amp;gt; --password &amp;lt;password&amp;gt;&lt;br /&gt;
listdcclusters.pl --server lewvc --username &amp;lt;username&amp;gt; --password &amp;lt;password&amp;gt; --datacenter &amp;lt;DC Name&amp;gt;</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vi3</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">perl</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">script</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vc</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">cluster</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">datacenter</category>
      <pubDate>Tue, 22 Jan 2008 20:00:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2008/01/22/list-dcs-and-clusters</guid>
      <dc:date>2008-01-22T20:00:00Z</dc:date>
      <clearspace:dateToText>1 year, 9 months ago</clearspace:dateToText>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/list-dcs-and-clusters</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1413</wfw:commentRss>
    </item>
    <item>
      <title>List All VMs (Updated)</title>
      <link>http://communities.vmware.com/blogs/froboy/2008/01/22/list-all-vms-updated</link>
      <description>These scripts will list all vms registered with Virtual Center or a specific Datacenter object.&lt;br /&gt;
&lt;br /&gt;
Usage: listdcvms.pl --server &amp;lt;VC Server&amp;gt; --username &amp;lt;username&amp;gt; --password &amp;lt;password&amp;gt; --datacenter &amp;lt;DC Name&amp;gt;&lt;br /&gt;
Usage: listallvms.pl --server &amp;lt;VC Server&amp;gt; --username &amp;lt;username&amp;gt; --password &amp;lt;password&amp;gt;</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">script</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">perl</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vi</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">list</category>
      <pubDate>Tue, 22 Jan 2008 18:55:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2008/01/22/list-all-vms-updated</guid>
      <dc:date>2008-01-22T18:55:00Z</dc:date>
      <clearspace:dateToText>2 years, 1 month ago</clearspace:dateToText>
      <clearspace:replyCount>7</clearspace:replyCount>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/list-all-vms-updated</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1069</wfw:commentRss>
    </item>
    <item>
      <title>Additional Blog, etc.</title>
      <link>http://communities.vmware.com/blogs/froboy/2008/01/18/additional-blog-etc</link>
      <description>Since this particular blog is dedicated to VMWare and scripting, I have created a more general tech blog.  This blog will also contain some VMWare info that is not scripting related.  Initially it contains notes from the recent ESX training I went through.  If you have been through the Install and Configure training and are preparing for your VCP exam, these notes will prove very helpful.  I just passed my VCP exam today with a 91%.  That was lower than I wanted, but I did hurry through it in about 30 min. I am sure that I glazed over some questions.&lt;br /&gt;
&lt;br /&gt;
You can find it at:&lt;br /&gt;
&lt;a class="jive-link-external" href="http://www.marrotts.net/blogs/techblog/"&gt;My Tech Blog&lt;/a&gt;</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">blog</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vcp</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">training</category>
      <pubDate>Fri, 18 Jan 2008 18:56:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2008/01/18/additional-blog-etc</guid>
      <dc:date>2008-01-18T18:56:00Z</dc:date>
      <clearspace:dateToText>1 year, 9 months ago</clearspace:dateToText>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/additional-blog-etc</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1406</wfw:commentRss>
    </item>
    <item>
      <title>Firewall - XML Changes (Updated)</title>
      <link>http://communities.vmware.com/blogs/froboy/2008/01/18/firewall-xml-changes-updated</link>
      <description>I decided that I didn't like changing the firewall by executing esxcfg-firewall all the time. So I edited the appropriate XML file to include the nececssary ports for TSM and VMM (HP) agent.  This is different for ESX 3.0.x and 3.5. &lt;b&gt;One word of caution: In ESX 3.5 if you add a service to services.xml and it exists in another XML file.  You can render your system inaccessible.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;ESX 3.5&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Service - TSM&lt;/b&gt;&lt;br /&gt;
Location - ibmTSM.xml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Firewall configuration information for IBM TSM --&amp;gt;&lt;br /&gt;
&amp;lt;ConfigRoot&amp;gt;&lt;br /&gt;
  &amp;lt;service&amp;gt;&lt;br /&gt;
    &amp;lt;id&amp;gt;TSM&amp;lt;/id&amp;gt;&lt;br /&gt;
    &amp;lt;rule id='0000'&amp;gt;&lt;br /&gt;
      &amp;lt;direction&amp;gt;inbound&amp;lt;/direction&amp;gt;&lt;br /&gt;
      &amp;lt;protocol&amp;gt;tcp&amp;lt;/protocol&amp;gt;&lt;br /&gt;
      &amp;lt;port type='dst'&amp;gt;1500&amp;lt;/port&amp;gt;&lt;br /&gt;
      &amp;lt;flags&amp;gt;-m state --state NEW&amp;lt;/flags&amp;gt;&lt;br /&gt;
    &amp;lt;/rule&amp;gt;&lt;br /&gt;
    &amp;lt;rule id='0001'&amp;gt;&lt;br /&gt;
      &amp;lt;direction&amp;gt;outbound&amp;lt;/direction&amp;gt;&lt;br /&gt;
      &amp;lt;protocol&amp;gt;tcp&amp;lt;/protocol&amp;gt;&lt;br /&gt;
      &amp;lt;port type='dst'&amp;gt;1500&amp;lt;/port&amp;gt;&lt;br /&gt;
      &amp;lt;flags&amp;gt;-m state --state NEW&amp;lt;/flags&amp;gt;&lt;br /&gt;
    &amp;lt;/rule&amp;gt;&lt;br /&gt;
        &amp;lt;rule id='0002'&amp;gt;&lt;br /&gt;
      &amp;lt;direction&amp;gt;inbound&amp;lt;/direction&amp;gt;&lt;br /&gt;
      &amp;lt;protocol&amp;gt;tcp&amp;lt;/protocol&amp;gt;&lt;br /&gt;
      &amp;lt;port type='dst'&amp;gt;&lt;br /&gt;
        &amp;lt;begin&amp;gt;1581&amp;lt;/begin&amp;gt;&lt;br /&gt;
        &amp;lt;end&amp;gt;1583&amp;lt;/end&amp;gt;&lt;br /&gt;
      &amp;lt;/port&amp;gt;&lt;br /&gt;
      &amp;lt;flags&amp;gt;-m state --state NEW&amp;lt;/flags&amp;gt;&lt;br /&gt;
    &amp;lt;/rule&amp;gt;&lt;br /&gt;
    &amp;lt;rule id='0003'&amp;gt;&lt;br /&gt;
      &amp;lt;direction&amp;gt;outbound&amp;lt;/direction&amp;gt;&lt;br /&gt;
      &amp;lt;protocol&amp;gt;tcp&amp;lt;/protocol&amp;gt;&lt;br /&gt;
      &amp;lt;port type='dst'&amp;gt;&lt;br /&gt;
        &amp;lt;begin&amp;gt;1581&amp;lt;/begin&amp;gt;&lt;br /&gt;
        &amp;lt;end&amp;gt;1583&amp;lt;/end&amp;gt;&lt;br /&gt;
      &amp;lt;/port&amp;gt;&lt;br /&gt;
      &amp;lt;flags&amp;gt;-m state --state NEW&amp;lt;/flags&amp;gt;&lt;br /&gt;
    &amp;lt;/rule&amp;gt;&lt;br /&gt;
  &amp;lt;/service&amp;gt;&lt;br /&gt;
&amp;lt;/ConfigRoot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;ESX 3.0.x&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Service - TSM&lt;/b&gt;&lt;br /&gt;
Location - services.xml&lt;br /&gt;
  &amp;lt;service id='0023'&amp;gt;&lt;br /&gt;
    &amp;lt;id&amp;gt;TSM&amp;lt;/id&amp;gt;&lt;br /&gt;
    &amp;lt;rule id='0000'&amp;gt;&lt;br /&gt;
      &amp;lt;direction&amp;gt;inbound&amp;lt;/direction&amp;gt;&lt;br /&gt;
      &amp;lt;protocol&amp;gt;tcp&amp;lt;/protocol&amp;gt;&lt;br /&gt;
      &amp;lt;port type='dst'&amp;gt;1500&amp;lt;/port&amp;gt;&lt;br /&gt;
      &amp;lt;flags&amp;gt;-m state --state NEW&amp;lt;/flags&amp;gt;&lt;br /&gt;
    &amp;lt;/rule&amp;gt;&lt;br /&gt;
    &amp;lt;rule id='0001'&amp;gt;&lt;br /&gt;
      &amp;lt;direction&amp;gt;outbound&amp;lt;/direction&amp;gt;&lt;br /&gt;
      &amp;lt;protocol&amp;gt;tcp&amp;lt;/protocol&amp;gt;&lt;br /&gt;
      &amp;lt;port type='dst'&amp;gt;1500&amp;lt;/port&amp;gt;&lt;br /&gt;
      &amp;lt;flags&amp;gt;-m state --state NEW&amp;lt;/flags&amp;gt;&lt;br /&gt;
    &amp;lt;/rule&amp;gt;&lt;br /&gt;
        &amp;lt;rule id='0002'&amp;gt;&lt;br /&gt;
      &amp;lt;direction&amp;gt;inbound&amp;lt;/direction&amp;gt;&lt;br /&gt;
      &amp;lt;protocol&amp;gt;tcp&amp;lt;/protocol&amp;gt;&lt;br /&gt;
      &amp;lt;port type='dst'&amp;gt;&lt;br /&gt;
        &amp;lt;begin&amp;gt;1581&amp;lt;/begin&amp;gt;&lt;br /&gt;
        &amp;lt;end&amp;gt;1583&amp;lt;/end&amp;gt;&lt;br /&gt;
      &amp;lt;/port&amp;gt;&lt;br /&gt;
      &amp;lt;flags&amp;gt;-m state --state NEW&amp;lt;/flags&amp;gt;&lt;br /&gt;
    &amp;lt;/rule&amp;gt;&lt;br /&gt;
    &amp;lt;rule id='0003'&amp;gt;&lt;br /&gt;
      &amp;lt;direction&amp;gt;outbound&amp;lt;/direction&amp;gt;&lt;br /&gt;
      &amp;lt;protocol&amp;gt;tcp&amp;lt;/protocol&amp;gt;&lt;br /&gt;
      &amp;lt;port type='dst'&amp;gt;&lt;br /&gt;
        &amp;lt;begin&amp;gt;1581&amp;lt;/begin&amp;gt;&lt;br /&gt;
        &amp;lt;end&amp;gt;1583&amp;lt;/end&amp;gt;&lt;br /&gt;
      &amp;lt;/port&amp;gt;&lt;br /&gt;
      &amp;lt;flags&amp;gt;-m state --state NEW&amp;lt;/flags&amp;gt;&lt;br /&gt;
    &amp;lt;/rule&amp;gt;&lt;br /&gt;
  &amp;lt;/service&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Service - VMM&lt;/b&gt;&lt;br /&gt;
Location - services.xml&lt;br /&gt;
&lt;i&gt;Note: We discontinued use of VMM do to VM reboots.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;service id='0028'&amp;gt;&lt;br /&gt;
    &amp;lt;id&amp;gt;VmmService&amp;lt;/id&amp;gt;&lt;br /&gt;
    &amp;lt;rule id='0000'&amp;gt;&lt;br /&gt;
      &amp;lt;direction&amp;gt;inbound&amp;lt;/direction&amp;gt;&lt;br /&gt;
      &amp;lt;protocol&amp;gt;tcp&amp;lt;/protocol&amp;gt;&lt;br /&gt;
      &amp;lt;port type='dst'&amp;gt;&lt;br /&gt;
        &amp;lt;begin&amp;gt;1124&amp;lt;/begin&amp;gt;&lt;br /&gt;
        &amp;lt;end&amp;gt;1126&amp;lt;/end&amp;gt;&lt;br /&gt;
      &amp;lt;/port&amp;gt;&lt;br /&gt;
      &amp;lt;flags&amp;gt;-m state --state NEW&amp;lt;/flags&amp;gt;&lt;br /&gt;
    &amp;lt;/rule&amp;gt;&lt;br /&gt;
    &amp;lt;rule id='0001'&amp;gt;&lt;br /&gt;
      &amp;lt;direction&amp;gt;outbound&amp;lt;/direction&amp;gt;&lt;br /&gt;
      &amp;lt;protocol&amp;gt;tcp&amp;lt;/protocol&amp;gt;&lt;br /&gt;
      &amp;lt;port type='dst'&amp;gt;&lt;br /&gt;
        &amp;lt;begin&amp;gt;1124&amp;lt;/begin&amp;gt;&lt;br /&gt;
        &amp;lt;end&amp;gt;1126&amp;lt;/end&amp;gt;&lt;br /&gt;
      &amp;lt;/port&amp;gt;&lt;br /&gt;
      &amp;lt;flags&amp;gt;-m state --state NEW&amp;lt;/flags&amp;gt;&lt;br /&gt;
    &amp;lt;/rule&amp;gt;&lt;br /&gt;
  &amp;lt;/service&amp;gt;</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">esx</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">firewall</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">xml</category>
      <pubDate>Fri, 18 Jan 2008 18:54:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2008/01/18/firewall-xml-changes-updated</guid>
      <dc:date>2008-01-18T18:54:00Z</dc:date>
      <clearspace:dateToText>2 years, 1 month ago</clearspace:dateToText>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/firewall-xml-changes-updated</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1051</wfw:commentRss>
    </item>
    <item>
      <title>Enable VMotion on VMKernel port</title>
      <link>http://communities.vmware.com/blogs/froboy/2008/01/18/enable-vmotion-on-vmkernel-port</link>
      <description>This will enable VMotion on a VMKernel port. I am writing this one because it changed between verisons of ESX.  This command uses the very useful vimsh.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;ESX 3.0.x:&lt;/b&gt;&lt;br /&gt;
vimsh -n -e "/hostsvc/vmotion/vnic_set portgroup2"&lt;br /&gt;
portgroup# - Determined by the order of portgroup creation. The system automatically makes one to begin with.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;ESX 3.5:&lt;/b&gt;&lt;br /&gt;
vimsh -n -e "/hostsvc/vmotion/vnic_set vmk0"&lt;br /&gt;
vmk# - Determined by the order of the VMKernel port creation. The first one created is '0'.</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">esx</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vimsh</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vmotion</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vmkernel</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">script</category>
      <pubDate>Fri, 18 Jan 2008 18:32:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2008/01/18/enable-vmotion-on-vmkernel-port</guid>
      <dc:date>2008-01-18T18:32:00Z</dc:date>
      <clearspace:dateToText>1 year, 9 months ago</clearspace:dateToText>
      <clearspace:replyCount>5</clearspace:replyCount>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/enable-vmotion-on-vmkernel-port</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1405</wfw:commentRss>
    </item>
    <item>
      <title>Create NFS Mount on ESX (Updated)</title>
      <link>http://communities.vmware.com/blogs/froboy/2008/01/18/create-nfs-mount-on-esx-updated</link>
      <description>I like to have a mount on each of my ESX servers to allow for quick installations and centralized scripting for cron jobs.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;NFS Mount visible from host and service console:&lt;/b&gt;&lt;br /&gt;
&amp;lt;Required to have a Service Console and VMKernel port&amp;gt;&lt;br /&gt;
&lt;i&gt;This can be accessed from /vmfs/volumes/&amp;lt;datastore&amp;gt;&lt;/i&gt;&lt;br /&gt;
esxcfg-firewall -e nfsClient&lt;br /&gt;
esxcfg-nas -a -o nfsserver.yourdomain.com -s /vol/vm nfs01&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Manual mount visible from the service console only:&lt;/b&gt;&lt;br /&gt;
1. Edit /etc/rc.d/rc.local&lt;br /&gt;
2. Add: mount nfsserver.yourdomain.com:/vol/vm /mnt/vm&lt;br /&gt;
   This will allow it to mount on boot.&lt;br /&gt;
3. Execute: mkdir /mnt/vm&lt;br /&gt;
4. Execute: chkconfig portmap on&lt;br /&gt;
5. Execute: service portmap start&lt;br /&gt;
6. Execute: esxcfg-firewall -e nfsClient&lt;br /&gt;
7. Execute: mount nfsserver.yourdomain.com:/vol/vm /mnt/vm&lt;br /&gt;
   This will immediately mount.</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">esxcfg-nas</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">esx</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">mount</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">nfs</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">script</category>
      <pubDate>Fri, 18 Jan 2008 18:30:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2008/01/18/create-nfs-mount-on-esx-updated</guid>
      <dc:date>2008-01-18T18:30:00Z</dc:date>
      <clearspace:dateToText>2 years, 1 month ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/create-nfs-mount-on-esx-updated</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1056</wfw:commentRss>
    </item>
    <item>
      <title>DNS - Set Servers (Updated)</title>
      <link>http://communities.vmware.com/blogs/froboy/2008/01/18/dns-set-servers-updated</link>
      <description>Simple script to set DNS servers. This sets muplitle DNS servers while kickstart by default only sets one.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Set DNS servers using vimsh:&lt;/b&gt;&lt;br /&gt;
vimsh -n -e "/hostsvc/net/dns_set --dns-addresses=192.168.0.1,192.168.0.2 --dns-searchdomain=yourdomain.com"&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Set DNS servers by manually creating resolv.conf:&lt;/b&gt;&lt;br /&gt;
cat &amp;gt; /etc/resolv.conf &amp;lt;&amp;lt; EOF1&lt;br /&gt;
&lt;br /&gt;
search yourdomain.com&lt;br /&gt;
nameserver 192.168.0.4&lt;br /&gt;
nameserver 192.168.0.6&lt;br /&gt;
&lt;br /&gt;
EOF1</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vimsh</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">dns</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">esx</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">install</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">script</category>
      <pubDate>Fri, 18 Jan 2008 18:22:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2008/01/18/dns-set-servers-updated</guid>
      <dc:date>2008-01-18T18:22:00Z</dc:date>
      <clearspace:dateToText>2 years, 1 month ago</clearspace:dateToText>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/dns-set-servers-updated</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1055</wfw:commentRss>
    </item>
    <item>
      <title>Perl Expect and IO::Tty Installations on ESX (Updated)</title>
      <link>http://communities.vmware.com/blogs/froboy/2008/01/18/perl-expect-and-iotty-installations-on-esx-updated</link>
      <description>&lt;b&gt;ESX Friendly Method:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Install IO:Tty -&lt;/b&gt;&lt;br /&gt;
1. Download Perl-IO-TTY from &lt;a class="jive-link-external" href="ftp://rpmfind.net/linux/dag/redhat/el3/en/i386/dag/RPMS/perl-IO-Tty-1.07-1.el3.rf.i386.rpm"&gt;here&lt;/a&gt;&lt;br /&gt;
2. Copy to your host or execute from a shared location&lt;br /&gt;
3. Execute 'rpm -ivh perl-IO-Tty-1.07-1.el3.rf.i386.rpm'&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Install Expect.pm -&lt;/b&gt;&lt;br /&gt;
1. Download Perl-Expect from &lt;a class="jive-link-external" href="ftp://rpmfind.net/linux/dag/redhat/el3/en/i386/dag/RPMS/perl-Expect-1.21-1.el3.rf.noarch.rpm"&gt;here&lt;/a&gt;&lt;br /&gt;
2. Copy to your host or execute from a shared location&lt;br /&gt;
3. Execute 'rpm -ivh perl-Expect-1.21-1.el3.rf.noarch.rpm'&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Pain-in-the-butt Method:&lt;/b&gt;&lt;br /&gt;
You can download these from &lt;a class="jive-link-external" href="http://sourceforge.net/projects/expectperl/"&gt;http://sourceforge.net/projects/expectperl/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The installation itself is pretty simple. IO::Tty needs to be installed first. This installation does not add additional items to run in RAM.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Install IO:Tty -&lt;/b&gt;&lt;br /&gt;
1. Decompress file.&lt;br /&gt;
2. Browse to location of files.&lt;br /&gt;
3. Execute perl Makefile.PL&lt;br /&gt;
4. Execute make&lt;br /&gt;
5. Execute make install&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Install Expect.pm -&lt;/b&gt;&lt;br /&gt;
1. Decompress file.&lt;br /&gt;
2. Browse to location of files.&lt;br /&gt;
3. Execute perl Makefile.PL&lt;br /&gt;
4. Execute make&lt;br /&gt;
5. Execute make install</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">script</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">install</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">perl</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">expect</category>
      <pubDate>Fri, 18 Jan 2008 18:21:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2008/01/18/perl-expect-and-iotty-installations-on-esx-updated</guid>
      <dc:date>2008-01-18T18:21:00Z</dc:date>
      <clearspace:dateToText>2 years, 1 month ago</clearspace:dateToText>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/perl-expect-and-iotty-installations-on-esx-updated</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1048</wfw:commentRss>
    </item>
    <item>
      <title>Set Service Console Memory (Updated)</title>
      <link>http://communities.vmware.com/blogs/froboy/2008/01/18/set-service-console-memory-updated</link>
      <description>The service console memory should be increased if you are running apps other than the default install.  This includes management agents, backups, etc.  Here is a simple command that I ran across to accomplish this.  It requires a reboot to take effect.  I incorporate this in my kickstart script. Don't forget to set your swap partition to be 2x the Service Console memory.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;See Current Setting:&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;The setting shown is in bytes (MB * 1024 * 1024)&lt;/i&gt;&lt;br /&gt;
vimsh -n -e "/hostsvc/memoryinfo"&lt;br /&gt;
serviceConsoleReserved - Current setting&lt;br /&gt;
serviceConsoleReservedCfg - Setting after next reboot&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Set to 800MB with vimsh:&lt;/b&gt;&lt;br /&gt;
vimsh -n -e "/hostsvc/memoryinfo 838860800"&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Set by manual edit of files:&lt;/b&gt;&lt;br /&gt;
mv -f /etc/vmware/esx.conf /tmp/esx.conf.bak&lt;br /&gt;
sed -e 's/boot\/memSize = \"272\"/boot\/memSize = \"512\"/g' /tmp/esx.conf.bak &amp;gt;&amp;gt; /etc/vmware/esx.conf&lt;br /&gt;
&lt;br /&gt;
mv -f /boot/grub/grub.conf /tmp/grub.conf.bak&lt;br /&gt;
sed -e 's/uppermem 277504/uppermem 523264/g' -e 's/mem=272M/mem=512M/g' /tmp/grub.conf.bak &amp;gt;&amp;gt; /boot/grub/grub.conf&lt;br /&gt;
&lt;br /&gt;
If you feel like setting it to the maximum of 800 MB.&lt;br /&gt;
&lt;br /&gt;
mv -f /etc/vmware/esx.conf /tmp/esx.conf.bak&lt;br /&gt;
sed -e 's/boot\/memSize = \"272\"/boot\/memSize = \"800\"/g' /tmp/esx.conf.bak &amp;gt;&amp;gt; /etc/vmware/esx.conf&lt;br /&gt;
&lt;br /&gt;
mv -f /boot/grub/grub.conf /tmp/grub.conf.bak&lt;br /&gt;
sed -e 's/uppermem 277504/uppermem 818176/g' -e 's/mem=272M/mem=800M/g' /tmp/grub.conf.bak &amp;gt;&amp;gt; /boot/grub/grub.conf</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vimsh</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">esx</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">script</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">memory</category>
      <pubDate>Fri, 18 Jan 2008 17:09:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2008/01/18/set-service-console-memory-updated</guid>
      <dc:date>2008-01-18T17:09:00Z</dc:date>
      <clearspace:dateToText>2 years, 1 month ago</clearspace:dateToText>
      <clearspace:replyCount>4</clearspace:replyCount>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/set-service-console-memory-updated</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1053</wfw:commentRss>
    </item>
    <item>
      <title>VI Custom Fields</title>
      <link>http://communities.vmware.com/blogs/froboy/2008/01/07/vi-custom-fields</link>
      <description>I decided to dabble into custom fields.  I have scripts to add, remove, rename and set custom fields.  I also have a cool script to export your custom fields to a CSV file and vice versa.&lt;br /&gt;
&lt;br /&gt;
Prerequisites:&lt;br /&gt;
VI 3.5 (VI API 2.5.0)&lt;br /&gt;
Latest VI Perl Toolkit (VMware VI Remote CLI will install this)&lt;br /&gt;
Text::CSV_XS (Perl module for CSVs)&lt;br /&gt;
Text::CSV::Simple (Perl module for CSVs)&lt;br /&gt;
&lt;br /&gt;
Scripts:&lt;br /&gt;
addvifield.pl - Adds Custom Field to VI&lt;br /&gt;
cf2csv.pl - Exports Custom Fields to CSV File&lt;br /&gt;
csv2cf.pl - Imports CSV File to Custom Fields (Note: Custom Fields must already be created)&lt;br /&gt;
readdcfields.pl - Reads all Custom Fields from every VM in a datacenter&lt;br /&gt;
readvmfield.pl - Reads a single Custom Fields from a VM&lt;br /&gt;
readvmfields.pl - Reads all Custom Fields from a VM&lt;br /&gt;
removevifield.pl - Removes a Custom Fields from VI&lt;br /&gt;
renamevifield.pl - Renames a Custom Field in VI&lt;br /&gt;
setvmfield.pl - Assigns a value to a Custom Field in a VM&lt;br /&gt;
setdctools.pl - Reads VMWare Tools Version From Each VM In A Datacenter And Applies It To The Custom Field "Tools Version"</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">csv</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vi3</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">script</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">perl</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">spreadsheet</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">custom</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">fields</category>
      <pubDate>Mon, 07 Jan 2008 15:45:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2008/01/07/vi-custom-fields</guid>
      <dc:date>2008-01-07T15:45:00Z</dc:date>
      <clearspace:dateToText>1 year, 10 months ago</clearspace:dateToText>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/vi-custom-fields</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1373</wfw:commentRss>
    </item>
    <item>
      <title>VC Licensing Spreadsheet</title>
      <link>http://communities.vmware.com/blogs/froboy/2007/11/21/vc-licensing-spreadsheet</link>
      <description>I put my licensing script into a spreadsheet...&lt;br /&gt;
&lt;br /&gt;
You need to populate your own hostnames and licensing server, but it will query the licensing log against those hostnames.</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">license</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">script</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vc</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vi</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">esx</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">excel</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">spreadsheet</category>
      <pubDate>Wed, 21 Nov 2007 16:17:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2007/11/21/vc-licensing-spreadsheet</guid>
      <dc:date>2007-11-21T16:17:00Z</dc:date>
      <clearspace:dateToText>1 year, 11 months ago</clearspace:dateToText>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/vc-licensing-spreadsheet</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1251</wfw:commentRss>
    </item>
    <item>
      <title>VC Licensing</title>
      <link>http://communities.vmware.com/blogs/froboy/2007/11/16/vc-licensing</link>
      <description>Do you know which servers have got a hold of your VC licenses?  I had a tedious time looking through the log on VC to get an exact count.  All of the check in's and out's complicated things to.  So here is a script to parse the VC licensing log to see who has what.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
vclic.vbs /s:&amp;lt;VC License Server&amp;gt;</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">esx</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vi</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">script</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">license</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">virtual</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">center</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">vc</category>
      <pubDate>Fri, 16 Nov 2007 22:40:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2007/11/16/vc-licensing</guid>
      <dc:date>2007-11-16T22:40:00Z</dc:date>
      <clearspace:dateToText>1 year, 11 months ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/vc-licensing</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1231</wfw:commentRss>
    </item>
    <item>
      <title>TSM - Restore VM Images</title>
      <link>http://communities.vmware.com/blogs/froboy/2007/10/05/tsm-restore-vm-images</link>
      <description>Procedure Overview:&lt;br /&gt;
&lt;br /&gt;
Restore Files &lt;br /&gt;
VM Registration &lt;br /&gt;
Restore Files:&lt;br /&gt;
&lt;br /&gt;
Browse to &lt;a class="jive-link-external" href="http://"&gt;http://&lt;/a&gt;&amp;lt;servername&amp;gt;:1581 &lt;br /&gt;
Click 'Restore' &lt;br /&gt;
Enter username and password.  Press &amp;lt;Enter&amp;gt; &lt;br /&gt;
Click 'View' -&amp;gt; 'Display active/inactive files' &lt;br /&gt;
Click 'Yes' &lt;br /&gt;
Under 'File Level' browse to the location of the guest to restore. &lt;br /&gt;
Place a check mark next to the latest versions of: *.vmx, *.vmxf, *.vmdk &lt;br /&gt;
Click Restore &lt;br /&gt;
VM Registration&lt;br /&gt;
&lt;br /&gt;
Browse to the guest folder &lt;br /&gt;
Edit the .vmx file. &lt;br /&gt;
Remove the "-00000?" from the 'scsi0:0.fileName' parameter so that it matches the main vmdk file. &lt;br /&gt;
Execute: vmware-cmd -s register &amp;lt;path to vmx file&amp;gt; &lt;br /&gt;
Power on VM using Virtual Center. &lt;br /&gt;
Troubleshooting:&lt;br /&gt;
&lt;br /&gt;
"The system cannot find the file specified" - This is caused by 'scsi0:0.fileName'  parameter in the vmx file pointing to an incorrect vmdk file or to the *-00000?.vmdk file&lt;br /&gt;
&lt;br /&gt;
"A file was not found." - Same as "The system cannot find the file specified"</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">dsm</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">backup</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">tsm</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">esx</category>
      <pubDate>Fri, 05 Oct 2007 14:09:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2007/10/05/tsm-restore-vm-images</guid>
      <dc:date>2007-10-05T14:09:00Z</dc:date>
      <clearspace:dateToText>2 years, 1 month ago</clearspace:dateToText>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/tsm-restore-vm-images</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1099</wfw:commentRss>
    </item>
    <item>
      <title>List Snapshots on ESX Host</title>
      <link>http://communities.vmware.com/blogs/froboy/2007/09/28/list-snapshots-on-esx-host</link>
      <description>This script will list all snapshots for guests assigned to a specific host.</description>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">esx</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">host</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">snapshot</category>
      <category domain="http://communities.vmware.com/blogs/froboy/tags">script</category>
      <pubDate>Fri, 28 Sep 2007 20:16:00 GMT</pubDate>
      <author>froboy</author>
      <guid>http://communities.vmware.com/blogs/froboy/2007/09/28/list-snapshots-on-esx-host</guid>
      <dc:date>2007-09-28T20:16:00Z</dc:date>
      <clearspace:dateToText>2 years, 1 month ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
      <wfw:comment>http://communities.vmware.com/blogs/froboy/comment/list-snapshots-on-esx-host</wfw:comment>
      <wfw:commentRss>http://communities.vmware.com/blogs/froboy/feeds/comments?blogPostID=1057</wfw:commentRss>
    </item>
  </channel>
</rss>

