{"id":4717,"date":"2012-11-06T00:01:00","date_gmt":"2012-11-06T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2012\/11\/06\/the-32-hour-upgrade-to-windows-server-2012\/"},"modified":"2012-11-06T00:01:00","modified_gmt":"2012-11-06T00:01:00","slug":"the-32-hour-upgrade-to-windows-server-2012","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/the-32-hour-upgrade-to-windows-server-2012\/","title":{"rendered":"The 32-hour Upgrade to Windows Server 2012"},"content":{"rendered":"<p><strong>Summary: <\/strong>Microsoft Scripting Guy, Ed Wilson, describes the long weekend he took to upgrade his servers to Windows Server&nbsp;2012 including lessons learned.\nMicrosoft Scripting Guy, Ed Wilson, is here. Well, I was told this past weekend was really nice down here in Charlotte, North Carolina, in the United States. With no aftermath of hurricane Sandy, we were lucky. I decided to go ahead and take the plunge to upgrade my six servers to Windows Server&nbsp;2012. I figured it would be a relatively simple matter&mdash;previous operating system upgrades had gone flawlessly. My only concern was for one of my older servers that was running Windows Server&nbsp;2008&nbsp;R2 Hyper-V because I know the new Hyper-V in Windows Server&nbsp;2012 relies on a new memory model. The one older server I was not certain would upgrade to Hyper-V &hellip; AND I needed that server.<\/p>\n<h2>Devising the plan<\/h2>\n<p>I have one old 32-bit server that still earns its living running Windows Server&nbsp;2008, and, so obviously, I cannot upgrade it. I can upgrade it to Windows PowerShell&nbsp;3.0, and I will do that later.\nI have three Hyper-V machines&mdash;all of which are loaded down with virtual machines. Some of the virtual machines are already running Windows Server&nbsp;2012, and others are running Windows Server&nbsp;2008&nbsp;R2 (as well as various client operating systems). These form a major part of my network, and they will need special attention.\nI have one server that runs Windows Server&nbsp;2008&nbsp;R2 and Windows Deployment Services, as well as System Center Virtual Machine Manager. I plan to remove these roles and upgrade them to new versions of those features. Once the roles are removed, I will upgrade it. Oh, yeah, it also hands out DHCP for a couple of different networks, but I am not worried about that upgrade.\nI have one server running Windows Server&nbsp;2008&nbsp;R2, SQL Server&nbsp;2008&nbsp;R2, and SharePoint&nbsp;2010. I need to add in service packs for SQL Server and SharePoint&nbsp;2010 as well as apply the SharePoint 2010 all in one rollup from August 2012. I am very concerned about this upgrade because I do not spend a lot of time doing SharePoint admin work.\nAll of the servers are headless. All of the servers have Windows PowerShell&nbsp;2.0 installed and WINRM enabled. They are all full versions of the operating system (no Windows Core Edition running right now), and, therefore, RDP is also configured. I used RDP to launch Setup on the servers. To be safe, I rounded up a crash cart with a monitor, keyboard, and mouse. I was tempted to write a Windows PowerShell script and launch Setup on all of the servers by using an Unattend file, but I did not want to end up with a totally non-functioning network, so I decided to monitor things more closely. The one big disadvantage I have at home is that every single server on the network is a different make, model, and mixture of hardware components. It is not like the days when I worked for a Microsoft Solutions Provider Partner and purchased industry standard servers for the house at great discounts.<\/p>\n<h2>Plan of action<\/h2>\n<p>After considering the role and the importance of the specific servers on my network, I decided to perform the upgrade in the following manner:<\/p>\n<ol>\n<li>Upgrade the Windows Deployment Services server.<\/li>\n<li>Upgrade the three Hyper-V servers.<\/li>\n<li>Upgrade the SharePoint&nbsp;2010 server.<\/li>\n<\/ol>\n<h2>The first upgrade was easy<\/h2>\n<p>The Windows Deployment Services server was the easy one. I removed the WDS role and the associated virtualization manager software, ran Windows Update to ensure I had the latest Windows Server&nbsp;2008&nbsp;R2 bits, and then I put in the CD-ROM to upgrade to Windows Server&nbsp;2012. During the installation, it asked to go online to update Setup bits, I said OK. The upgrade itself took nearly an hour, and once it came out of the final reboot, I logged back on to the domain, and ran Windows Update for Windows Server&nbsp;2012. After an additional 15 minutes to download and to install the 160&nbsp;MB patch, everything worked.<\/p>\n<h2>The second upgrade introduces the first problem<\/h2>\n<p>It is time to upgrade my first server running Hyper-V. Because of the importance of this server, I took a portable USB drive, attached it to the server running Hyper-V, and exported all of the virtual machines to the device. This way, I thought, the virtual machines would be safe in the event of disaster. It was painfully slow to export the virtual machines &hellip; on the order of hours.<\/p>\n<p style=\"padding-left: 30px\"><strong>Note<\/strong> &nbsp;&nbsp;If your virtual machines have snapshots, the snapshots are lost when you upgrade to Windows Server&nbsp;2012. This is due to an incompatibility of formats.\nAfter I exported all of the virtual machines, I ran Setup to begin the upgrade. After an hour, I still could not ping the server. I decided it was time to bring the crash cart into play. I hooked up the monitor, keyboard, and mouse and, sure enough, the upgraded halted. The message said that it could not continue and suggested a reboot. I did, and selected <em>continue upgrad<\/em>e from the boot menu. That did not work. Nor did it work the subsequent three times I chose the <em>continue upgrad<\/em>e action. Finally, I selected <em>rollback to Windows Server&nbsp;2008&nbsp;R2<\/em>. That took some time, but it worked perfectly. So, my first server running Hyper-V did not make the cut.<\/p>\n<h2>The third upgrade introduces a new problem<\/h2>\n<p>So, now, I come to the third upgrade&mdash;my second server running Hyper-V. Once again, I exported all of the virtual machines to my portable USB drive and started the upgrade. About an hour later, I could not contact the server. I decided to move the crash cart to the machine and saw that Windows Server&nbsp;2012 was running with no problems. Well, there was one problem, the network adapter did not detect properly, and, therefore, I had no network connectivity.\nI thought I remembered the hardware in the server, and went online to get the latest drivers. They did not work. I shut down the server, popped the hood, and got out a flashlight to read the numbers from the motherboard. I went back on line, and, while I was at it, downloaded a new bios update as well as the specified network driver from the web site. I flashed the BIOS, and following the reboot, attempted to install the network card driver&mdash;no go. I rebooted again, rolled back the driver, and entered the BIOS to double check settings &hellip; everything said it was fine.I went back to the web site, and downloaded other network card drivers, but they did not work either.\nFollowing a cup of tea, I decided to try one last thing&mdash;I went into the computer manager tool, and selected a network card driver that was very close to the same model number as my errant network card. Luckily, it worked. I now have one server running Hyper-V. I imported the virtual machines, started them up, and moved to the next server.<\/p>\n<h2>The fourth upgrade worked with no problems at all<\/h2>\n<p>So, my last server running Hyper-V&mdash;the one I had been afraid of&mdash;worked with no problems. I exported the virtual machines to the portable USB drive, upgraded to Windows Server&nbsp;2012, imported the virtual machines back, and started the virtual machines.<\/p>\n<h2>The last upgrade was also no problem<\/h2>\n<p>Upgrading my server running SharePoint&nbsp;2010 to Windows Server&nbsp;2012 also proved to be no problem. While I was at it, I applied a SQL Server Pack and the updates to SharePoint&nbsp;2010. I did this prior to upgrading to Windows Server&nbsp;2012 because I know that sometimes we introduce capabilities in Service Packs to permit running on newer operating systems. This upgrade was straight forward.<\/p>\n<h2>Lessons learned<\/h2>\n<p>After spending two days shuttling DVDs and stuff, I wish I had done the following:<\/p>\n<ol>\n<li>Install Windows PowerShell&nbsp;3.0 on the servers prior to attempting the upgrade. This would permit me to use Windows PowerShell Workflow, which would be ideal for this type of upgrade situation. I can easily script the installation of Windows PowerShell&nbsp;3.0 because I have Windows PowerShell&nbsp;2.0 installed on my servers, and I have Windows PowerShell remoting enabled as well.<\/li>\n<li>Virtual machines are WAY easier to manage than physical servers. I will talk about upgrading my virtual machines later, but one of the nice things about them is they all have standard hardware. Especially with Hyper-V running on Windows Server&nbsp;2012, and the very sophisticated Hyper-V cmdlets, this is a piece of cake.<\/li>\n<li>I could have scripted the export and import of the virtual machines on my servers running Windows Server&nbsp;2008&nbsp;R2 with Hyper-V by using the <a href=\"http:\/\/pshyperv.codeplex.com\/\" target=\"_blank\">Hyper-V module from CodePlex<\/a>. This free module has an <strong>Export-VM<\/strong> cmdlet as well as a <strong>Remove-VMSnapshot<\/strong> cmdlet. With three servers running Hyper-V to deal with, this tool could have saved me a lot of time. I could have run these commands as jobs against the remote servers and saved a lot of waiting.<\/li>\n<li>Once the servers running Hyper-V are upgraded to Windows Server&nbsp;2012, I need to add the Hyper-V role because it is not installed by default. This is as simple as typing the following command.<\/li>\n<\/ol>\n<p style=\"padding-left: 60px\">Get-WindowsFeature hyper-v-powershell | Add-WindowsFeature<\/p>\n<p style=\"padding-left: 60px\">Because I am installing the feature on two servers, I use the following three commands:<\/p>\n<p style=\"padding-left: 60px\">$session = New-PSSession -cn hyperv2,hyperv3 -cred iammredadministrator<\/p>\n<p style=\"padding-left: 60px\">Invoke-Command -Session $session {Get-WindowsFeature hyper-v-powershell | Add-WindowsFeature}<\/p>\n<p style=\"padding-left: 60px\">Invoke-Command -Session $session {Get-WindowsFeature hyper-v-powershell} | select pscomputername, name, installed\nNow that I have the Hyper-V role installed on my two servers, I can do additional cleanup work. I will talk about that tomorrow.\nI invite you to follow me on <a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\">Twitter<\/a> and <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\" target=\"_blank\">Facebook<\/a>. If you have any questions, send email to me at <a href=\"http:\/\/blogs.technet.commailto:scripter@microsoft.com\" target=\"_blank\">scripter@microsoft.com<\/a>, or post your questions on the <a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.\n<strong>Ed Wilson, Microsoft Scripting Guy<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Microsoft Scripting Guy, Ed Wilson, describes the long weekend he took to upgrade his servers to Windows Server&nbsp;2012 including lessons learned. Microsoft Scripting Guy, Ed Wilson, is here. Well, I was told this past weekend was really nice down here in Charlotte, North Carolina, in the United States. With no aftermath of hurricane Sandy, [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[31,3,4,45],"class_list":["post-4717","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-operating-system","tag-scripting-guy","tag-scripting-techniques","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Microsoft Scripting Guy, Ed Wilson, describes the long weekend he took to upgrade his servers to Windows Server&nbsp;2012 including lessons learned. Microsoft Scripting Guy, Ed Wilson, is here. Well, I was told this past weekend was really nice down here in Charlotte, North Carolina, in the United States. With no aftermath of hurricane Sandy, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/4717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=4717"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/4717\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=4717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=4717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=4717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}