<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Automating vSphere ESX4 host installations</title>
	<atom:link href="http://blog.laspina.ca/ubiquitous/automating-vsphere-esx4-host-installations/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.laspina.ca/ubiquitous/automating-vsphere-esx4-host-installations</link>
	<description>Blogging for technical minds.</description>
	<lastBuildDate>Fri, 19 Mar 2010 22:09:04 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Land of the Lemmings, v2 &#187; VMware vSphere 4 Environments</title>
		<link>http://blog.laspina.ca/ubiquitous/automating-vsphere-esx4-host-installations/comment-page-2#comment-742</link>
		<dc:creator>Land of the Lemmings, v2 &#187; VMware vSphere 4 Environments</dc:creator>
		<pubDate>Tue, 16 Mar 2010 03:27:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.laspina.ca/?p=225#comment-742</guid>
		<description>[...] Upgrading the existing ESX 3.5 nodes to ESX 4 is on the schedule for later this semester or early in the summer. To make the reinstall easier, I&#8217;ve scripted out the installs just about as much as possible using some excellent examples: Cylindric.net and Ubiquitous Talk. [...]</description>
		<content:encoded><![CDATA[<p>[...] Upgrading the existing ESX 3.5 nodes to ESX 4 is on the schedule for later this semester or early in the summer. To make the reinstall easier, I&#8217;ve scripted out the installs just about as much as possible using some excellent examples: Cylindric.net and Ubiquitous Talk. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manoj</title>
		<link>http://blog.laspina.ca/ubiquitous/automating-vsphere-esx4-host-installations/comment-page-2#comment-723</link>
		<dc:creator>Manoj</dc:creator>
		<pubDate>Mon, 08 Mar 2010 05:09:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.laspina.ca/?p=225#comment-723</guid>
		<description>Hello Mike,

I&#039;d like to thank you very much for pointing out where I was going wrong. You are a really an expert at bash scripting. I have always been very envious of people who have this ability. I have always wondered how one could learn to do this? 

Keep up the great work.</description>
		<content:encoded><![CDATA[<p>Hello Mike,</p>
<p>I&#8217;d like to thank you very much for pointing out where I was going wrong. You are a really an expert at bash scripting. I have always been very envious of people who have this ability. I have always wondered how one could learn to do this? </p>
<p>Keep up the great work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike La Spina</title>
		<link>http://blog.laspina.ca/ubiquitous/automating-vsphere-esx4-host-installations/comment-page-2#comment-718</link>
		<dc:creator>Mike La Spina</dc:creator>
		<pubDate>Fri, 05 Mar 2010 12:46:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.laspina.ca/?p=225#comment-718</guid>
		<description>Manoj,

The vimsh entry you are using appears to be a read only informational function. This configuration element is part of the /etc/vmware/esx.conf startup parameters.
You should have a line that resembles the following:

/boot/memSize = &quot;640&quot;

This value determines what the hypervisior will reserve for an esx console VM. It is this configuration element that must be set.
Your post script should find and replace the = memory value
You could use the following:

/bin/sed -i &#039;s/memSize = \&quot;272\&quot;/memSize = \&quot;800\&quot;/g&#039; /etc/vmware/esx.conf
/usr/sbin/esxcfg-boot -g
/usr/sbin/esxcfg-boot -b

Regards,

Mike</description>
		<content:encoded><![CDATA[<p>Manoj,</p>
<p>The vimsh entry you are using appears to be a read only informational function. This configuration element is part of the /etc/vmware/esx.conf startup parameters.<br />
You should have a line that resembles the following:</p>
<p>/boot/memSize = &#8220;640&#8243;</p>
<p>This value determines what the hypervisior will reserve for an esx console VM. It is this configuration element that must be set.<br />
Your post script should find and replace the = memory value<br />
You could use the following:</p>
<p>/bin/sed -i &#8217;s/memSize = \&#8221;272\&#8221;/memSize = \&#8221;800\&#8221;/g&#8217; /etc/vmware/esx.conf<br />
/usr/sbin/esxcfg-boot -g<br />
/usr/sbin/esxcfg-boot -b</p>
<p>Regards,</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manoj</title>
		<link>http://blog.laspina.ca/ubiquitous/automating-vsphere-esx4-host-installations/comment-page-2#comment-715</link>
		<dc:creator>Manoj</dc:creator>
		<pubDate>Thu, 04 Mar 2010 20:33:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.laspina.ca/?p=225#comment-715</guid>
		<description>Hi Mike,

Sorry to trouble you, I have tried several things to try and get the console memory setting to 800MB but for some reason it still doesn&#039;t make the change permanent even after 3-4 reboots. The message still indicates on next reboot.

Any pointers will be greatly appreciated.

Thanks
Manoj</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>Sorry to trouble you, I have tried several things to try and get the console memory setting to 800MB but for some reason it still doesn&#8217;t make the change permanent even after 3-4 reboots. The message still indicates on next reboot.</p>
<p>Any pointers will be greatly appreciated.</p>
<p>Thanks<br />
Manoj</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike La Spina</title>
		<link>http://blog.laspina.ca/ubiquitous/automating-vsphere-esx4-host-installations/comment-page-2#comment-714</link>
		<dc:creator>Mike La Spina</dc:creator>
		<pubDate>Thu, 04 Mar 2010 18:07:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.laspina.ca/?p=225#comment-714</guid>
		<description>Well done Kevin and thanks for sharing your experiance as well.
Regards,
Mike</description>
		<content:encoded><![CDATA[<p>Well done Kevin and thanks for sharing your experiance as well.<br />
Regards,<br />
Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Brooksby</title>
		<link>http://blog.laspina.ca/ubiquitous/automating-vsphere-esx4-host-installations/comment-page-2#comment-713</link>
		<dc:creator>Kevin Brooksby</dc:creator>
		<pubDate>Thu, 04 Mar 2010 10:39:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.laspina.ca/?p=225#comment-713</guid>
		<description>Just thought I would provide an update and a sincere thanks for the hard work and time you put into documenting and sharing this with the community.  I was able to resolve my issue with the my %post woes after initial kickstart reboot setting not sticking by adding a &#039;/bin/sleep 120&#039; statement right after the #!/bin/bash line in the second %post section of the script.  Everything is working perfectly and I am a dangerous man now ready to step my Virtual Infrastructure automation game up :-D</description>
		<content:encoded><![CDATA[<p>Just thought I would provide an update and a sincere thanks for the hard work and time you put into documenting and sharing this with the community.  I was able to resolve my issue with the my %post woes after initial kickstart reboot setting not sticking by adding a &#8216;/bin/sleep 120&#8242; statement right after the #!/bin/bash line in the second %post section of the script.  Everything is working perfectly and I am a dangerous man now ready to step my Virtual Infrastructure automation game up <img src='http://blog.laspina.ca/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Brooksby</title>
		<link>http://blog.laspina.ca/ubiquitous/automating-vsphere-esx4-host-installations/comment-page-2#comment-710</link>
		<dc:creator>Kevin Brooksby</dc:creator>
		<pubDate>Wed, 03 Mar 2010 03:28:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.laspina.ca/?p=225#comment-710</guid>
		<description>I did not get a chance to try that but did come to the understanding that I needed another post section which I was missing originally so the /usr/bin/vmware-vim-cmd hostsvc/vmotion/vnic_set vmk0
and /usr/bin/vmware-vim-cmd hostsvc/memoryinfo 838860800 statements were not applying and throwing that rui.key ssl crypto error.

Here is my current post section, everything applies now (vSwitch related and all so i am further now) except that last post EOF section.  Thoughts/tips would be greatly appreciated.

%post --interpreter=bash

/bin/sleep 90
/usr/sbin/esxcfg-auth --enablead --addomain=domain.local --addc=domain.local

/usr/sbin/groupadd -g 5000 lg-esxsu
/usr/sbin/useradd -u 501 -G lg-esxsu super1
/usr/sbin/useradd -u 502 -G lg-esxsu super2
/usr/sbin/useradd -u 503 -G lg-esxsu super3
esxcfg-firewall -e ntpClient
echo restrict default kod nomodify notrap noquerynopeer &gt; /etc/ntp.conf
echo restrict 127.0.0.1 &gt;&gt; /etc/ntp.conf
echo server 10.20.0.200 &gt;&gt; /etc/ntp.conf
echo driftfile /var/lib/ntp/drift &gt;&gt; /etc/ntp.conf
/sbin/chkconfig --level 345 ntpd on
/etc/init.d/ntpd start
/usr/sbin/esxcfg-vswitch -A LAB_VMs vSwitch0
/usr/sbin/esxcfg-vswitch -A VMotion vSwitch0
/usr/sbin/esxcfg-vswitch -p VMotion -v 10 vSwitch0
/usr/sbin/esxcfg-vswitch -p LAB_VMs -v 11 vSwitch0
/usr/sbin/esxcfg-vswitch -M vmnic0 vSwitch0 -p VMotion
/usr/sbin/esxcfg-vswitch -M vmnic0 vSwitch0 -p LAB_VMs
/usr/sbin/esxcfg-vmknic -a -i 10.10.10.40 -n 255.255.255.0 VMotion
/usr/bin/vimsh -n -e &quot;hostsvc/net/refresh&quot;
/usr/bin/vimsh -n -e &quot;internalsvc/refresh_network&quot;

%post --interpreter=bash

cat &lt; /etc/rc3.d/S99postconf
#!/bin/bash
/usr/sbin/esxcfg-firewall --openport 88,tcp,out,KerberosClientTCP
/usr/sbin/esxcfg-firewall --blockOutgoing
/usr/bin/vmware-vim-cmd hostsvc/vmotion/vnic_set vmk0
/usr/bin/vmware-vim-cmd hostsvc/memoryinfo 838860800
/usr/bin/vmware-vim-cmd vimsvc/auth/entity_permission_add vim.Folder:ha-folder-root lg-esxsu true Admin true
echo “Removing automated post script.”
rm /etc/rc3.d/S99postconf
EOF
chmod +x /etc/rc3.d/S99postconf</description>
		<content:encoded><![CDATA[<p>I did not get a chance to try that but did come to the understanding that I needed another post section which I was missing originally so the /usr/bin/vmware-vim-cmd hostsvc/vmotion/vnic_set vmk0<br />
and /usr/bin/vmware-vim-cmd hostsvc/memoryinfo 838860800 statements were not applying and throwing that rui.key ssl crypto error.</p>
<p>Here is my current post section, everything applies now (vSwitch related and all so i am further now) except that last post EOF section.  Thoughts/tips would be greatly appreciated.</p>
<p>%post &#8211;interpreter=bash</p>
<p>/bin/sleep 90<br />
/usr/sbin/esxcfg-auth &#8211;enablead &#8211;addomain=domain.local &#8211;addc=domain.local</p>
<p>/usr/sbin/groupadd -g 5000 lg-esxsu<br />
/usr/sbin/useradd -u 501 -G lg-esxsu super1<br />
/usr/sbin/useradd -u 502 -G lg-esxsu super2<br />
/usr/sbin/useradd -u 503 -G lg-esxsu super3<br />
esxcfg-firewall -e ntpClient<br />
echo restrict default kod nomodify notrap noquerynopeer &gt; /etc/ntp.conf<br />
echo restrict 127.0.0.1 &gt;&gt; /etc/ntp.conf<br />
echo server 10.20.0.200 &gt;&gt; /etc/ntp.conf<br />
echo driftfile /var/lib/ntp/drift &gt;&gt; /etc/ntp.conf<br />
/sbin/chkconfig &#8211;level 345 ntpd on<br />
/etc/init.d/ntpd start<br />
/usr/sbin/esxcfg-vswitch -A LAB_VMs vSwitch0<br />
/usr/sbin/esxcfg-vswitch -A VMotion vSwitch0<br />
/usr/sbin/esxcfg-vswitch -p VMotion -v 10 vSwitch0<br />
/usr/sbin/esxcfg-vswitch -p LAB_VMs -v 11 vSwitch0<br />
/usr/sbin/esxcfg-vswitch -M vmnic0 vSwitch0 -p VMotion<br />
/usr/sbin/esxcfg-vswitch -M vmnic0 vSwitch0 -p LAB_VMs<br />
/usr/sbin/esxcfg-vmknic -a -i 10.10.10.40 -n 255.255.255.0 VMotion<br />
/usr/bin/vimsh -n -e &#8220;hostsvc/net/refresh&#8221;<br />
/usr/bin/vimsh -n -e &#8220;internalsvc/refresh_network&#8221;</p>
<p>%post &#8211;interpreter=bash</p>
<p>cat &lt; /etc/rc3.d/S99postconf<br />
#!/bin/bash<br />
/usr/sbin/esxcfg-firewall &#8211;openport 88,tcp,out,KerberosClientTCP<br />
/usr/sbin/esxcfg-firewall &#8211;blockOutgoing<br />
/usr/bin/vmware-vim-cmd hostsvc/vmotion/vnic_set vmk0<br />
/usr/bin/vmware-vim-cmd hostsvc/memoryinfo 838860800<br />
/usr/bin/vmware-vim-cmd vimsvc/auth/entity_permission_add vim.Folder:ha-folder-root lg-esxsu true Admin true<br />
echo “Removing automated post script.”<br />
rm /etc/rc3.d/S99postconf<br />
EOF<br />
chmod +x /etc/rc3.d/S99postconf</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike La Spina</title>
		<link>http://blog.laspina.ca/ubiquitous/automating-vsphere-esx4-host-installations/comment-page-2#comment-709</link>
		<dc:creator>Mike La Spina</dc:creator>
		<pubDate>Wed, 03 Mar 2010 02:01:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.laspina.ca/?p=225#comment-709</guid>
		<description>Kevin,

Have you tried a longer delay or added an additional delay after the last vswitch config.

Regards,
Mike</description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>Have you tried a longer delay or added an additional delay after the last vswitch config.</p>
<p>Regards,<br />
Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Brooksby</title>
		<link>http://blog.laspina.ca/ubiquitous/automating-vsphere-esx4-host-installations/comment-page-2#comment-708</link>
		<dc:creator>Kevin Brooksby</dc:creator>
		<pubDate>Wed, 03 Mar 2010 00:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.laspina.ca/?p=225#comment-708</guid>
		<description>Ok please help me out here Mike as I am about to lose my marbles over this :-D.  I have been hacking away at this script for the better part of the day but every time I get to the post install section it sleeps for the designated 3 minute interval then seems to attempt to apply the post settings but always fails and eventually says something to the effect of &quot;Failed to connect: Crypto Exception:error:02001002:system library:fopen:No such file or directory:/etc/vmware/ssl/rui.key. The virtual console f1 screen also spits out a &#039;User-supplied script failed&#039; error message.  It seems to apply my add group/users commands properly but not the network/svccon memory/vmotion checkbox tick commands.  Strange thing is if I do ssh into the host post install and just drop the one liners in it applies without error.  Any ideas?

%post --interpreter=bash
/bin/sleep 90
/usr/sbin/groupadd -g 5000 lg-esxsu
/usr/sbin/useradd -u 501 -G lg-esxsu super1
/usr/sbin/useradd -u 502 -G lg-esxsu super2
/usr/sbin/esxcfg-vswitch -A LAB_VMs vSwitch0
/usr/sbin/esxcfg-vswitch -A VMotion vSwitch0
/usr/sbin/esxcfg-vswitch -p VMotion -v 10 vSwitch0
/usr/sbin/esxcfg-vswitch -p LAB_VMs -v 11 vSwitch0
/usr/sbin/esxcfg-vswitch -M vmnic0 vSwitch0 -p VMotion
/usr/sbin/esxcfg-vswitch -M vmnic0 vSwitch0 -p LAB_VMs
/usr/sbin/esxcfg-vmknic -a -i 10.10.10.40 -n 255.255.255.0 VMotion
/usr/bin/vimsh -n -e &quot;hostsvc/net/refresh&quot;
/usr/bin/vimsh -n -e &quot;internalsvc/refresh_network&quot;
/usr/bin/vmware-vim-cmd hostsvc/memoryinfo 838860800</description>
		<content:encoded><![CDATA[<p>Ok please help me out here Mike as I am about to lose my marbles over this <img src='http://blog.laspina.ca/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> .  I have been hacking away at this script for the better part of the day but every time I get to the post install section it sleeps for the designated 3 minute interval then seems to attempt to apply the post settings but always fails and eventually says something to the effect of &#8220;Failed to connect: Crypto Exception:error:02001002:system library:fopen:No such file or directory:/etc/vmware/ssl/rui.key. The virtual console f1 screen also spits out a &#8216;User-supplied script failed&#8217; error message.  It seems to apply my add group/users commands properly but not the network/svccon memory/vmotion checkbox tick commands.  Strange thing is if I do ssh into the host post install and just drop the one liners in it applies without error.  Any ideas?</p>
<p>%post &#8211;interpreter=bash<br />
/bin/sleep 90<br />
/usr/sbin/groupadd -g 5000 lg-esxsu<br />
/usr/sbin/useradd -u 501 -G lg-esxsu super1<br />
/usr/sbin/useradd -u 502 -G lg-esxsu super2<br />
/usr/sbin/esxcfg-vswitch -A LAB_VMs vSwitch0<br />
/usr/sbin/esxcfg-vswitch -A VMotion vSwitch0<br />
/usr/sbin/esxcfg-vswitch -p VMotion -v 10 vSwitch0<br />
/usr/sbin/esxcfg-vswitch -p LAB_VMs -v 11 vSwitch0<br />
/usr/sbin/esxcfg-vswitch -M vmnic0 vSwitch0 -p VMotion<br />
/usr/sbin/esxcfg-vswitch -M vmnic0 vSwitch0 -p LAB_VMs<br />
/usr/sbin/esxcfg-vmknic -a -i 10.10.10.40 -n 255.255.255.0 VMotion<br />
/usr/bin/vimsh -n -e &#8220;hostsvc/net/refresh&#8221;<br />
/usr/bin/vimsh -n -e &#8220;internalsvc/refresh_network&#8221;<br />
/usr/bin/vmware-vim-cmd hostsvc/memoryinfo 838860800</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manoj</title>
		<link>http://blog.laspina.ca/ubiquitous/automating-vsphere-esx4-host-installations/comment-page-1#comment-688</link>
		<dc:creator>Manoj</dc:creator>
		<pubDate>Fri, 19 Feb 2010 21:17:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.laspina.ca/?p=225#comment-688</guid>
		<description>Hi Mike,

Ignore my previous posts on this topic and I did some extra checking and found this is an issue with the Starwind iSCSI implementation that I have. For some reason the even after mapping the datastores manually on reboot the mappings are lost yet the ESX iscsi initiator successfully maps the targets.

I will have to revert to running something like openfiler. I am currently testing my build process before I introduce it into our non-production system which has both SAN and iSCSI storage LUNS.

One more thing on the ks.cfg script I wanted to know what I might be doing wrong for setting the console memory to 800MB. I am using the below:

mv -f /etc/vmware/esx.conf /etc/vmware/esx.conf.old
sed -e &#039;s/boot\/memSize = \&quot;300\&quot;/boot\/memSize = \&quot;800\&quot;/g&#039; /etc/vmware/esx.conf.old &gt;&gt; /etc/vmware/esx.conf

Which used to work for me on ESX3 but in ESX4 for some reason it shows as 300.00MB (800.0 MB on restart) I have restarted the host 3 times but the change is not effected.
 
Thanks,
Manoj</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>Ignore my previous posts on this topic and I did some extra checking and found this is an issue with the Starwind iSCSI implementation that I have. For some reason the even after mapping the datastores manually on reboot the mappings are lost yet the ESX iscsi initiator successfully maps the targets.</p>
<p>I will have to revert to running something like openfiler. I am currently testing my build process before I introduce it into our non-production system which has both SAN and iSCSI storage LUNS.</p>
<p>One more thing on the ks.cfg script I wanted to know what I might be doing wrong for setting the console memory to 800MB. I am using the below:</p>
<p>mv -f /etc/vmware/esx.conf /etc/vmware/esx.conf.old<br />
sed -e &#8217;s/boot\/memSize = \&#8221;300\&#8221;/boot\/memSize = \&#8221;800\&#8221;/g&#8217; /etc/vmware/esx.conf.old &gt;&gt; /etc/vmware/esx.conf</p>
<p>Which used to work for me on ESX3 but in ESX4 for some reason it shows as 300.00MB (800.0 MB on restart) I have restarted the host 3 times but the change is not effected.</p>
<p>Thanks,<br />
Manoj</p>
]]></content:encoded>
	</item>
</channel>
</rss>
