<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Infrastructure Architecture Blog by Panos Macheras</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/panosm/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/panosm/feed.xml</link>
    <description>Focusing on topics related to the Enterprise IT Infrastructure (Private Cloud, Management, Virtualization, Deployment, Security and Identity)</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:44:36 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Unattended installation of Virtual Machine Manager 2012 SP1 based on the IaaS PLA Fabric Management Guide</title>
      <link>https://docs.microsoft.com/archive/blogs/panosm/unattended-installation-of-virtual-machine-manager-2012-sp1-based-on-the-iaas-pla-fabric-management-guide</link>
      <pubDate>Sun, 19 May 2013 03:28:00 GMT</pubDate>
      <dc:creator><![CDATA[Panos Macheras]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/panosm/2013/05/19/unattended-installation-of-virtual-machine-manager-2012-sp1-based-on-the-iaas-pla-fabric-management-guide/</guid>
      <description><![CDATA[A few days ago we published what should be considered as the &quot;golden rule&quot; when it comes...]]></description>
      <content:encoded><![CDATA[<p><font size="2">A few days ago we published what should be considered as the &quot;golden rule&quot; when it comes to guidance around architecting a System Center 2012 implementation for a Private Cloud solution. The guidance can be found here: </font><a href="https://www.microsoft.com/en-us/download/details.aspx?id=38813"><font size="2">https://www.microsoft.com/en-us/download/details.aspx?id=38813</font></a><font size="2">. In this document my colleagues describe what we call an IaaS PLA (Product Line Architecture). PLAs are reference architectures that combine Microsoft software, consolidated guidance, and validated configurations with partner technology such as compute, network, and storage architectures, in addition to value-added software components. </font><font size="2">The IaaS PLA utilizes the core capabilities of the Windows Server operating system, Hyper-V, and System Center to deliver a private cloud infrastructure as a service offering. </font></p>  <p><font size="2">In short: If you are interested to architect a Private Cloud solution based on the above, the IaaS PLA is the place to start.</font></p>  <p><font size="2">One of the interesting aspects of the PLA is that it offers precise guidance on how to deploy the various components forming your Private Cloud solution.</font></p>  <p><font size="2">In this Blog Post I will focus on how to make an unattended installation of Virtual Machine Manager 2012 SP1 (along with its accompanying SQL Server 2012) in a way that is compliant with the IaaS PLA Fabric Management Architectural guidance.</font></p>  <p><font size="2">Let's Start!</font></p>  <p><strong><u><font size="2">Part 1: Installing the SQL Server and the SCVMMDB database instance</font></u></strong></p>  <p><font size="2">The IaaS PLA provides the guidance below for the Virtual Machine Manager database instance:</font></p> <font style="font-size: 11pt;"></font>  <div style="list-style-type: disc; direction: ltr;"><font style="font-size: 11pt;"></font><font style="font-size: 11pt;"></font><font style="font-size: 11pt;"></font><font style="font-size: 11pt;"></font><strong></strong><font style="font-size: 11pt;"></font><strong></strong><font style="font-size: 11pt;"></font><strong></strong><font style="font-size: 11pt;"></font><strong></strong><font style="font-size: 11pt;"></font><font style="font-size: 11pt;"></font><font style="font-size: 11pt;"></font><font style="font-size: 11pt;"></font><font style="font-size: 11pt;"></font><font style="font-size: 11pt;"></font><font style="font-size: 11pt;"></font><font style="font-size: 11pt;"></font><font style="font-size: 11pt;"></font>    <table style="border: 1pt solid rgb(163, 163, 163); border-collapse: collapse; direction: ltr;" cellspacing="0" cellpadding="0" width="585" border="1" valign="top"><tbody>       <tr>         <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top; background-color: rgb(91, 155, 213);" width="139"><font style="font-size: 11pt;"></font>            <p style="margin-top: 3pt; margin-bottom: 0pt;"><span><font style="font-size: 10pt;"><strong>Fabric Management Component</strong></font></span></p>           <font style="font-size: 11pt;"></font></td>          <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top; background-color: rgb(91, 155, 213);" width="93"><strong><font style="font-size: 11pt;"></font></strong>            <p style="margin-top: 3pt; margin-bottom: 0pt;"><span><font style="font-size: 10pt;"><strong>Instance Name</strong></font></span><span><font style="font-size: 10pt;"><strong>(Suggested)</strong></font></span></p>           <font style="font-size: 11pt;"></font></td>          <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top; background-color: rgb(91, 155, 213);" width="95"><strong><font style="font-size: 11pt;"></font></strong>            <p style="margin-top: 3pt; margin-bottom: 0pt;"><span><font style="font-size: 10pt;"><strong>Components</strong></font></span></p>           <font style="font-size: 11pt;"></font></td>          <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top; background-color: rgb(91, 155, 213);" width="164"><strong><font style="font-size: 11pt;"></font></strong>            <p style="margin-top: 3pt; margin-bottom: 0pt;"><span><font style="font-size: 10pt;"><strong>Collation</strong></font></span></p>           <font style="font-size: 11pt;"></font></td>          <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top; background-color: rgb(91, 155, 213);" width="92"><strong><font style="font-size: 11pt;"></font></strong>            <p style="margin-top: 3pt; margin-bottom: 0pt;"><span><font style="font-size: 10pt;"><strong>Storage</strong></font></span></p>            <p style="margin-top: 3pt; margin-bottom: 0pt;"><span><font style="font-size: 10pt;"><strong>Requirements</strong></font></span></p>           <font style="font-size: 11pt;"></font></td>       </tr>        <tr>         <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top; background-color: rgb(216, 216, 216);" width="139"><font style="font-size: 11pt;"></font>            <p style="margin-top: 3pt; margin-bottom: 0pt;"><span><font style="font-size: 9pt;">Virtual Machine Manager</font></span></p>           <font style="font-size: 11pt;"></font></td>          <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top; background-color: rgb(216, 216, 216);" width="93"><font style="font-size: 11pt;"></font>            <p style="margin-top: 3pt; margin-bottom: 0pt;"><font style="font-size: 9pt;">SCVMMDB</font></p>           <font style="font-size: 11pt;"></font></td>          <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top; background-color: rgb(216, 216, 216);" width="95"><font style="font-size: 11pt;"></font>            <p style="margin-top: 3pt; margin-bottom: 0pt;"><font style="font-size: 9pt;">Database Engine</font></p>           <font style="font-size: 11pt;"></font></td>          <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top; background-color: rgb(216, 216, 216);" width="164"><font style="font-size: 11pt;"></font>            <p style="margin-top: 3pt; margin-bottom: 0pt;"><font style="font-size: 9pt;">SQL_Latin1_General_CP1_CI_AS</font></p>           <font style="font-size: 11pt;"></font></td>          <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top; background-color: rgb(216, 216, 216);" width="92"><font style="font-size: 11pt;"></font>            <p style="margin-top: 3pt; margin-bottom: 0pt;"><font style="font-size: 9pt;">2 LUNs</font></p>           <font style="font-size: 11pt;"></font></td>       </tr>     </tbody></table>   <font style="font-size: 11pt;"></font></div> <font style="font-size: 11pt;"></font>  <p><font size="2">We are going to deploy SQL Server 2012 on a highly-available Virtual Machine (not on a Guest Cluster). You can follow the guidance of the IaaS PLA on the VM specifications. In case you want to only host the VMM database instance then 4 GB of RAM and 4 vCPUs should be enough (unless you will manage more than 150 Physical Hosts, in which case you will need 8 GB of RAM and 8 vCPUs and also consider deploying a SQL Failover Cluster, see the IaaS PLA and here: </font><a href="https://technet.microsoft.com/en-US/library/gg610574.aspx"><font size="2">https://technet.microsoft.com/en-US/library/gg610574.aspx</font></a><font size="2">). Do not use Dynamic Memory for this VM. The layout of the Virtual Hard Disks should be as follows:</font></p>  <ul>   <li><font size="2">IDE Controller 0: Dynamically expanding or Static VHDX of 60 GBs (hosting the OS and the common components of the SQL Server).</font></li>    <li><font size="2">SCSI Controller: Dynamically expanding or Static VHDX of 6 GBs (hosting the VMM Database)</font></li>    <li><font size="2">SCSI Controller: Dynamically expanding or Static VHDX of 3 GBs (hosting the VMM Database Logs)</font></li> </ul>  <p><font size="2">The recommended version is SQL Server 2012 Enterprise Edition with SP1 (or later).</font></p>  <p><font size="2">To make an unattended installation of the SQL Server we can use a Configuration File like the following:</font></p>  <p><font size="2" face="Lucida Console">;SQL Server 2012 Configuration File      <br /></font><font size="2" face="Lucida Console">[OPTIONS]      <br /></font><font size="2" face="Lucida Console">IACCEPTSQLSERVERLICENSETERMS=&quot;True&quot;      <br /></font><font size="2" face="Lucida Console">ACTION=&quot;Install&quot;      <br /></font><font size="2" face="Lucida Console">ENU=&quot;True&quot;      <br /></font><font size="2" face="Lucida Console">QUIET=&quot;True&quot;      <br /></font><font size="2" face="Lucida Console">QUIETSIMPLE=&quot;False&quot;      <br /></font><font size="2" face="Lucida Console">UpdateEnabled=&quot;True&quot;      <br /></font><font size="2" face="Lucida Console">FEATURES=SQLENGINE,SSMS,ADV_SSMS      <br /></font><font size="2" face="Lucida Console">UpdateSource=&quot;MU&quot;      <br /></font><font size="2" face="Lucida Console">HELP=&quot;False&quot;      <br /></font><font size="2" face="Lucida Console">INDICATEPROGRESS=&quot;True&quot;      <br /></font><font size="2" face="Lucida Console">X86=&quot;False&quot;      <br /></font><font size="2" face="Lucida Console">INSTALLSHAREDDIR=&quot;C:\Program Files\Microsoft SQL Server&quot;      <br /></font><font size="2" face="Lucida Console">INSTALLSHAREDWOWDIR=&quot;C:\Program Files (x86)\Microsoft SQL Server&quot;      <br /></font><font size="2" face="Lucida Console">INSTANCENAME=&quot;SCVMMDB&quot;      <br /></font><font size="2" face="Lucida Console">INSTANCEID=&quot;SCVMMDB&quot;      <br /></font><font size="2" face="Lucida Console">SQMREPORTING=&quot;False&quot;      <br /></font><font size="2" face="Lucida Console">ERRORREPORTING=&quot;False&quot;      <br /></font><font size="2" face="Lucida Console">INSTANCEDIR=&quot;M:\Program Files\Microsoft SQL Server&quot;      <br /></font><font size="2" face="Lucida Console">AGTSVCACCOUNT=&quot;DCS\SQLAgent&quot;      <br /></font><font size="2" face="Lucida Console">AGTSVCPASSWORD=P@ssw0rd      <br /></font><font size="2" face="Lucida Console">AGTSVCSTARTUPTYPE=&quot;Manual&quot;      <br /></font><font size="2" face="Lucida Console">COMMFABRICPORT=&quot;0&quot;      <br /></font><font size="2" face="Lucida Console">COMMFABRICNETWORKLEVEL=&quot;0&quot;      <br /></font><font size="2" face="Lucida Console">COMMFABRICENCRYPTION=&quot;0&quot;      <br /></font><font size="2" face="Lucida Console">MATRIXCMBRICKCOMMPORT=&quot;0&quot;      <br /></font><font size="2" face="Lucida Console">SQLSVCSTARTUPTYPE=&quot;Automatic&quot;      <br /></font><font size="2" face="Lucida Console">FILESTREAMLEVEL=&quot;0&quot;      <br /></font><font size="2" face="Lucida Console">ENABLERANU=&quot;False&quot;      <br /></font><font size="2" face="Lucida Console">SQLCOLLATION=&quot;SQL_Latin1_General_CP1_CI_AS&quot;      <br /></font><font size="2" face="Lucida Console">SQLSVCACCOUNT=&quot;DCS\SQLDatabase&quot;      <br /></font><font size="2" face="Lucida Console">SQLSVCPASSWORD=P@ssw0rd      <br /></font><font size="2" face="Lucida Console">SQLSYSADMINACCOUNTS=&quot;DCS\Domain Admins&quot;      <br /></font><font size="2" face="Lucida Console">SQLUSERDBLOGDIR=&quot;N:\Program Files\Microsoft SQL Server\MSSQL11.SCVMMDB\MSSQL\Data&quot;      <br /></font><font size="2" face="Lucida Console">SQLTEMPDBLOGDIR=&quot;N:\Program Files\Microsoft SQL Server\MSSQL11.SCVMMDB\MSSQL\Data&quot;      <br /></font><font size="2" face="Lucida Console">ADDCURRENTUSERASSQLADMIN=&quot;False&quot;      <br /></font><font size="2" face="Lucida Console">TCPENABLED=&quot;1&quot;      <br /></font><font size="2"><font face="Lucida Console">NPENABLED=&quot;0&quot;        <br /></font><font face="Lucida Console">BROWSERSVCSTARTUPTYPE=&quot;Automatic&quot;</font></font></p>  <p><font size="2">You can find more info about Configuration Files for SQL Server 2012 unattended installations, here: </font><a href="https://msdn.microsoft.com/en-us/library/dd239405.aspx"><font size="2">https://msdn.microsoft.com/en-us/library/dd239405.aspx</font></a></p>  <p><font size="2">The most important parameters, where a decision should be made, are the following:</font></p>  <ul>   <li><font size="2">Name of Instance: You set this on the INSTANCENAME and INSTANCEID parameters. &quot;SCVMMDB&quot; is the name recommended by the PLA.</font></li>    <li><font size="2">Components: You should only select the Database Engine here (as per PLA). The Management Tools are also included for convenience.</font></li>    <li><font size="2">Collation: SQL_Latin1_General_CP1_CI_AS</font></li>    <li><font size="2">Location of the Database LUN: Replace M: with the drive letter of the LUN where you wish to place the Database files.</font></li>    <li><font size="2">Location of the Logs LUN: Replace N: with the drive letter of the LUN where you wish to place the Database Log files.</font></li>    <li><font size="2">SQL Server Agent account name: Replace &quot;DCS\SQLAgent&quot; in the AGTSVCACCOUNT parameter with a Domain Account of your choice (you can also use a local system account).</font></li>    <li><font size="2">SQL Server Database Engine account name: Replace &quot;DCS\SQLDatabase&quot; in the SQLSVCACCOUNT parameter with a Domain Account of your choice (you can also use a local system account). If using a Domain Account also provide the password (in AGTSVCPASSWORD).</font></li>    <li><font size="2">SQL Server System Administrators: Replace &quot;DCS\Domain Admins&quot; in the SQLSYSADMINACCOUNTS parameter with a Domain Account or Security Group of your choice. If using a Domain Account also provide the password (in SQLSVCPASSWORD).</font></li> </ul>  <p><font size="2">Replace the values above as you see fit and save the file as: C:\Config\SCVMMDB.ini</font></p>  <p><font size="2">On the SQL Server from the SQL Server 2012 installation media execute the following command:</font></p>  <p><font size="2">setup.exe /ConfigurationFile=&quot;C:\Config\SCVMMDB.ini&quot;</font></p>  <p><font size="2">During installation verbose output will be displayed in the command prompt (enable or disable this with the INDICATEPROGRESS parameter):</font></p>  <p><font size="2"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/2451.Untitled-picture_1BBC71B3.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/2451.Untitled_2D00_picture_5F00_1BBC71B3.png"><img title="Untitled picture" style="display: inline; background-image: none;" border="0" alt="Untitled picture" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/7888.Untitled-picture_thumb_40D9BC1F.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/7888.Untitled_2D00_picture_5F00_thumb_5F00_40D9BC1F.png" width="644" height="326" /></a></font></p>  <p><font size="2">After successful installation we see the following:</font></p>  <p><font size="2"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/8802.Untitled-picture_6AC9947A.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/8802.Untitled_2D00_picture_5F00_6AC9947A.png"><img title="Untitled picture" style="display: inline; background-image: none;" border="0" alt="Untitled picture" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/2816.Untitled-picture_thumb_306E1E99.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/2816.Untitled_2D00_picture_5F00_thumb_5F00_306E1E99.png" width="644" height="331" /></a></font></p>  <p><font size="2">We can verify successful installation by running SQL Server Management Studio and connecting to the Database Instance (SCVMMDB):</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/6153.Untitled-picture_78F7E79D.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/6153.Untitled_2D00_picture_5F00_78F7E79D.png"><img title="Untitled picture" style="display: inline; background-image: none;" border="0" alt="Untitled picture" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/2273.Untitled-picture_thumb_70941246.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/2273.Untitled_2D00_picture_5F00_thumb_5F00_70941246.png" width="484" height="366" /></a></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/5672.Untitled-picture_535E446F.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/5672.Untitled_2D00_picture_5F00_535E446F.png"><img title="Untitled picture" style="display: inline; background-image: none;" border="0" alt="Untitled picture" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/4237.Untitled-picture_thumb_2353F2EE.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/4237.Untitled_2D00_picture_5F00_thumb_5F00_2353F2EE.png" width="488" height="609" /></a></p>  <p><font size="2"><strong><u>Part 2: Installing Virtual Machine Manager 2012 SP1</u></strong></font></p>  <p><font size="2">We are going to deploy VMM 2012 SP1 on a highly-available Virtual Machine (and not a VMM Failover Cluster). For managing less than 150 physical hosts create a VM with 4 GB of RAM and 4 vCPUs, for managing more consider creating a VMM Failover Cluster and follow the sizing guidance in the IaaS PLA </font><font size="2">and here: </font><a href="https://technet.microsoft.com/en-us/library/gg610562.aspx"><font size="2">https://technet.microsoft.com/en-us/library/gg610562.aspx</font></a><font size="2">). The layout of the Virtual Hard Disks should be as follows:</font></p>  <ul>   <li><font size="2">IDE Controller 0: Dynamically expanding or Static VHDX of 60 GBs (hosting the OS and the VMM installation).</font></li>    <li><font size="2">SCSI Controller: Dynamically expanding or Static VHDX with enough disk space to host your VMM Library (ISOs, VM Templates, VHDXs files, etc.). You can also utilize a pass-through disk for the VMM Library in which case you can enable Disk Deduplication (on the Storage System).</font></li> </ul>  <p><font size="2">Before setup you need to open the Firewall to allow communication between the VMM server and the SQL server. There are various ways to achieve this. One of them is to create a custom rule which opens all communications between the two IP addresses. </font></p>  <p><font size="2">The command to do that on the SQL Server is:</font></p>  <p><font size="2" face="Lucida Console">netsh advfirewall firewall add rule name=&quot;SQL01-VMM01&quot; dir=in action=allow enable=yes profile=domain localip=10.100.100.2 remoteip=10.100.100.3 interfacetype=any</font></p>  <p><font size="2">The command to do that on the VMM Server is:</font></p>  <p><font size="2" face="Lucida Console">netsh advfirewall firewall add rule name=&quot;VMM01-SQL01&quot; dir=in action=allow enable=yes profile=domain localip=10.100.100.3 remoteip=10.100.100.2 interfacetype=any</font></p>  <p><font size="2">Replace any of the values above as needed to reflect your IP configuration and the rule name you want to assign.</font></p>  <p><font size="2">VMM has three prerequisites when installed on Windows Server 2012:</font></p>  <ul>   <li><font size="2">Windows Assessment and Deployment Kit for Windows 8: </font><a href="https://www.microsoft.com/en-us/download/details.aspx?id=30652"><font size="2">https://www.microsoft.com/en-us/download/details.aspx?id=30652</font></a></li> </ul>  <blockquote>   <p><font size="2">Download the web installer (adksetup.exe) from the link above. Execute the web installer on your workstation (not the VMM server) and select &quot;Download the Assessment and Deployment Kit for installation on a separate computer&quot; and select a folder. Use the downloaded folder to install WADK to VMM by selecting the &quot;Deployment Tools&quot; and &quot;Windows Preinstallation Environment (Windows PE)&quot; only.</font></p>    <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/7823.Untitled-picture_4ABA998B.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/7823.Untitled_2D00_picture_5F00_4ABA998B.png"><img title="Untitled picture" style="display: inline; background-image: none;" border="0" alt="Untitled picture" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/1205.Untitled-picture_thumb_3DE0436D.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/1205.Untitled_2D00_picture_5F00_thumb_5F00_3DE0436D.png" width="644" height="478" /></a></p> </blockquote>  <ul>   <li><font size="2">SQL Server 2012 Native Client: </font><a href="https://go.microsoft.com/fwlink/?LinkID=239648&amp;clcid=0x409"><font size="2">https://go.microsoft.com/fwlink/?LinkID=239648&amp;clcid=0x409</font></a></li>    <li><font size="2">SQL Server 2012 Command Line Utilities: </font><a href="https://go.microsoft.com/fwlink/?LinkID=239650&amp;clcid=0x409"><font size="2">https://go.microsoft.com/fwlink/?LinkID=239650&amp;clcid=0x409</font></a></li> </ul>  <p><font size="2">You also need to add the VMM Domain Service account on the local admins group:</font></p>  <p><font size="2" face="Lucida Console">net localgroup administrators DCS\VMMService /add</font></p>  <p><font size="2">Using a Domain Service account (vs. a local account) has several advantages one of them being that you can use sharing with ISO images (to attach them to VMs).</font></p>  <p><font size="2">You can install VMM from the command prompt by using the guidance here: </font><a href="https://technet.microsoft.com/en-us/library/hh852761.aspx"><font size="2">https://technet.microsoft.com/en-us/library/hh852761.aspx</font></a></p>  <p><font size="2">We need a configuration file (VMM.ini) that is similar to the following:</font></p>  <p><font size="2" face="Lucida Console">[OPTIONS]      <br /></font><font size="2" face="Lucida Console">ProductKey=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX      <br /></font><font size="2" face="Lucida Console">SqlInstanceName=SCVMMDB      <br /></font><font size="2" face="Lucida Console">RemoteDatabaseImpersonation=1      <br /></font><font size="2" face="Lucida Console">SqlMachineName=SQL01      <br /></font><font size="2" face="Lucida Console">LibrarySharePath=E:\VMMLibrary      <br /></font><font size="2" face="Lucida Console">MUOptIn=1      <br /></font><font size="2" face="Lucida Console">VmmServiceLocalAccount=0</font></p>  <p><font size="2">Provide your Product Key, configure the database details and set the location of your VMM Library. Save the file as: C:\Config\VMM.ini</font></p>  <p><font size="2">On the Virtual Machine Manager server insert the media and execute the following command:</font></p>  <p><font size="2" face="Lucida Console">setup.exe /server /i /f c:\Config\VMM.ini /VmmServiceDomain DCS /VmmServiceUserName VMMService /VmmServiceUserPassword P@ssw0rd /SqlDBAdminDomain DCS /SqlDBAdminName Administrator /SqlDBAdminPassword P@ssw0rd /IACCEPTSCEULA</font></p>  <p><font size="2">You need to provide credentials for the VMM Service (a Domain Account) and for a SQL Server Admin (from the group we configured earlier, for example the Domain Admins).</font></p>  <p><font size="2">During installation observe (through Task Manager) the two processes running: &quot;SetupVM&quot; and &quot;Virtual Machine Manager Setup&quot;.</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/3618.Untitled-picture_207AC5D6.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/3618.Untitled_2D00_picture_5F00_207AC5D6.png"><img title="Untitled picture" style="display: inline; background-image: none;" border="0" alt="Untitled picture" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/7563.Untitled-picture_thumb_45981042.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/7563.Untitled_2D00_picture_5F00_thumb_5F00_45981042.png" width="533" height="484" /></a></p>  <p><font size="2">You can troubleshoot setup by investigating the Log Files at: C:\ProgramData\VMMLogs</font></p>  <p><font size="2">For example opening SetupWizard.log we observe the following:</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/8255.Untitled-picture_729CD743.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/8255.Untitled_2D00_picture_5F00_729CD743.png"><img title="Untitled picture" style="display: inline; background-image: none;" border="0" alt="Untitled picture" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/1185.Untitled-picture_thumb_3CB7E229.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/1185.Untitled_2D00_picture_5F00_thumb_5F00_3CB7E229.png" width="604" height="46" /></a></p>  <p><font size="2">Opening PrereqCheck.log we find the following issue:</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/8154.Untitled-picture_090F75CB.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/8154.Untitled_2D00_picture_5F00_090F75CB.png"><img title="Untitled picture" style="display: inline; background-image: none;" border="0" alt="Untitled picture" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/0488.Untitled-picture_thumb_3A2EB06B.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/0488.Untitled_2D00_picture_5F00_thumb_5F00_3A2EB06B.png" width="644" height="48" /></a></p>  <p><font size="2">In this case the solution is obvious: There is a pending restart prohibiting our installation. Restart the VM and retry.</font></p>  <p><font size="2">If everything went ok, opening SetupWizard.log we would read the following:</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/7457.Untitled-picture_666B374F.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/7457.Untitled_2D00_picture_5F00_666B374F.png"><img title="Untitled picture" style="display: inline; background-image: none;" border="0" alt="Untitled picture" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/3678.Untitled-picture_thumb_4577C4A8.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/3678.Untitled_2D00_picture_5F00_thumb_5F00_4577C4A8.png" width="404" height="79" /></a></p>  <p><font size="2">Your installation of VMM is now finished successfully! Verify the installation by opening the VMM console:</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/2262.Untitled-picture_7CDDD5D6.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/2262.Untitled_2D00_picture_5F00_7CDDD5D6.png"><img title="Untitled picture" style="display: inline; background-image: none;" border="0" alt="Untitled picture" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/3414.Untitled-picture_thumb_73FDA7BD.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/3414.Untitled_2D00_picture_5F00_thumb_5F00_73FDA7BD.png" width="744" height="529" /></a></p>  <p><font size="2">Panos Macheras      <br />Architect       <br />Microsoft Consulting Services</font></p>  <p><font size="2">Follow me on twitter: </font><a title="https://twitter.com/panosmacheras" href="https://twitter.com/panosmacheras"><font size="2">https://twitter.com/panosmacheras</font></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Windows 7 SteadyState solution simplified!</title>
      <link>https://docs.microsoft.com/archive/blogs/panosm/windows-7-steadystate-solution-simplified</link>
      <pubDate>Thu, 07 Jul 2011 11:51:00 GMT</pubDate>
      <dc:creator><![CDATA[Panos Macheras]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/panosm/2011/07/07/windows-7-steadystate-solution-simplified/</guid>
      <description><![CDATA[Download: Windows 7 SteadyState Version 1.0 Setup Files and Step-By-Step Guide!
On my last Blog...]]></description>
      <content:encoded><![CDATA[<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/4532.image_7AAA14AC.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/4532.image_5F00_7AAA14AC.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/6204.image_thumb_74AF2579.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/6204.image_5F00_thumb_5F00_74AF2579.png" width="478" height="209" /></a></p>
<h3><strong><span size="5" style="font-size: large;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/SteadyStateFiles/0523.Win7SteadyState1.0.zip" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-SteadyStateFiles/0523.Win7SteadyState1.0.zip" target="_blank">Download: Windows 7 SteadyState Version 1.0 Setup Files and Step-By-Step Guide!</a></span></strong></h3>
<p>On my <a href="https://blogs.technet.com/b/panosm/archive/2011/01/23/implementing-a-windows-7-steadystate-by-utilizing-differencing-vhds-files-and-the-boot-from-vhd-feature.aspx" target="_blank">last Blog Post</a> I described a procedure to implement a Windows 7 SteadyState by utilizing differencing VHD files and the "Boot from VHD" feature of Windows 7. It was great to see the enthusiastic response from the community and how much some of you desperately needed such a solution.</p>
<p>However the procedure to implement my solution had many drawbacks: It was difficult to implement all the steps as they required a LOT of manual work. For that same reason deploying the solution to more that 10 PCs was pretty much out of the question. Another drawback was that it required the use of WinPE to handle the VHD files.</p>
<p>I promised to implement a more straight-forward method by using the Microsoft Deployment Toolkit (MDT) to deploy and configure the OS. So here it is! The solution in this Blog Post has many advantages over the old one:</p>
<ul>
<li>It is straightforward. Just a simple reboot will get you to the initial SteadyState.</li>
<li>It is less prone to errors and faster. By avoiding the use of WinPE we return to the initial SteadyState after a single reboot.</li>
<li>It is easy to install. Just follow the instructions below. You should be up and running in less than 20 minutes (with most of the steps automated).</li>
<li>It is easy to deploy on several machines. We create a bootable media (DVDR) and use that to automatically install everywhere. MDT can also be used to install over the network.</li>
</ul>
<p>I urge everyone needing to implement a Windows 7 SteadyState scenario to give it a try (Internet Cafes, Kiosks, etc.). I believe that you will find the solution clean and effective. As usual I am eager to receive your feedback on how this solution can be improved further or to address any specific scenarios that you have in mind.</p>
<h1>Windows 7 SteadyState Step-By-Step guide:</h1>
<p>We will need one PC where the Windows Automated Installation Kit (WAIK) and the Microsoft Deployment Toolkit (MDT) will be installed. Both of these are free downloads from Microsoft. We will use these tools with <a href="https://www.autoitscript.com/site/autoit/" target="_blank">AutoIt scripts</a> to create a bootable ISO from which we will use to automatically install Windows 7 <strong>and</strong> the SteadyState solution.</p>
<h2>Step 1: Install WAIK for Windows 7</h2>
<p>Download the Windows Automated Installation Toolkit from here: <a href="https://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=5753">https://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=5753</a>. Run the installation. Choose "Windows AIK Setup":</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/3566.image_4277AF62.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/3566.image_5F00_4277AF62.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/7612.image_thumb_1E8ED808.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/7612.image_5F00_thumb_5F00_1E8ED808.png" width="456" height="337" /></a></p>
<p>Run the setup wizard and accept the defaults.</p>
<h2>Step 2: Install MDT 2010 Update 1</h2>
<p>Download the Microsoft Deployment Toolkit from here: <a href="https://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=25175">https://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=25175</a>. Select either the x86 or the x64 version (depending on the OS you are currently running). Run the setup file and select the defaults on the installation wizard. <br /> <br />Note: This solution was tested with the x86 version of MDT.</p>
<h2>Step 3: Download the Windows 7 SteadyState setup files</h2>
<p>Download the package containing the Windows 7 SteadyState solution files <a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/SteadyStateFiles/0523.Win7SteadyState1.0.zip" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-SteadyStateFiles/0523.Win7SteadyState1.0.zip" target="_blank">here</a>.</p>
<p>Create a folder (for example: C:\SteadyState) and unzip the Win7SteadyState.zip files there.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/8787.image_634AD66F.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/8787.image_5F00_634AD66F.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/1768.image_thumb_17BB82EB.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/1768.image_5F00_thumb_5F00_17BB82EB.png" width="501" height="412" /></a></p>
<h2>Step 4: Copy the Windows 7 media to the hard disk</h2>
<p>Copy all the files from your Windows 7 DVD to the WIN7CD subfolder.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/8712.image_47F231D4.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/8712.image_5F00_47F231D4.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/8713.image_thumb_735652CE.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/8713.image_5F00_thumb_5F00_735652CE.png" width="506" height="247" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/8712.image_47F231D4.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/8712.image_5F00_47F231D4.png"></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/8712.image_47F231D4.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/8712.image_5F00_47F231D4.png"></a></p>
<p><span style="font-size: small;"><strong>IMPORTANT NOTE (updated!): ONLY use Windows 7 Enterprise or Windows 7 Ultimate edition media. Other editions or multi-edition DVDs (which include all editions) will not work! You can get a 90-day trial edition of the Windows 7 Enterprise Edition here:&nbsp;<a href="https://technet.microsoft.com/en-us/evalcenter/cc442495">https://technet.microsoft.com/en-us/evalcenter/cc442495</a></strong></span></p>
<h2>Step 5: Run the setup script</h2>
<p><strong>UPDATE: Before running "SETUP.exe" make sure that you have set the execution policy in Powershell correctly. Open Powershell (as an administrator) and execute the following command: </strong></p>
<p><strong>set-executionpolicy unrestricted</strong></p>
<p><b>Answer "Y" to the Execution Policy Change question and close Powershell. Thanks goes to Brendan for pointing this out!</b></p>
<p>To automatically create our Windows 7 SteadyState installation ISO we will run the setup.exe script. This script (written in AutoIT) will configure MDT and prepare a bootable ISO which we will use to deploy the solution.</p>
<p>Run the script as a local administrator and wait for it to prepare your bootable ISO file which you will use to install the Windows 7 SteadyState solution to your PCs.</p>
<p>You should see several Powershell scripts executing while the image is prepared.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/3022.image_290B9829.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/3022.image_5F00_290B9829.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/6562.image_thumb_42FF584B.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/6562.image_5F00_thumb_5F00_42FF584B.png" width="509" height="259" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/8737.image_51E68765.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/8737.image_5F00_51E68765.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/1385.image_thumb_48AA4C24.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/1385.image_5F00_thumb_5F00_48AA4C24.png" width="513" height="263" /></a></p>
<p>If you get the following message, click "This program installed correctly":</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/0211.image_24C174CA.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/0211.image_5F00_24C174CA.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/5516.image_thumb_02F59C39.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/5516.image_5F00_thumb_5F00_02F59C39.png" width="417" height="341" /></a></p>
<p>At the end you should see a Windows Explorer window with the ISO file:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/5444.image_4C57CB27.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/5444.image_5F00_4C57CB27.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/3060.image_thumb_354949EB.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/3060.image_5F00_thumb_5F00_354949EB.png" width="496" height="179" /></a></p>
<p>Burn the ISO file to a DVDR.</p>
<h2>Step 6: Boot from the SteadyState ISO</h2>
<p>Boot with your newly created DVDR on the computer you want to install the Windows 7 SteadyState solution.</p>
<p><strong>WARNING: This procedure will completely format your hard disk so make sure you are prepared for this!</strong></p>
<p>The bootable ISO will:</p>
<ul>
<li>Install Windows 7 on a VHD file</li>
<li>Create and configure the use of differencing disks</li>
<li>Configure Windows Boot Manager</li>
</ul>
<p>When your PC boots from the ISO you will have to select either the x86 or the x64 installation of Windows 7. Choose whatever version of Windows 7 you used during the creation of the ISO (in Step 4 above):</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/4848.image_00C877A3.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/4848.image_5F00_00C877A3.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/8662.image_thumb_2D04FE87.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/8662.image_5F00_thumb_5F00_2D04FE87.png" width="499" height="138" /></a></p>
<p><strong>WARNING: Choosing the wrong OS version here will cause the installation to fail! If that happens simply restart the procedure.</strong></p>
<p>After selecting the proper OS version the install procedure will start automatically. Allow plenty of time for the installation to complete (usually 15-30 minutes).</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/5554.image_4F0D5A4D.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/5554.image_5F00_4F0D5A4D.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/2816.image_thumb_1445B177.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/2816.image_5F00_thumb_5F00_1445B177.png" width="502" height="212" /></a></p>
<p>At the end of the procedure you should see a message that the "Operating System deployment completed successfully". Do not proceed further if you have not received this message.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/6433.image_4554C64A.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/6433.image_5F00_4554C64A.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/0763.image_thumb_2388EDB9.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/0763.image_5F00_thumb_5F00_2388EDB9.png" width="503" height="360" /></a></p>
<p>Click &ldquo;Finish&rdquo;. Windows 7 installation (configured for SteadyState) is complete:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/6052.image_6135D575.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/6052.image_5F00_6135D575.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/1680.image_thumb_79A5272B.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/1680.image_5F00_thumb_5F00_79A5272B.png" width="501" height="377" /></a></p>
<h2>Step 7: Configure your initial Windows 7 SteadyState</h2>
<p>Proceed to install and configure whatever you want to be part of your initial Windows 7 SteadyState (install Office or run Windows Update for example).</p>
<p>After you are done simply reboot the machine.</p>
<p>After reboot you are given two options during the start procedure:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/2744.image_3524EA52.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/2744.image_5F00_3524EA52.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/4401.image_thumb_61617136.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-86-89-metablogapi/4401.image_5F00_thumb_5F00_61617136.png" width="500" height="163" /></a></p>
<p>The first option (Windows 7) runs your initial State where you can configure it to your liking. Whatever changes you make will be permanent after your next reboot.</p>
<p>The second option (SteadyState) runs the initial SteadyState but any changes you make on it will be discarded on the next reboot.</p>
<p><strong>This is basically it!</strong> In case you want to make changes that need to reboot your OS (installing Windows 7 SP1 for example) then simply select the first option after the first reboot. This will ensure that your changes are persistent in your SteadyState.</p>
<p>You can automate further the installation (for example by automating the Microsoft Office installation or a 3rd party program) by modifying the MDT 2010 Task Sequence which was created by the setup script. For further guidance on how to work with MDT 2010 look here: <a href="https://technet.microsoft.com/en-us/solutionaccelerators/dd407791">https://technet.microsoft.com/en-us/solutionaccelerators/dd407791</a></p>
<p>&nbsp;</p>
<h1>Frequently Asked Questions:</h1>
<h1></h1>
<ol>
<li><em>How do I change the size of win7.vhd on the OSDisk? <br /></em> <br />Open the ZTIDiskpartVHD.wsf file in Notepad and look for the following line: <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">DiskPartWrite oExec, "Create vdisk file='c:\win7.vhd' MAXIMUM=30000 type=expandable" <br /> <br /></span>We see here that we use an expandable VHD with a maximum size of 30000 MB (approximately 29 GBs). Edit the size to whatever you find more appropriate for your environment. Run SETUP.exe again to create a new ISO image with your change.</li>
<li><em>Can I use a bootable USB drive instead of an ISO? <br /></em> <br />Yes you can! Copy and paste all the files contained in the c:\DeploymentShare\Media\Content folder, to your USB disk. Make the USB disk bootable by running the command: <span face="Lucida Console" style="font-family: 'Lucida Console';">bootsect /nt60 f: /force</span> <br /> <br />The bootsect.exe utility is located in the Boot folder of your Windows 7 media. Replace f: with the drive letter of your USB disk.</li>
<li><em>I want to change the amount of seconds the boot screen is visible during boot or hide it altogether. How do I do that?</em> <br /> <br />Edit the BootScriptSteadyState.au3 and change the following line: <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">RunWait('cmd /c bcdedit -timeout 5',"",@SW_HIDE) <br /> <br /></span>The default is 5 seconds. A value of zero means that you will not get the boot menu at all. <br /> <br />Compile the script (you will need to download and install <a href="https://www.autoitscript.com/site/autoit/" target="_blank">AutoIt</a> to be able to do that). Run SETUP.exe again to create a new ISO image with your change or simply replace c:\windows\system\BootScriptSteadyState.exe of a current installation.</li>
<li><em>What does SETUP.exe do exactly? <br /></em> <br />SETUP.exe is a script written in <a href="https://www.autoitscript.com/site/autoit/" target="_blank">AutoIt</a>. You can see the source code by opening the SETUP.au3 file. To make any changes download and install AutoIT (it is free!). This will allow you to compile a new SETUP.exe and use that to further customize the solution.</li>
<li><em>Are there any system requirements for your solution? Do I need to pay any licensing fees to use it? <br /></em> <br />The system requirements are as follows: <br /> <br />For the PC where you create the ISO image: Windows 7 must be installed. Creating the ISO file requires at least 10 GB on the C: drive. <br /> <br />For the PCs where you will install the Windows 7 SteadyState solution: The PCs must be able to run Windows 7 (as defined by the <a href="https://windows.microsoft.com/en-US/windows7/products/system-requirements" target="_blank">Windows 7 System Requirements</a>) with a hard disk of at least the amount of the Win7.vhd file when expanded to its maximum capacity (the default is 30 Gb but you can change it - see FAQ number 1) plus the size of your initial SteadyState (5 Gb for a bare minimum Windows 7 installation + whatever you install afterwards). The absolute minimum is 35 Gb but I would recommend using at least 50-60 Gb hard disks if not more. If you have smaller disks then lower the size of the initial VHD. <br /> <br />Regarding licensing: You only need to have a valid Windows 7 license for the PC where you install the SteadyState solution. WAIK and MDT are both free tools governed by their own licensees for use which you can read into each product's documentation.You are free to customize any of the files I have provided as part of the solution (source code, configuration files, etc.). However I would humbly ask that you provide a reference back to this webpage if you intent to publish your changes on the web or elsewhere.</li>
<li><em>MDT 2010 is capable of doing advanced deployments by using PXE or even integrating with SCCM for ZTI scenarios. Is your solution compatible with these capabilities?&nbsp; <br /></em> <br />Of course! SETUP.exe will fully configure your MDT 2010 installation and produce an ISO file to use for the installation. However you can customize the MDT 2010 installation to support any kind of deployment that best fits your environment including installing with PXE boot or by using a CDROM to simply connect your PC back to the MDT 2010 PC. See <a href="https://technet.microsoft.com/en-us/solutionaccelerators/dd407791" target="_blank">here</a> for guidance on how to take advantage of the advanced deployment features that MDT 2010 offers.</li>
<li><em>I have frequent problems with BSODs and system crashes during boot. What could be the cause? <br /></em> <br />Make sure that you have enough free disk space on C:. If there is not enough free disk on C: to store the temporary state then you will get BSODs during boot. For estimates on free disk space see FAQ number 5. In case you are stuck in such a situation, either re-install the solution from the ISO file (by changing the size of your VHD file as described in FAQ number 1), or boot from your Windows 7 media, open a command prompt and delete any temp#######.vhd files you have found on your hard disks. Then reboot.</li>
<li><em>Will your solution work in an Active Directory environment? <br /></em> <br />I cannot see why not, but please have in mind that including a domain-joined PC in a SteadyState means that the AD Computer Account password will be reset on each boot. While this should not be a problem you should make sure that you have no issues with Group Policy being applied or authenticating to other resources in the domain (i.e. File Servers).</li>
<li><em>I get several errors in the Boot Manager about improper configuration. What might be wrong?</em> <br /> <br />You probably restarted the PC while being in the configurable SteadyState by just turning the power off. This means that the differencing VHD cannot use the originating VHD to boot. If you are in this scenario simply boot to whichever boot option is available, reboot normally, go to the persistent changes state and reboot normally again. You can now continue to use the temporary state as you normally would.</li>
</ol>
<p>A special thanks goes to <a href="https://blogs.technet.com/b/deploymentguys/" target="_blank">The Deployment Guys</a> for automating the deployment of Windows 7 to a VHD file. You can find their solution <a href="https://blogs.technet.com/b/deploymentguys/archive/2009/03/03/deploying-win-7-to-boot-from-vhd-with-mdt-2010.aspx" target="_blank">here</a>.</p>
<p>Panos Macheras <br />Microsoft Infrastructure Consultant</p>
<p>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Implementing a Windows 7 SteadyState by utilizing differencing VHDs files and the “Boot from VHD” feature</title>
      <link>https://docs.microsoft.com/archive/blogs/panosm/implementing-a-windows-7-steadystate-by-utilizing-differencing-vhds-files-and-the-boot-from-vhd-feature</link>
      <pubDate>Sun, 23 Jan 2011 06:10:00 GMT</pubDate>
      <dc:creator><![CDATA[Panos Macheras]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/panosm/2011/01/23/implementing-a-windows-7-steadystate-by-utilizing-differencing-vhds-files-and-the-boot-from-vhd-feature/</guid>
      <description><![CDATA[Update (07/July/2011): This solution is now deprecated. To get a vastly-improved Windows...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: medium;"><strong></strong></span></p>
<p><span style="font-size: medium;"><strong></strong></span></p>
<p><span style="font-size: medium;"><strong></strong></span></p>
<p><span style="font-size: medium;"><strong></strong></span></p>
<p><span style="font-size: medium;"><strong></strong></span></p>
<p></p>
<p><span size="3" style="font-size: small;"><b><span style="font-size: medium;"><strong>Update (07/July/2011): This solution is now deprecated. To get a vastly-improved Windows 7 SteadyState solution please visit this page:&nbsp;<a href="https://blogs.technet.com/b/panosm/archive/2011/07/07/windows-7-steadystate-solution-simplified.aspx">https://blogs.technet.com/b/panosm/archive/2011/07/07/windows-7-steadystate-solution-simplified.aspx</a></strong></span><br /></b></span></p>
<p></p>
<p></p>
<p><em>Windows SteadyState</em> was a tool that allowed administrators to revert a workstation running XP or Vista to a previously stored state every time it reboots, or on administrator&rsquo;s request. This feature was extremely useful in scenarios where workstation consistency at the OS and application level is required and the User State (user profile, user files, application settings) is not stored locally. Typical implementations of <em>Windows SteadyState</em> were workstation installations at schools, libraries or internet cafes. However, a recent trend that has been steadily increasing on the enterprise space is the need to deploy stable, rarely-updated machines that maintain their consistency across user sessions (boots) while improving manageability by utilizing Application Virtualization technologies as well as Group Policy. The end result is an Enterprise Workstation that is consistent, requires minimum management and costs less to maintain. You can find more info about <em>Windows SteadyState</em> at Wikipedia: <a href="https://en.wikipedia.org/wiki/Windows_SteadyState" target="_blank">https://en.wikipedia.org/wiki/Windows_SteadyState</a>.</p>
<p><em>Windows SteadyState </em>is now <a href="https://support.microsoft.com/kb/2390706" target="_blank">discontinued</a>. The last supported operating system was Windows Vista and the version released for that OS (<a href="https://www.microsoft.com/downloads/en/details.aspx?familyid=d077a52d-93e9-4b02-bd95-9d770ccdb431&amp;displaylang=en" target="_blank">version 2.5</a>) is incompatible with Windows 7. In it&rsquo;s place Microsoft has released guidance on how to achieve a &ldquo;SteadyState-like&rdquo; functionality by using Group Policy (to restrict the level of changes that can be made to the OS by the end user) and MDT 2010 (to revert to a well-known initial condition). You can find more info here: <a href="https://technet.microsoft.com/en-us/library/gg176676(WS.10).aspx">https://technet.microsoft.com/en-us/library/gg176676(WS.10).aspx</a>. Unfortunately using MDT 2010 to restore the OS to a well known initial state is sometimes not practical and can be time consuming.</p>
<p>A proposed alternative is the use of the a new Windows 7 feature called &ldquo;Boot from VHD&rdquo; or &ldquo;Native VHD Boot&rdquo;. This feature allows the usage of a VHD file (Virtual Hard Disk) to run the operating system instead of using a hard disk partition. It should <em>not</em> be confused with virtualization technologies like Hyper-V or Virtual PC. This feature does not use a hypervisor or virtual hardware. You should think of it as running your C: partition on a VHD file instead of a real hard disk partition. You can find more info about this feature here: <a href="https://technet.microsoft.com/en-us/library/dd440865(WS.10).aspx" target="_blank">https://technet.microsoft.com/en-us/library/dd440865(WS.10).aspx</a>.</p>
<p>What is interesting about this feature is that it can work with a differencing VHD file. What is a differencing VHD file? A differencing VHD file is linked on a regular VHD file (called parent VHD) and only stores modified blocks of data in relation to its parent VHD. The result is that we can easily roll back changes by simply resetting this differencing VHD to its initial (empty) condition. This is a technique that is commonly used in Lab deployments where several virtual machines use differencing VHDs in order to test scenarios and then rollback changes. <em><strong>We can also use differencing disks to achieve the same result in a physical Windows 7 installation.</strong></em></p>
<p>In this blog post we are going to describe a &ldquo;step-by-step&rdquo; guide on how to use this technique. In a second blog post we will describe how to automate the installation by using MDT 2010 so that we can leverage this capability at the enterprise level. <br /> </p>
<h1>Step 1: Creating a WinPE ISO</h1>
<p>WinPE is the <a href="https://en.wikipedia.org/wiki/Windows_pe" target="_blank">Windows Preinstallation Environment</a> used during the installation of Windows. It is also used for common maintenance tasks or for troubleshooting broken installations. It is included in <a href="https://technet.microsoft.com/en-us/library/dd349343(WS.10).aspx" target="_blank">Windows Automated Installation Kit</a> for Windows 7 (<a href="https://www.microsoft.com/downloads/en/details.aspx?displaylang=en&amp;FamilyID=696dd665-9f76-4177-a811-39c26d3b3b34" target="_blank">Download</a>). We will install and use WinPE in order to manage the differencing VHD of the Operating System either by discarding changes (to revert to our initial Steady State) or by committing the changes (by merging the differencing VHD to its parent VHD).</p>
<ol>
<li>Download and install WAIK for Windows 7 (<a href="https://www.microsoft.com/downloads/en/details.aspx?displaylang=en&amp;FamilyID=696dd665-9f76-4177-a811-39c26d3b3b34" target="_blank">Link</a>) on an existing Windows 7 or Windows Server 2008 R2 installation. </li>
<li>As Administrator run: Start &ndash;&gt; All Programs &ndash;&gt; Windows AIK &ndash;&gt; Deployment Tools Command Prompt. </li>
<li>On the command prompt run the following commands: <br /> <br /><span style="background-color: #cccccc; font-family: 'Lucida Console';" face="Lucida Console"></span><span face="Lucida Console" style="font-family: 'Lucida Console';">copype.cmd x86 c:\winpe_x86 <br /> <br />copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wim <br /></span><span face="Lucida Console" style="font-family: 'Lucida Console';"> <br />copy "c:\program files\Windows AIK\Tools\x86\ImageX.exe" c:\winpe_x86\iso\ <br /></span><span face="Lucida Console" style="font-family: 'Lucida Console';"> <br />copy c:\windows\system32\bcdedit.exe c:\winpe_x86\iso\ <br /> <br />oscdimg.exe &ndash;bC:\winpe_x86\iso\boot\etfsboot.com &ndash;u2 &ndash;h -m -lWINPE C:\winpe_x86\iso\ C:\WINPE.iso</span><strong><span face="Lucida Console" style="font-family: 'Lucida Console';"> <br /></span><span face="Lucida Console" style="font-family: 'Lucida Console';"></span> <br /></strong>(Note: Replace x86 with x64 if you are looking to install the x64 version of Windows 7) </li>
<li>Store the resulting WINPE.iso file. We will use it to install WinPE on our workstation later. </li>
</ol>
<h1></h1>
<h1>Step 2: Creating the VHD files</h1>
<p>On Step 2 we are going to use the diskpart command line utility to format the physical hard disk and create 3 VHD files:</p>
<ul>
<li><strong>c:\win7.vhd</strong>: The parent VHD file which will contain our &ldquo;Steady State&rdquo;.</li>
<li><strong>c:\temp.vhd</strong>: The differencing VHD file which will be used to store the changes.</li>
<li><strong>c:\winpe.vhd</strong>: The VHD file which will host WinPE.</li>
</ul>
<p align="center"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/5758.Drawing1_7610512E.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-86-89-metablogapi/5758.Drawing1_5F00_7610512E.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Drawing1" border="0" alt="Drawing1" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/8883.Drawing1_thumb_445533D9.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-86-89-metablogapi/8883.Drawing1_5F00_thumb_5F00_445533D9.jpg" width="379" height="305" /></a></p>
<p>The command below will create a parent VHD file of approximately 30 GB size and of type &ldquo;expandable&rdquo; (meaning that it will start from zero size and expand up to the 30 GB limit). Feel free to change the size according to your specifications. You can also use a type &ldquo;fixed&rdquo; vhd file which will pre-allocate the whole size of the VHD (by creating a big VHD file of the maximum size you specify). Using a &ldquo;fixed&rdquo; VHD file will give you a small performance improvement vs. using an &ldquo;expandable&rdquo; one. The last step will create a copy of the differencing VHD which we will use to quick revert our VHD to an initial &ldquo;empty&rdquo; state.</p>
<ol>
<li>On the target workstation boot from your Windows 7 media. </li>
<li>On the Setup Screen click SHIFT-F10 to open the command prompt. </li>
<li>On the command prompt run the following commands: <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">diskpart <br /> <br />select disk 0 <br /> <br />clean <br /> <br />create partition primary <br /> <br />select partition 1 <br /> <br />active <br /> <br />format fs=ntfs quick <br /> <br />assign letter=C <br /> <br />create vdisk file=&rdquo;c:\win7.vhd&rdquo; maximum=30000 type=expandable <br /> <br />create vdisk file=&rdquo;c:\temp.vhd&rdquo; parent=&rdquo;c:\win7.vhd&rdquo; <br /> <br />create vdisk file=&rdquo;c:\winpe.vhd&rdquo; maximum=2000 type=expandable <br /> <br />select vdisk file=&rdquo;c:\win7.vhd&rdquo; <br /> <br />attach vdisk <br /> <br />exit <br /> <br />copy c:\temp.vhd c:\temp.vhd.orig</span> </li>
</ol>
<h1>Step 3: Installing Windows 7 on the parent VHD file</h1>
<p>The next step is to use the win7.vhd file we created, to install Windows 7:</p>
<ol>
<li>Close the command prompt and return to the Windows 7 setup. Click &ldquo;Next&rdquo; and proceed with the installation by selecting &ldquo;Install Now&rdquo;. </li>
<li>Select &ldquo;Custom (Advanced)&rdquo; installation. </li>
<li>Select the VHD file to install Windows 7 (you will notice which one it is by its size, in comparison to the physical hard disk). <br /> <br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/3617.Capture_61E70ED8.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-86-89-metablogapi/3617.Capture_5F00_61E70ED8.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Capture" border="0" alt="Capture" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/5850.Capture_thumb_713A70E7.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-86-89-metablogapi/5850.Capture_5F00_thumb_5F00_713A70E7.png" width="465" height="350" /></a> </li>
<li>Ignore the error &ldquo;Windows cannot be installed to this disk.&rdquo; and proceed with the setup by clicking &ldquo;Next&rdquo;. </li>
<li>Complete the OS setup and logon to your new Windows 7 installation. </li>
</ol>
<h1>Step 4: Installing WinPE on the winpe.vhd file</h1>
<p>On your new Windows 7 installation perform the following to install WinPE on the winpe.vhd file.</p>
<ol>
<li>Open the Command Prompt as Administrator. </li>
<li>Run the command: <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">bcdedit &ndash;copy {current} /d &ldquo;Windows 7 AVHD&rdquo; <br /> <br /></span><span face="Segoe UI" style="font-family: 'Segoe UI';">This command will return a GUID in the form of {94bb083f-1f8f-11e0-8b9f-a1bc155f31e3}. Make a note of this GUID as you will use it in the commands that follow and also during Step 5. This is the GUID for the differencing VHD.</span> </li>
<li>Run the commands: <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">bcdedit &ndash;set GUID device vhd=[D:]\temp.vhd <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">bcdedit &ndash;set GUID osdevice vhd=[D:]\temp.vhd</span> <br /> <br /></span>Replace GUID with the one that you got from the bcdedit &ndash;copy command previously. <br />Replace D: with the drive where your temp.vhd is located (if it is not on D:). Do not omit the brackets! </li>
<li>Run the following commands to format winpe.vhd and install WinPE in it: <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">diskpart <br /> <br />select vdisk file=&rdquo;d:\winpe.vhd&rdquo; <br /> <br />attach vdisk <br /> <br />clean <br /> <br />create partition primary <br /> <br />format fs=ntfs quick <br /> <br />assign letter p <br /> <br />exit</span> </li>
<li>Insert the WINPE.iso you created on Step 1. Let&rsquo;s say that you inserted it on E: (replace accordingly below &ndash; if different). </li>
<li>Run the commands: <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">e:\imagex /apply e:\sources\boot.wim 1 p: <br /> <br />xcopy e:\boot\*.* /e /f p:\boot\ <br /> <br />copy e:\bootmgr p: <br /> <br />bcdedit -create /d "WinPE" -application osloader <br /> <br /></span><span face="Segoe UI" style="font-family: 'Segoe UI';">The last <span face="Segoe UI" style="font-family: 'Segoe UI';">command will return a GUID in the form of {94bb083f-1f8f-11e0-8b9f-a1bc155f31e3}. Make a note of this GUID as you will use it in the commands that follow.</span></span> This is the GUID for WinPE. </li>
<li>Run the commands: <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">bcdedit -set GUID device vhd=[D:]\winpe.vhd <br /> <br />bcdedit -set GUID osdevice vhd=[D:]\winpe.vhd </span> <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">bcdedit -set GUID path \windows\system32\boot\winload.exe <br /> <br />bcdedit &ndash;set GUID systemroot \windows <br /> <br />bcdedit -set GUID winpe yes <br /> <br />bcdedit -set GUID nx OptIn <br /> <br />bcdedit -set GUID detecthal yes <br /> <br />bcdedit -displayorder GUID &ndash;addlast <br /> <br />bcdedit -timeout 0</span> <br /> <br />Replace GUID with the one that you got from the bcdedit &ndash;create command. <br />Replace D: with the drive where your winpe.vhd is located (if it is not on D:). Do not omit the brackets! </li>
</ol>
<h1>Step 5: Create the scripts to automate discarding and committing changes</h1>
<p>We have created all the necessary VHD files. In the next step we need to provide the logic behind &ldquo;discarding&rdquo; and &ldquo;committing&rdquo; changes we have made in each session. As previously explained this is done by either resetting or merging the differencing VHD file temp.vhd. This procedure is done by booting into WinPE (through winpe.vhd which we created in Step 4), doing the change, and then rebooting to the differencing VHD. There are two options that we will configure:</p>
<ul>
<li><strong>Discard the changes and revert to the &ldquo;SteadyState&rdquo;: </strong>This is done by simply rebooting or shutting down and restart the machine. We will place a script running during the shutdown which will configure an autorun script for WinPE to delete temp.vhd, replace it with a blank one and then change the default booting partition to the (now empty) differencing VHD (temp.vhd). </li>
<li><strong>Commit the changes permanently: </strong>This is done by running a script located in c:\windows\system32 called Commit.Bat. This script configures an autorun script for WinPE to merge temp.vhd with win7.vhd, create a new empty temp.vhd differencing disk and then change the default booting partition to the (now empty) differencing VHD (temp.vhd).</li>
</ul>
<p>Additionally we will also configure a startup command to change the default booting partition to WinPE (winpe.vhd).</p>
<p>Here are the detailed steps on how to configure this:</p>
<ol>
<li>First of we need two things: The 2 GUIDs we used during Step 4, the differencing VHD GUID and the WinPE GUID. We are going to use those to define the default booting partition (this is <a href="https://technet.microsoft.com/en-us/library/cc709667(WS.10).aspx" target="_blank">how bcdedit works</a>). </li>
<li>Run: gpedit.msc to open to Local Group Policy Editor. Go to: Local Computer Policy &ndash;&gt; Computer Configuration &ndash;&gt; Windows Settings &ndash;&gt; Scripts (Startup/Shutdown). Double-Click &ldquo;Startup&rdquo; to open the &ldquo;Startup Properties&rdquo; window and click &ldquo;Add&rdquo;. Enter the following: <br /> <br />Script Name: c:\windows\system32\bcdedit.exe <br />Script Parameters: &ndash;default GUID <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';"><span face="Segoe UI" style="font-family: 'Segoe UI';">Replace GUID above with the WinPE GUID you noted in Step 4. Click &ldquo;OK&rdquo; and close Local Group Policy Editor. <br /> <br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/7002.Capture2_3BE138B5.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-86-89-metablogapi/7002.Capture2_5F00_3BE138B5.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Capture2" border="0" alt="Capture2" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/2627.Capture2_thumb_0838CC57.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-86-89-metablogapi/2627.Capture2_5F00_thumb_5F00_0838CC57.png" width="397" height="174" /></a></span> <br /> <br /></span></li>
<li>Verify that winpe.vhd is still mounted as Drive P:. If this is not the case then use diskpart (or diskmgmt.msc) to attach it. </li>
<li>Go to: P:\windows\system32 and run: <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">notepad winpeshl.ini</span> </li>
<li>Add the following lines inside winpeshl.ini: <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">[LaunchApps] <br />%SYSTEMROOT%\system32\winpe.bat <br /> <br /></span><span face="Segoe UI" style="font-family: 'Segoe UI';">This file will autorun winpe.bat during WinPE boot. After completion WinPE will automatically reboot the computer. Save the file and close Notepad.</span> </li>
<li>Again from: P:\windows\system32 run: <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">notepad discard.bat</span> </li>
<li>Add the following lines inside discard.bat: <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">copy /y c:\temp.vhd.orig c:\temp.vhd <br /> <br />bcdedit &ndash;default GUID <br /> <br /></span>Where GUID is the differencing VHD GUID you noted in Step 4. Save the file and close Notepad. </li>
<li>Again from: P:\windows\system32 run: <br /><span face="Lucida Console" style="font-family: 'Lucida Console';"> <br />notepad commit.bat</span> </li>
<li>Add the following lines inside commit.bat: <br /> <br /><span face="Lucida Console" style="font-family: 'Lucida Console';">echo select vdisk file=c:\temp.vhd &gt; vhdmerge.s <br /> <br />echo merge vdisk depth=1 &gt;&gt; vhdmerge.s <br /> <br />diskpart &ndash;s vhdmerge.s <br /> <br />copy /y c:\temp.vhd.orig c:\temp.vhd <br /> <br />bcdedit &ndash;default GUID <br /> <br />copy /y discard.bat winpe.bat <br /> <br /></span>Where GUID is the differencing VHD GUID you noted in Step 4. Save the file and close Notepad. </li>
<li>Again from: P:\windows\system32\ run: <br /><span face="Lucida Console" style="font-family: 'Lucida Console';"> <br />copy discard.bat winpe.bat</span> </li>
<li>Create a new bat file on c:\windows\system32 called commit.bat. In it add the following lines: <br /><span face="Lucida Console" style="font-family: 'Lucida Console';"> <br />echo select vdisk file=D:\winpe.vhd &gt; winpe.s <br /> <br />echo attach vdisk &gt;&gt; winpe.s </span><span face="Lucida Console" style="font-family: 'Lucida Console';"><span style="background-color: #ffff00;"> <br /> <br /></span>diskpart &ndash;s winpe.s <br /> <br />ping 127.0.0.1</span><span face="Lucida Console" style="font-family: 'Lucida Console';"> <br /> <br />copy /y p:\windows\system32\commit.bat p:\windows\system32\winpe.bat <br /> <br /></span>Where D: is the drive where your VHD is stored. Save the file. </li>
<li>From the command prompt execute the following command: <br /> <br />bcdedit &ndash;default GUID <br /> <br />Where GUID is the WinPE GUID you noted in Step 4.</li>
</ol>
<p>That&rsquo;s it! You can proceed to configure Windows 7 <strong>exactly</strong> the way you want to appear in your initial &ldquo;SteadyState&rdquo; (even Windows Activation will work between sessions). Each time you restart WinPE will run and discard all the changes by resetting the differencing VHD and then reboot to Windows 7.</p>
<p>If you want to commit the changes you have made then you need to run: c:\windows\system32\commit.bat (of course as a local administrator!) and the changes will stay as WinPE will merge the differencing VHD to its parent after the first reboot.</p>
<p>Below is a flow chart detailing the procedure:</p>
<p align="center"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/1256.Drawing2_49F001E5.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-86-89-metablogapi/1256.Drawing2_5F00_49F001E5.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Drawing2" border="0" alt="Drawing2" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/86/89/metablogapi/7024.Drawing2_thumb_1496C9B3.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-86-89-metablogapi/7024.Drawing2_5F00_thumb_5F00_1496C9B3.jpg" width="519" height="282" /></a></p>
<p>In a next blog post I will outline how you can automate this procedure by using MDT 2010 (<a href="https://technet.microsoft.com/en-us/solutionaccelerators/dd407791" target="_blank">Microsoft Deployment Toolkit</a>) and <a href="https://www.autoitscript.com/autoit3/index.shtml" target="_blank">AutoIT</a> scripts.</p>
<p>Feel free to provide feedback on ways to improve this implementation either by contacting me or by commenting below.</p>
<p>Thanks,</p>
<p>Panos Macheras <br />Infrastructure Consultant</p>]]></content:encoded>
    </item>
  </channel>
</rss>