<?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>Tristan Watkins on IT Infrastructure &#187; Visual Studio Archive</title>
	<atom:link href="http://tristanwatkins.com/index.php/tag/visual-studio/feed/" rel="self" type="application/rss+xml" />
	<link>http://tristanwatkins.com</link>
	<description>Technical guidance for SharePoint, Cloud Services, Windows and more</description>
	<lastBuildDate>Fri, 21 Oct 2011 23:33:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Building a SharePoint 2007/2010 development environment &#8211; Part V: Guest Build</title>
		<link>http://tristanwatkins.com/index.php/building-a-sharepoint-20072010-development-environment-part-v-guest-build/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=building-a-sharepoint-20072010-development-environment-part-v-guest-build</link>
		<comments>http://tristanwatkins.com/index.php/building-a-sharepoint-20072010-development-environment-part-v-guest-build/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 01:15:51 +0000</pubDate>
		<dc:creator>Tristan Watkins</dc:creator>
				<category><![CDATA[Consultancy and Design]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Virtualisation]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[BackConnectionHostName]]></category>
		<category><![CDATA[DCOM]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[DisableLoopbackCheck]]></category>
		<category><![CDATA[hive]]></category>
		<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[ICS]]></category>
		<category><![CDATA[IIS WAMREG]]></category>
		<category><![CDATA[NTFS Junction Points]]></category>
		<category><![CDATA[NUMA]]></category>
		<category><![CDATA[oSearch]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Snapshots]]></category>
		<category><![CDATA[SSP]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows Server 2008 R2]]></category>

		<guid isPermaLink="false">http://tristanwatkins.com/?p=507</guid>
		<description><![CDATA[In the first four parts of this series I covered the project objectives and the system design, then turned my attention to the Hyper-V host image build and automated deployment. In this post I describe a SharePoint 2007 virtual machine build. Where’s the SharePoint 2010 build? In short, we&#8217;re working on it. I&#8217;ve produced a [...]]]></description>
			<content:encoded><![CDATA[<p>In the first four parts of this series I covered <a title="Building a SharePoint 2007/2010 development environment - Part I:  Introduction and Objectives" href="../?p=497" target="_self">the project objectives</a> and <a title="Building a SharePoint 2007/2010 development environment - Part II: Design" href="../?p=499" target="_self">the system design</a>, then turned my attention to the <a title="Building a SharePoint 2007/2010 development environment - Part III: Host image build and performance benchmarks" href="../?p=503" target="_self">Hyper-V host image build</a> and <a title="Building a SharePoint 2007/2010 development environment - Part IV: Automated deployment" href="http://tristanwatkins.com/?p=505" target="_self">automated deployment</a>. In this post I describe a SharePoint 2007 virtual machine build.</p>
<h2>Where’s the SharePoint 2010 build?</h2>
<p>In short, we&#8217;re working on it. I&#8217;ve produced a new SharePoint 2010 beta virtual machine for this environment but we&#8217;re not yet ready to publish build guidance. Stay tuned. Additionally&#8230;<span id="more-507"></span></p>
<h3>SharePoint 2010 memory requirements</h3>
<p>We have validated this environment for use with SharePoint 2010 virtual machines, but performance will be inadequate for development unless 4GB RAM can be dedicated to the SharePoint 2010 VM. It will run with 2GB but it will be too slow to do anything beyond lightweight demonstration. Also, be sure to check if your system has a NUMA CPU architecture. If it does, only allocate memory within NUMA node boundaries, as performance degrades when accessing memory from alocal nodes. See the<a title="Performance and capacity requirements for Hyper-V" href="http://technet.microsoft.com/en-us/library/dd277865.aspx#section2" target="_blank"> performance and capacity requirements for virtualising SharePoint</a> guidance for an introduction to the issue, but be aware  that NUMA architecture is less common in laptops so it may not be an issue.</p>
<h2>Virtual networking recap</h2>
<p>As explained in part two of this series, we have created  three virtual networks on the Hyper-V host, although this development virtual machine will only have two network adapters. The first will be &#8220;plugged in&#8221; to the <em>Hyper-V ICS Network</em>. The second is &#8220;plugged in&#8221; to the <em>Hyper-V Internal Network</em>. We plug the <em>Hyper-V External Network</em> in for testing purposes only. For more information about how I&#8217;ve designed these networks please refer to <a title="Building a SharePoint 2007/2010 development environment - Part II: Design" href="../?p=499" target="_self">the design post</a>.</p>
<h3>Working with virtual networks</h3>
<p>The guest virtual machine&#8217;s &#8220;ICS Network connection&#8221; will receive the host’s LAN or VPN connectivity (and an IP address via DHCP) from the host&#8217;s adapter on the <em>Hyper-V ICS Network. </em>The second adapter is “always on”, in that communication between the host and the guest will be completely separated from the host&#8217;s provision of ICS to the guest. This second adapter has a fixed IP address on a network that&#8217;s dedicated to providing communication between guest VMs and a resilient, permanent connection in the host. This enables:</p>
<ul>
<li>Persistent network sharing.</li>
<li>RDP connections to guest VMs.</li>
<li>HOSTS file entries and BackConnectionHostNames security.</li>
<li>Multiple IP addresses on static adapters in guests, for multiple sites with SSL, etc.</li>
</ul>
<p>Static IP address allocation on the ICS connection in the guest is not a supported configuration and results in instability.</p>
<h2>System Build</h2>
<h3>Installation</h3>
<p>Create a new virtual machine in the location of your choice. After the virtual machine has been created, modify these settings:</p>
<ul>
<li>Assign multiple processors to the virtual machine (for most laptops you will want to assign all of them).</li>
<li>Assign sufficient RAM, leaving at least 2GB RAM for the host machine (1.75GB bare minimum &#8211; host performance is too slow with only 1.5GB available).</li>
<li>Connect the Hyper-V ICS Internal Network to the first NIC.</li>
<li>Connect the Hyper-V Internal Network to the second NIC.</li>
<li>Point the DVD drive at an ISO file or installation media for Windows Server 2008.
<ul>
<li>It&#8217;s also possible to network-boot, following a similar approach to the host deployment from WDS. To network-boot a Hyper-V machine, add a legacy network adapter (it must be legacy) and modify the BIOS settings to boot from the network.</li>
<li>We could have installed Windows Server 2008 R2 as we did on the host, but at the time of our pilot it was still only in Release Candidate, so we opted to stick with a tested OS in order to compare the development experience with our current environments. I built our SharePoint 2010 Technical Preview and Beta environments on Windows Server 2008 R2 RTM without problem.</li>
</ul>
</li>
</ul>
<p>Turn on the virtual machine and install Windows Server 2008 Standard. On completion, log in for the first time, insert Hyper-V Integration Services from the Virtual Machine Connection&#8217;s Action menu and reboot when prompted.</p>
<h3>Initial configuration</h3>
<p>These steps establish basic connectivity and improve usability:</p>
<ul>
<li>Log in to the new virtual machine and enable remote desktop connections using any version (in order to support older versions of Royal TS). If all versions of Remote Desktop are current then select the secure option.</li>
<li>Test that the ICS connection is able to retrieve an IP address and that the connection is receiving connectivity from the host machine. If there are any problems connecting to the LAN or web, make sure that the connection is shared in the host and that the ICS connection in the guest is on DHCP. Also check the firewall settings. No settings should need to be modified but make updates if necessary.
<ul>
<li>Temporarily plug the Hyper-V External network in to this adapter for testing if needed. This is a good way of identifying if a problem relates to ICS itself or if it&#8217;s a guest firewall issue.</li>
</ul>
</li>
<li>Add DNS suffixes to the ICS connection if you want to be able to resolve host names on your LAN (without having to use the fully-qualified domain name). ICS will not pass through primary or connection specific DNS suffixes.
<ul>
<li>Go to the ICS Connection’s IPv4 properties.</li>
<li>Select Advanced.</li>
<li>On the DNS tab select the <em>Append these DNS suffixes (in order)</em> radio button.</li>
<li>Add domain suffixes for any named resources that should be resolved using host headers.</li>
</ul>
</li>
<li>Configure IP settings on the Internal Connection in the guest.
<ul>
<li>Configure IP addresses as 192.168.200.100.</li>
<li>Set the Subnet Mask as 255.255.255.0.</li>
<li>A default gateway and DNS settings are not necessary.</li>
</ul>
</li>
<li>Remove IPv6 from all connections in the host and guest. See <a title="Conflicting guidance on IPv6" href="http://tristanwatkins.com/?p=187" target="_self">earlier guidance</a> for more information.</li>
<li>Give all adapters sensible names.
<ul>
<li>I chose &#8220;ICS Connection&#8221; and &#8220;Internal Connection&#8221;.</li>
</ul>
</li>
<li>Test browsing to <strong>\\192.168.200.1</strong> to test connectivity over the Internal network.</li>
<li>Optionally, turn off IE Enhanced Security Configuration (ESC) for administrators.</li>
</ul>
<h3>Patching</h3>
<ul>
<li>Apply Windows Server 2008 SP2.
<ul>
<li>Reboot.</li>
</ul>
</li>
<li>Patch current.
<ul>
<li>Reboot if prompted and patch again if patches are available. Reboot again if needed and repeat until current.</li>
</ul>
</li>
</ul>
<h3>Shutdown and snapshot</h3>
<p>Shut down the virtual machine and take a snapshot. Rename the snapshot with an appropriate name, such as “Windows installation and patching complete”. You will be able to roll back to this state if you have problems with the Windows configuration.</p>
<h3>Adding Prerequisites</h3>
<h4>Adding Web Server (IIS) role</h4>
<p>Start up the virtual machine and add these Windows Role services:</p>
<ul>
<li>Web Server
<ul>
<li>Common HTTP Features
<ul>
<li>Static Content</li>
<li>Default Document</li>
<li>Directory Browsing</li>
<li>HTTP Errors</li>
<li>HTTP Redirection</li>
</ul>
</li>
<li>Application Development
<ul>
<li>ASP.NET</li>
<li>.NET Extensibility</li>
<li>ISAPI Extensions</li>
<li>ISAPI Filters</li>
</ul>
</li>
<li>Health and Diagnostics
<ul>
<li>Logging Tools</li>
</ul>
</li>
<li>Security
<ul>
<li>Basic Authentication</li>
<li>Windows Authentication</li>
<li>Request Filtering</li>
</ul>
</li>
<li>Performance
<ul>
<li>Static Content Compression</li>
<li>Dynamic Content Compression</li>
</ul>
</li>
</ul>
</li>
<li>Management Tools
<ul>
<li>IIS Management Console</li>
<li>IIS Management Scripts and Tools</li>
<li>Management Service</li>
</ul>
</li>
<li>Windows Process Activation Service
<ul>
<li>Process Model</li>
<li>.NET Environment</li>
<li>Configuration APIs</li>
</ul>
</li>
</ul>
<h4>Adding Features</h4>
<p>Add these Windows Features:</p>
<ul>
<li>Desktop Experience</li>
<li>Optional: Windows System Resource Manager (and Windows Internal Database)</li>
</ul>
<p>Installation of the Desktop Experience will prompt for reboot. It is not necessary to do so immediately. Note that when the reboot happens, Windows will restart a few times. This is a normal part of the Feature configuration.</p>
<h4>Additional preparation</h4>
<h5>HOSTS file entries</h5>
<p>Created the following HOSTS file entries for the web applications:</p>
<p style="padding-left: 30px">192.168.200.100                SSPAdmin</p>
<p style="padding-left: 30px">192.168.200.100                MySite</p>
<p style="padding-left: 30px">192.168.200.100                Portal</p>
<h5>DisableLoopbackCheck or BackConnectionHostNames updates</h5>
<p>Either disable the Loopback Check or add <a href="http://tristanwatkins.com/?p=293">BackConnectionHostNames</a> entries. Since ICS prevents inbound connectivity to these virtual machines we feel comfortable disabling the loopback check, as this would be a considerable annoyance to developers otherwise. For unisolated systems I would always recommend putting the <em>BackConnectionHostNames</em> entries in place. Spencer Harbar has summarised the <a title="Harbar.net" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.harbar.net');" href="http://www.harbar.net/archive/2009/07/02/disableloopbackcheck-amp-sharepoint-what-every-admin-and-developer-should-know.aspx" target="_blank"><span style="color: #0000ff">background information</span></a> best.</p>
<p>To disable the Loopback Check, add a new DWORD <em>DisableLoopbackCheck</em> value “1” to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa</p>
<h5>Creating the Source repository in the host and sharing to guests</h5>
<p>To understand these steps it is worth reviewing the <em>Local source code storage on the host machine</em> section of <a href="http://tristanwatkins.com/?p=499">the design post</a>.</p>
<ul>
<li>Create a new user account in the guest machine called <strong>SourceShare</strong>, with same password as the account that was created by the WAIK unattend file in <a href="http://tristanwatkins.com/?p=505">part four of this series</a>. This password should be strong, as the share will be visible to authenticated users on the host machine.</li>
<li>Confirm that the <em>CreateSourceShare.bat</em> script from part four has created a folder on the host system that is shared it to the SourceShare user with full control. Remove “Everyone” from the sharing permissions and replace with “Authenticated Users”.</li>
<li>In the guest virtual machine, map the Z drive to <a href="file://///192.168.200.1/Source">\\192.168.200.1\Source</a>, specifying the <strong>SourceShare</strong> account credentials and that it should be reconnected at login. Save the password.</li>
<li>Test the connection by opening the Z drive. If there are problems opening the drive, browse to <a href="file://192.168.200.1/Source">\\192.168.200.1\</a> and troubleshoot from there.</li>
<li>If users have trouble with the strength of the password, allow them to change it to something that they will remember, but make certain that it is changed in both the host and the guest and make sure they know that the change will need to be applied to all snapshot states and any other virtual machines that use this repository in the host.</li>
</ul>
<p>Note: if you would prefer to store source code in the virtual machine it is not necessary to follow these steps. The benefits of preserving code outside of the snapshot state need to be weighed up against the drawbacks of rolling back to a state when some of that code did not exist, and users of the system need to be aware of the implications of using either approach. Clearly this approach adds some complexity and any approach should be validated for your needs.</p>
<h5>Create local user accounts for services and application pool identities</h5>
<ul>
<li>SQL service accounts (which should be for obvious purposes):
<ul>
<li><strong>SQLSvc </strong></li>
<li><strong>SQLAgent </strong></li>
<li><strong>SQLAnalysis </strong></li>
<li><strong>SQLReporting </strong></li>
</ul>
</li>
<li>SharePoint service accounts and application pool identities:
<ul>
<li><strong>MossSetup</strong> (installation account)</li>
<li><strong>CentralAdmin</strong> (farm account)</li>
<li><strong>SSPAdmin</strong> (Shared Services Administration site application pool identity)</li>
<li><strong>MySite</strong> (MySite application pool identity)</li>
<li><strong>Portal</strong> (Portal application pool identity)</li>
<li><strong>SearchService</strong> (MOSS Search service account)</li>
<li><strong>SharedServices</strong> (the SSP web service identity)</li>
<li><strong>ContentAccess</strong> (the crawl account)</li>
</ul>
</li>
</ul>
<p>Assign the <strong>MossSetup</strong> account local administrative rights.</p>
<h5>Activate windows</h5>
<p>Add a valid Windows license and activate the system. Aside from obvious compliance issues, if this is not done you will see repeated 12321 <em>Security-Licensing-SLC</em> “Token-based Activation failed” warnings in the event logs.</p>
<h5>Shutdown and snapshot</h5>
<p>Shut down the virtual machine and take a snapshot. Rename the snapshot with an appropriate name, such as “Windows configuration complete”. You will be able to roll back to this state if you have problems with the SQL installation.</p>
<h2>SQL 2008 Setup</h2>
<h3>Installation</h3>
<p>Start up the virtual machine and run the SQL 2008 installer. Select all features.</p>
<ul>
<li>Give the instance a name or choose the default instance name according to preference.</li>
<li>Set up SQL services under these accounts:
<ul>
<li>SQLSvc</li>
<li>SQLAgent</li>
<li>SQLAnalysis</li>
<li>SQLReporting</li>
<li>Everything else can run as <em>Network Service.</em></li>
</ul>
</li>
<li>Disable Analysis, Reporting and Integration services. We do not run these services by default in order to optimise performance. However, we do install the services to speed up deployment as needed. Use as necessary in your environment.</li>
<li>Select Windows Authentication.</li>
<li>Select the local Administrator account as a Server Administrator.</li>
<li>Install Reporting Services in SharePoint integrated mode.</li>
</ul>
<p>After installation completes, launch the SQL Management Studio and assign the <strong>MossSetup</strong> account DBCreator and SecAdmin rights. It will not be necessary to assign other permissions directly in SQL, as the setup account will assign DBCreator/SecAdmin rights to the farm account.</p>
<h3>Patching</h3>
<p>Add the SQL Server 2008 Feature Pack and SQL Server 2008 SP1 and. Reboot as necessary and patch with the latest Cumulative Update.</p>
<h3>Shutdown and snapshot</h3>
<p>Shut down the virtual machine and take a snapshot. Rename the snapshot with an appropriate name, such as “SQL 2008 configuration complete”. You will be able to roll back to this state if you have problems with the MOSS installation.</p>
<h2>MOSS deployment</h2>
<h3>Installation and initial configuration</h3>
<p>Start up the virtual machine. Log in with the <strong>MossSetup</strong> account and follow these steps.</p>
<ul>
<li>Run the MOSS installer with (at least) SP1 slipstreamed. Select the <em>Complete</em> Server Type.</li>
<li>When the installer completes, un-tick the “Launch SharePoint Products and Technologies” wizard tick box.</li>
<li>Open a command window, running as Administrator and navigate to the BIN in the 12 Hive. Run <em>PSCONFIG –cmd configdb –create</em> to manually specify friendly names for the Central Admin databases and to assign the <strong>CentralAdmin</strong> farm account as the user. Specify both the Central Admin configuration and Content databases or they will receive an awful GUID for a name. Find <a href="http://technet.microsoft.com/en-us/library/cc263093.aspx">more information about PSCONFIG</a> on TechNet.</li>
<li>Launch the <em>SharePoint Products and Technologies Configuration</em> wizard from the start menu. Retain the connection to the newly-created farm databases and proceed through the configuration wizard according to your build requirements. I recommend that you specify a standard Central Administration port if you use one and authenticate using NTLM.</li>
<li>Once the wizard completes, launch Central Administration to confirm that the site is up and running.</li>
<li>There are tips and tricks that you may want to include for your developers, for instance <a href="http://www.andrewconnell.com/blog/archive/2006/08/21/3882.aspx">Andrew Connell’s suggestions</a> and an interesting use of junction points from <a href="http://sharenotes.wordpress.com/2008/05/02/rapid-access-to-12-hive-and-stsadmexe/">the Share Notes blog</a>.
<ul>
<li>Consider putting a desktop, task bar or start menu shortcut to the 12 hive.</li>
</ul>
<ul>
<li>Add an environment variable for the 12 hive’s BIN.
<ul>
<li>Go to the machine’s Advanced System Properties (right-click My Computer and select Properties).</li>
<li>Click the <em>Environment Variables</em> button.</li>
<li>In the System variables pane, scroll down to Path and select “Edit”.</li>
<li>Clicking in the Variable Value will put the cursor at the end of the line. Type a semi-colon.</li>
<li>Copy and paste the path to the 12 hive’s BIN, typically:</li>
<li> <em>C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\</em></li>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Shutdown and snapshot</h4>
<p>Shut down the virtual machine and take a snapshot. Rename the snapshot with an appropriate name, such as “MOSS installation complete”. You will be able to roll back to this state if you have problems with the farm configuration.</p>
<h3>Farm build and configuration</h3>
<p>Start up the virtual machine and launch Central Administration from the Start menu or navigate to it in Internet Explorer.</p>
<ul>
<li>Enable Intranet Settings for the Central Admin site. This option should appear as a prompt directly beneath the tabs.</li>
<li>Grant Launch and Activation permission to the local WSS_WPG and WSS_ADMIN_WPG groups in the <strong>IIS WAMREG</strong> DCOM component. This prevents system error 10016. See <a href="http://support.microsoft.com/kb/920783">KB920783</a> for more information.
<ul>
<li>If necessary, do the same thing on the <strong>oSearch</strong> DCOM componet, per <a title="oSearch DCOM fix" href="http://support.microsoft.com/kb/953137" target="_self">KB953137</a>.</li>
</ul>
</li>
<li>Enable the MOSS Search service, running under the &lt;MACHINE NAME&gt;\SearchService account with “Reduced” performance, using all WFE servers.
<ul>
<li>If the account name is entered without the &lt;MACHINE NAME&gt; prefix, you will likely see this error:<br />
<span style="color: #808080;">“An unhandled exception occurred in the user interface.Exception Information: OSearch (SearchService)”.</span></li>
</ul>
</li>
<li>We have not configured any other central administration settings in order to provide the farm in the cleanest state possible. That said, perform any additional configuration here as needed, but be aware that many settings are not suitable for all projects.</li>
</ul>
<h3>Create the Shared Services Provider</h3>
<p>Configure the farm’s shared services as prompted by the left navigation. This will step through the creation of the SSP administration and MySite web applications and then the Shared Services web service itself.</p>
<ul>
<li>Create a new SSP administration web application when prompted.
<ul>
<li>Use the host name and load balanced URL that was set up above: <a href="http://SSPAdmin">http://SSPAdmin</a></li>
<li>Use the application pool identities as created above: <strong>SSPAdmin</strong></li>
<li>Select NTLM authentication, unless there is a reason not to.</li>
<li>Give the content database for the web application an appropriate name, such as <strong>WSS_CONTENT_SSPAdmin</strong>, according to internal naming conventions.</li>
</ul>
</li>
<li>Create a new MySites web application when prompted.
<ul>
<li>Use the host name and load balanced URL that was set up above: <a href="http://MySite">http://MySite</a></li>
<li>Use the application pool identities as created above: <strong>MySite</strong></li>
<li>Select NTLM authentication, unless there is a reason not to.</li>
<li>Give the content database for the web application an appropriate name, such as <strong>WSS_CONTENT_MySite</strong>, according to internal naming conventions.</li>
</ul>
</li>
<li>Proceed with the SSP configuration:
<ul>
<li>Use NTLM authentication.</li>
<li>Specify the <strong>SharedServices</strong> application pool identity.</li>
<li>Do not use SSL, as this traffic is not leaving the server.</li>
<li>Typically in a stand-alone devlopment environment it should be OK to use the default SSP database naming suggestions, but adhere to internal standards where they apply.</li>
</ul>
</li>
<li>Wait for the configuration wizard to complete. This can take some time.</li>
<li>Visit the SSP administration site to confirm that the web application has been successfully created.</li>
<li>In Central Administration, navigate to <em>Self-Service Site Management</em> and enabled Self-site creation for the MySite web application.</li>
<li>Visit the MySite link in Central Administration to confirm that the web application has been successfully created.</li>
<li>Log in to the SSP Administration site and take these steps:
<ul>
<li>Specify a default content access account: <strong>ContentAccess</strong></li>
<li>Grant full personalisation services rights to the local administration account.
<ul>
<li>This account can be used to grant rights to yet-to-be-created local users of the system once they receive this build, if desired.</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3>Create the web portal</h3>
<p>In Central Administration create a new web application.</p>
<ul>
<li>Use the host name and load balanced URL that was set up above: <a href="http://Portal">http://Portal</a></li>
<li>Use the application pool identities as created above: <strong>Portal</strong></li>
<li>Select NTLM authentication, unless there is a reason not to.</li>
<li>Give the content database for the web application an appropriate name, such as <strong>WSS_CONTENT_Portal</strong>, according to internal naming conventions.</li>
<li>Create a root site collection using the collaboration portal template. Make the local administrator account and the Moss Setup accounts site collection administrators – to be changed by local users on receipt of the build.</li>
<li>Visit <a href="http://portal">http://portal</a> to confirm that the site collection has been successfully created.</li>
</ul>
<h4>Shutdown and snapshot</h4>
<p>Shut down the virtual machine and take a snapshot. Rename the snapshot with an appropriate name, such as “MOSS configuration complete”. You will be able to roll back to this state if you have problems with the patching.</p>
<h3>Patch current</h3>
<p>Start up the virtual machine and patch the environment to whatever state is needed. We typically recommend patching current. During the course of our pilot we used the April 2009 Cumulative Update. When we released the base virtual machine to our entire development team we launched with the June 2009 Cumulative Update. Once patched current, test that all sites are still working as expected.</p>
<p>Full patching guidance is available on the <a href="http://technet.microsoft.com/en-us/office/ee748587.aspx">Update Center for Microsoft Office, Office Servers, and Related Products</a> site.</p>
<h4>Shutdown and snapshot</h4>
<p>Shut down the virtual machine and take a snapshot. Rename the snapshot with an appropriate name, such as “June 2009 CU applied”. You will be able to roll back to this state if you have problems with developer tool installation.</p>
<h2>Tool installation and export</h2>
<h3>Developer Tool installation</h3>
<p>Start up the virtual machine and install the common development tools for your organisation. These are the standard tools used by our developers. There are also some licensed products that are installed for some users outside of the scope of the base build.</p>
<ul>
<li>Microsoft Office SharePoint Designer 2007 SP2</li>
<li>Microsoft Visual Studio Team System 2008 Developer Edition (we created a separate snapshot for users that need Visual Studio 2005 rather than running them concurrently)</li>
<li>Microsoft Visual Studio Team System 2008 Team Explorer</li>
<li>Microsoft Visual Studio Team System 2008 Team Foundation Server MSSCCI Provider</li>
<li>TFS Power Tools</li>
<li>Microsoft Visual Studio Team System 2008 Developer Edition SP1</li>
<li>Microsoft Visual SourceSafe</li>
<li>WSPBuilder Extensions 1.0.5</li>
<li>StyleCop</li>
<li>Fiddler2</li>
<li>Sandcastle</li>
<li>Sandcastle Help File Builder</li>
<li>HTML Tidy</li>
<li>PDF X-Change PDF Viewer</li>
<li>Firefox with Firebug</li>
<li>Safari</li>
<li>Chrome</li>
<li>Opera</li>
<li>SharePoint Manager 2007</li>
<li>Microsoft Silverlight</li>
<li>Adobe Flash for IE</li>
<li>Adobe Flash for Firefox, Safari and Opera</li>
<li>Microsoft Forefront Client</li>
<li><a href="http://www.toolheap.com/test-mail-server-tool/">Test Mail Server</a></li>
</ul>
<p>On completion of installation, defragment the disk and wait for completion.</p>
<h3>Shutdown and snapshot</h3>
<p>Shut down the virtual machine and take a snapshot. Rename the snapshot with an appropriate name, such as “Developer tools installed”. You will be able to roll back to this state if you have problems with the farm configuration.</p>
<h3>Snapshot branches</h3>
<p>If you will be using different versions of Visual Studio (or anything else) it’s worth creating distinct branches for each version. You could adopt an approach like this:</p>
<ul>
<li>Install all of the independent tools, shut down and take a snapshot, renamed to something like &#8220;Developer tools except VS installed&#8221;.</li>
<li>Install Visual Studio 2008 and patches. Defragment, shut down and take a snapshot, renaming to something like &#8220;Visual Studio 2008 installed and patched current&#8221;.</li>
<li>Apply the &#8220;Developer tools except VS installed&#8221; snapshot. Install Visual Studio 2005 and patches. Defragment, shut down and take a snapshot, renaming to something like &#8220;Visual Studio 2005 installed and patched current&#8221;.</li>
<li>The two Visual Studio snapshot are now siblings &#8211; children of the &#8220;Developer tools except VS installed&#8221; snapshot node. A third sibling could be created in this same manner for Visual Studio 2010 Beta 2 (for instance).</li>
</ul>
<p>We install Visual Studio last in the installation sequence in order to maintain consistency among these variants as deep in to the snapshot tree as possible. To give another example, I&#8217;ve just built a SharePoint 2010 Beta environment with Visual Studio 2010 Beta 2. In that environment there was only one instance of Visual Studio but two SharePoint branches &#8211; one for SharePoint Foundation and another for SharePoint Server 2010. In that tree I installed all developer tools and Visual Studio before installing either SharePoint edition. If you have similar branching needs, plan to install those items last and structure your snapshot trees accordingly.</p>
<h3>Export</h3>
<p>You may choose to export the entire virtual machine rather than the final snapshot, depending on how standard you want the final build to be. If a developer can role back to an earlier state then the standardisation of the build is at risk. In our case, we’ve exported the final snapshot (or each of the final sibling nodes in the snapshot tree, since some users use Visual Studio 2005). This state is vanilla enough that it can be used as a common starting point for a wide range of projects. It has even been used as a starting point for projects that extend beyond SharePoint to accessibility solutions, Commerce Server and BizTalk.</p>
<p>This is not to say that this build fits all sizes, but it does fit most of them while obtaining the benefits outlined in the first post in this series. Some of the limitations of this approach are discussed in the next part of this series.</p>
]]></content:encoded>
			<wfw:commentRss>http://tristanwatkins.com/index.php/building-a-sharepoint-20072010-development-environment-part-v-guest-build/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a SharePoint 2007/2010 development environment &#8211; Part II: Design</title>
		<link>http://tristanwatkins.com/index.php/building-a-sharepoint-20072010-development-environment-part-ii-design/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=building-a-sharepoint-20072010-development-environment-part-ii-design</link>
		<comments>http://tristanwatkins.com/index.php/building-a-sharepoint-20072010-development-environment-part-ii-design/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 01:42:56 +0000</pubDate>
		<dc:creator>Tristan Watkins</dc:creator>
				<category><![CDATA[Consultancy and Design]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Virtualisation]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Code Group]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Hyper-V]]></category>
		<category><![CDATA[ICS]]></category>
		<category><![CDATA[NTFS Junction Points]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Snapshots]]></category>
		<category><![CDATA[TFS]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[VMWare]]></category>
		<category><![CDATA[Windows Server 2008 R2]]></category>
		<category><![CDATA[Workgroup]]></category>

		<guid isPermaLink="false">http://tristanwatkins.com/?p=499</guid>
		<description><![CDATA[In the first part of this series, I introduced the pros and cons of various SharePoint development approaches and the objectives of this system redesign. In this part I will focus on design choices and conclusions, starting with the core technology. Why we’ve chosen Hyper-V There are broadly five decisive factors: performance, management features (like [...]]]></description>
			<content:encoded><![CDATA[<p>In <a title="Building a SharePoint 2007/2010 development environment - Part I:  Introduction and Objectives" href="http://tristanwatkins.com/?p=497" target="_self">the first part of this series</a>, I introduced the pros and cons of various SharePoint development approaches and the objectives of this system redesign. In this part I will focus on design choices and conclusions, starting with the core technology.</p>
<h2>Why we’ve chosen Hyper-V</h2>
<p>There are broadly five decisive factors: performance, management features (like snapshots), cost, 64-bit OS support and a full host OS (not just a virtualisation administration console):<span id="more-499"></span></p>
<ul>
<li>Hyper-V is now in its second iteration and has proved to be one of the best-performing virtualisation technologies on the market. With laptops we need to take advantage of every performance gain that we can find.</li>
<li>Perhaps most importantly, and most often overlooked, Hyper-V is free if you&#8217;re already running Windows Server 2008 or Windows Server 2008 R2as a client OS
<ul>
<li>While I work for a Microsoft Gold Partner and Hyper-V is a key part of Microsoft’s future strategy (full disclosure), I believe that most SharePoint developers will have at least an MSDN subscription and a license for a Windows Server operating system, so I believe this is compelling for most SharePoint development environments</li>
</ul>
</li>
<li>Hyper-V is one of the few virtualisation technologies that supports 64-bit guest operating systems and within that narrow range of choices, it is one of the few that allows a user to log on to a host machine and control virtual machines within it concurrently
<ul>
<li>For instance, VMware ESXi is also a high-performance Type-1 hypervisor that supports 64-bit operating systems, but there is no host machine other than a virtualisation administration console
<ul>
<li>It also has associated costs (support, management tools, etc) that we would prefer to avoid</li>
</ul>
</li>
<li>With Windows Server 2008 R2 and Hyper-V, developers can use client tools within a familiar operating system while accessing virtual development environments at the same time
<ul>
<li>This is also true of VMware Workstation, but it&#8217;s a Type-2 hypervisor and will have relatively poor performance</li>
</ul>
</li>
<li>We need to have 64-bit OS support for Windows Server 2008 R2 and SharePoint 2010 &#8211; both of which do not have 32-bit flavors</li>
</ul>
</li>
</ul>
<h2>Our approach</h2>
<h3>Workgroup development</h3>
<p>By building our virtual machines in a Workgroup, we no longer need to worry about SharePoint installation/(re)configuration difficulties, as we will import the same identical virtual machine on everyone’s Hyper-V host. This would not be possible if the virtual machine was a member of a centralised domain because the domain controller would receive chatter from many identical machines and everything would quickly start to unravel</p>
<p>Alternately, we could run <em>Active Directory Domain Services </em>within a virtual machine, but this has a performance overhead that is best avoided unless it is absolutely necessary. Additionally, developing on a domain controller is not ideal</p>
<p>While developing in a Workgroup presents challenges for profile imports, these are far from insurmountable when LDAP directories like AD LDS or SQL users can substitute in many scenarios. The only evident need is a scenario where <em>Active Directory Domain Services</em> (more than just user accounts) are required, and that&#8217;s certainly not going to be true of enough projects that it should form a part of the base build. To this end, as requirements for Domain Services are identified we will provide new builds, as they are likely to be very project-specific</p>
<h3>Networking</h3>
<h4>Internet Connection Sharing network</h4>
<p>In order to isolate identical virtual machines from each other and from network resources, I&#8217;ve created a Hyper-V internal network dedicated to receiving Internet Connection Sharing (ICS) from one of the host&#8217;s active network connections. This is an internal network like any other Hyper-V internal network &#8211; it just so happens that the host&#8217;s adapter on this network will be receiving ICS from another of the host&#8217;s connected adapters. Any connection can share to the ICS network &#8211; even if Hyper-V doesn&#8217;t natively support external networks of that type. Depending on the need, we will share to this ICS network from:</p>
<ul>
<li>Hyper-V host external connections (by default)</li>
<li>Wireless</li>
<li>Mobile broadband</li>
<li>VPN</li>
</ul>
<p>ICS also introduces a layer of NAT between the guests and the physical network, preventing inbound connections to guests over these networks. This is desirable as it is how we achieve physical network isolation, and is the reason why we&#8217;ve chosen ICS over Bridging. In the ICS Settings we enable outbound RDP, HTTP and HTTPS connections over ICS by default, although it may be useful to enable other common outbound network protocols like FTP and SMTP. Outbound connectivity from our guest virtual machines is primarily used for connecting to TFS over HTTPS.</p>
<h4>Internal network</h4>
<p>We have also created a Hyper-V Internal network to support &#8220;always on&#8221; communication between the host machine and the guest virtual machines. Guest virtual machines can also communicate with each other over this network.</p>
<p>We cannot rely solely on the ICS connection. Guest virtual machine IP addresses on the ICS network will change because they receive them via DHCP from the host&#8217;s ICS connection. This is just how ICS works. The host&#8217;s ICS adapter becomes a gateway on 192.168.137.1. Any Hyper-V guests on that network pick up DHCP from the host and are automatically assigned an address on the 192.168.137.xxx (255.255.255.0) IP range.</p>
<p>As we rely on HOSTS file entries for RDP connections from host to guest and for browsing to guest SharePoint sites from the host, we need fixed, reliable IP routing and name resolution, so we use this second network for that purpose. The hosts and guests have both been built with fixed IP addresses on this range.</p>
<p>Because this is a Hyper-V internal network, there is no risk of network collisions on these IP ranges (which are identical for all users). Internal traffic never leaves the machine.</p>
<h3>Project builds</h3>
<p>By providing self-contained environments, our technical leads and/or architects can now customise the base builds to create project-specific virtual machines that can be exported to all members of a team, reducing system/configuration inconsistencies. In practice, the build lead/architect will export the final snapshot of the project environment, which all team members will use as a starting point for project development. As the project progresses, updated builds can be released in this same manner.</p>
<h3>Clean hosts</h3>
<p>Host machines will be cleaned of development tools and data, allowing quick provisioning. Development tools will not need to be reconfigured, as they will reside in virtual machines that can be exported/imported to any host. Guest base build virtual machines will be provided with as much SharePoint configuration as possible in order to make them light on reconfiguration, disposable and re-deployable.</p>
<h3>Project resumption</h3>
<p>Project-specific exports will reduce the need for storage of multiple virtual machines &#8211; as much as possible. We will retain one virtual machine export in public storage per-project. This will reduce the amount of time involved with resurrecting environments after project completion.</p>
<h3>Optimisation</h3>
<p>Host machines are built on Windows Server 2008 R2, optimised as much as possible and reduced to the lightest weight achievable. The build will broadly include:</p>
<ul>
<li>Hyper-V R2</li>
<li>Microsoft Office applications</li>
<li>All browsers</li>
<li>No development tools (these will all live in guest machines)
<ul>
<li>The only exception to this is the Team Foundation Client which TFS administrators manually install. We have not been able to pick domain users from within a Workgroup environment</li>
</ul>
</li>
</ul>
<h3>Content provisioning</h3>
<p>By deploying a single project-specific virtual machine, we can bake content in to the project build, ensuring consistency and reducing the overhead associated with re-deploying content.</p>
<h3>Improved testing and reduced volatility through the use of snapshots</h3>
<p>By using snapshots we are able to test code and configuration changes without volatility. The benefits of this technology include:</p>
<ul>
<li>Capturing restore points at milestones in a server build</li>
<li>Capturing a stable state before attempting volatile configuration changes</li>
<li>Capturing a stable state before testing code changes</li>
<li>Creating an initial restore point after importing a virtual machine and re-configuring network adapters (when required) and making other preferential settings
<ul>
<li>This saves re-importing and reconfiguring network adapters if a machine needs to be rolled back to its initial state</li>
</ul>
</li>
<li>Exporting a virtual machine to capture a problem when trouble occurs
<ul>
<li>An exact instance of a problem can be captured and shipped out for support, without having to re-create the problem in a distinct environment. This will only apply tot self-contained environments, however</li>
</ul>
</li>
</ul>
<h3>Local source code storage on the host machine</h3>
<p>Before our pilot started we identified that storing the local copies of source code within changing snapshot states could create problems. At the same time, we found it desirable to put the development tools inside our virtual machines in order to get around remote SharePoint development difficulties and to keep the host build uncluttered. To resolve this conflict, we adopted this approach:</p>
<ul>
<li>Created a share on the host machine and granted ownership of that directory to a new user account that is used solely for this purpose</li>
<li>Created a new user account with the same name and password in the guest virtual machine</li>
<li>Mapped a drive from the guest to the host&#8217;s new share, using the internal network&#8217;s IP address and these new credentials</li>
<li>Launched Visual Studio and downloaded project source code, pointing to the newly mapped drive as the location for the local source</li>
<li>Created a new Code Group for the mapped drive to enable trust for code execution</li>
</ul>
<p>These steps are covered in more detail in the build guides that will follow in later posts. This is just an outline of the approach to extracting the local code from the snapshot state, which should be adaptable to other development systems with snapshots. For instance, we&#8217;ve found it necessary to download code to a unique location within this directory for each each user, as TFS tracks the network locations that code is checked out to. This is easy to get around, as each user just specifies a unique directory name. If this were insufficient for project requirements, this TFS behaviour could possibly be &#8220;fooled&#8221; by using NTFS junction points. We&#8217;ve not seen a need for this yet, but we&#8217;re confident that with this additional option we should be able to store local source code in this manner, and this has been validated by our project experience with Hyper-V to-date.</p>
<h3>Summary</h3>
<p>These are the high-level design choices that emerged early in the consultancy and research, which have remained largely unchanged to-date. These choices represent one design that has been validated for our needs, which has some shortcomings like any approach. Some of these issues will be covered in the final post in this series.</p>
<p>The information in this post has not covered implementation in any detail, but do not fret. In the next section I will cover the step-by-step build guide for the Hyper-V host laptop.</p>
]]></content:encoded>
			<wfw:commentRss>http://tristanwatkins.com/index.php/building-a-sharepoint-20072010-development-environment-part-ii-design/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

