This commit is contained in:
Greg Lindsay
2016-09-07 10:09:59 -07:00
parent 93d5448f52
commit 1a56af26da
2 changed files with 81 additions and 36 deletions

View File

@ -21,6 +21,8 @@ The PoC environment is a virtual network running on Hyper-V with three virtual m
- **SRV1**: A dual-homed contoso.com domain member server, DNS server, and default gateway providing NAT service for the PoC network.
- **PC1**: A contoso.com member computer running Windows 7, Windows 8, or Windows 8.1 that has been cloned from a physical computer on your corporate network for testing purposes.
This guide leverages the Hyper-V server role to perform procedures. If you do not complete all steps in a single session, consider using [checkpoints](https://technet.microsoft.com/library/dn818483.aspx) and [saved states](https://technet.microsoft.com/library/ee247418.aspx) to pause, resume, or restart your work.
## In this guide
Yadda yadda
@ -245,7 +247,7 @@ This procedure will demonstrate how to deploy the reference image to the PoC env
copy-item "C:\Program Files\Microsoft Deployment Toolkit\Templates\Bootstrap.ini" C:\MDTProd\Control\Bootstrap.ini -Force
copy-item "C:\Program Files\Microsoft Deployment Toolkit\Templates\CustomSettings.ini" C:\MDTProd\Control\CustomSettings.ini -Force
```
2. In the Deployment Workbench console on SRV1, right-click the MDT Production deployment share and then click Properties.
2. In the Deployment Workbench console on SRV1, right-click the **MDT Production** deployment share and then click Properties.
3. Click the **Rules** tab and replace the rules with the following text:
@ -258,7 +260,7 @@ This procedure will demonstrate how to deploy the reference image to the PoC env
OSInstall=YES
UserDataLocation=AUTO
TimeZoneName=Pacific Standard Time
OSDComputerName=PC_#Left("%SerialNumber%",5)#
OSDComputerName=%hostname%
AdminPassword=pass@word1
JoinDomain=contoso.com
DomainAdmin=administrator
@ -272,7 +274,7 @@ This procedure will demonstrate how to deploy the reference image to the PoC env
SkipAppsOnUpgrade=NO
SkipAdminPassword=YES
SkipProductKey=YES
SkipComputerName=NO
SkipComputerName=YES
SkipDomainMembership=YES
SkipUserData=YES
SkipLocaleSelection=YES
@ -283,10 +285,11 @@ This procedure will demonstrate how to deploy the reference image to the PoC env
SkipSummary=YES
SkipCapture=YES
SkipFinalSummary=NO
EventService=http://SRV1:9800
```
**Note**: The contents of the Rules tab are added to c:\MDTProd\Control\CustomSettings.ini.
**Important**: In this example a **MachineObjectOU** entry is not provided. Normally this entry describes the specific OU where new client computer objects are created in Active Directory. However, for the purposes of this test lab clients are added to the default computers OU, which requires that this parameter be unspecified. Similarly, the default domain administrator account is being used as a user account. These parameters and some other settings would be different in an actual production deployment.
>In this example a **MachineObjectOU** entry is not provided. Normally this entry describes the specific OU where new client computer objects are created in Active Directory. However, for the purposes of this test lab clients are added to the default computers OU, which requires that this parameter be unspecified.
4. Click **Edit Bootstap.ini** and replace text in the file with the following text:
```
@ -304,7 +307,7 @@ This procedure will demonstrate how to deploy the reference image to the PoC env
### Update the deployment share
1. Right-click the MDT Production deployment share and then click Update Deployment Share.
1. Right-click the **MDT Production** deployment share and then click Update Deployment Share.
2. Use the default options for the Update Deployment Share Wizard. The update process requires 5 to 10 minutes to complete.
@ -316,6 +319,10 @@ This procedure will demonstrate how to deploy the reference image to the PoC env
2. On the **Monitoring** tab, select the **Enable monitoring for this deployment share** checkbox, and then click **OK**.
3. Verify the monitoring service is working as expected by opening the following link in Internet Explorer: [http://localhost:9800/MDTMonitorEvent/](http://localhost:9800/MDTMonitorEvent/). If you do not see "**You have created a service**" at the top of the page, see [Troubleshooting MDT 2012 Monitoring](https://blogs.technet.microsoft.com/mniehaus/2012/05/10/troubleshooting-mdt-2012-monitoring/).
4. Close Internet Explorer.
### Configure Windows Deployment Services
1. Initialize Windows Deployment Services (WDS) by typing the following command at an elevated Windows PowerShell prompt:
@ -372,12 +379,57 @@ This procedure will demonstrate how to deploy the reference image to the PoC env
This topic will demonstrate how to export user data from an existing client computer, wipe the computer, install a new operating system, and then restore user data and settings. The scenario will use PC1, a computer that was cloned from a physical device to a VM, as described in [Step by step guide: Deploy Windows 10 in a test lab](windows-10-poc.md).
1. Sign on to PC1 using the CONTOSO\Administrator account, open an elevated command prompt, and type the following command:
1. Create a checkpoint for the PC1 VM so that it can easily be reverted to its current state for troubleshooting purposes and to perform additional scenarios. Checkpoints are also known as snapshots. To create a checkpoint for the PC1 VM, type the following command at an elevated Windows PowerShell prompt on the Hyper-V host:
```
Checkpoint-VM -Name PC1 -SnapshotName BeginState
```
2. Sign on to PC1 using the CONTOSO\Administrator account.
>Specify **contoso\administrator** as the user name to ensure you do not sign on using the local administrator account. You must sign in with this account so that you have access to the deployment share.
3. Open an elevated command prompt on PC1 and type the following command:
```
\\SRV1\MDTProd$\Scripts\Litetouch.vbs
cscript \\SRV1\MDTProd$\Scripts\Litetouch.vbs
```
2.
**Note**: Litetouch.vbs must be able to create the C:\MININT directory on the local computer.
4. Choose the **Windows 10 Enterprise x64 Custom Image** and then click **Next**.
5. Click **Next** to accept the default for **Computer name**. <--- delete this step
6. Choose **Do not back up the existing computer** and click **Next**.
**Note**: The USMT will still back up the computer.
7. Lite Touch Installation will perform the following actions:
- Back up user settings and data using USMT.
- Install the Windows 10 Enterprise X64 operating system.
- Update the operating system via Windows Update.
- Restore user settings and data using USMT.
You can review the progress of installation on SRV1 by clicking on the **Monitoring** node in the deployment workbench. When OS installation is complete, the computer will restart, set up devices, and configure settings.
8. Sign in with the CONTOSO\Administrator account and verify that user accounts and data have been migrated to the new operating system.
9. Create another checkpoint for the PC1 VM so that you can review results of the computer refresh later. To create a checkpoint, type the following command at an elevated Windows PowerShell prompt on the Hyper-V host:
```
Checkpoint-VM -Name PC1 -SnapshotName RefreshState
```
10. Restore the PC1 VM to it's previous state in preparation for the replace procedure. To restore a checkpoint, type the following command at an elevated Windows PowerShell prompt on the Hyper-V host:
```
Restore-VMSnapshot -VM PC1 -Name BeginState
```
### Replace a computer with Windows 10
1. Type the following commands at an elevated Windows PowerShell prompt on SRV1:
```
New-Item -Path C:\MigData -ItemType directory
New-SmbShare ?Name MigData$ ?Path C:\MigData
```
## Related Topics

View File

@ -227,18 +227,15 @@ The lab architecture is summarized in the following diagram:
**Important**:Before you convert a PC to VHD, verify that you have access to a local administrator account on the computer. Alternatively you can use a domain account with administrative rights if these credentials are cached on the computer and your domain policy allows the use of cached credentials for login.
>For purposes of the test lab, you must use a PC with a single hard drive that is assigned a drive letter of C:. Systems with multiple hard drives or non-standard configurations can also be upgraded using PC refresh and replace scenarios, but these systems require more advanced deployment task sequences than those used in this lab.
1. Download the [Disk2vhd utility](https://technet.microsoft.com/en-us/library/ee656415.aspx), extract the .zip file and copy disk2vhd.exe to a flash drive or other location that is accessible from the computer you wish to convert.
>Note: You might experience timeouts if you attempt to run Disk2vhd from a network share, or specify a network share for the destination. To avoid timeouts, use local, portable media.
2. On the computer you wish to convert, double-click the disk2vhd utility to start the graphical user interface.
3. Select checkboxes next to the volumes you wish to copy and specify a location to save the resulting VHD or VHDX file. If your Hyper-V host is running Windows Server 2008 R2 you must choose VHD, otherwise choose VHDX.
4. Click **Create** to start creating a VHDX file. See the following example:
4. Click **Create** to start creating a VHDX file.
![disk2vhd](images/convert.png)
In this example, the source computer has two hard drives, C: and E: and a system reserved partition. The VHDX file (w7.vhdx) is being saved to a flash drive (F:) in the F:\VHD directory.<BR>
>Disk2vhd can also save VHDs to local hard drives, even if they are the same as the volumes being converted. Performance is better however when the VHD is saved on a disk different than those being converted.
>If you have experience with Microsoft Virtual Machine Converter and prefer to use this tool instead of Disk2vhd, see [Appendix B: Microsoft Virtual Machine Converter](#appendix-b-microsoft-virtual-machine-converter).
>Disk2vhd can save VHDs to local hard drives, even if they are the same as the volumes being converted. Performance is better however when the VHD is saved on a disk different than those being converted, such as a flash drive.
5. When the Disk2vhd utility has completed converting the source computer to a VHD, copy the VHDX file (w7.vhdx) to your Hyper-V host in the C:\VHD directory. There should now be four files in this directory:
@ -275,7 +272,7 @@ Note: The Hyper-V Windows PowerShell module is not available on Windows Server 2
(Get-Counter -Counter @("\Memory\Available MBytes")).countersamples.cookedvalue/4
2775.5
```
In this example, VMs must use a maximum of 2700 MB of RAM so that you can run four VMs simultaneously.
In this example, VMs can use a maximum of 2700 MB of RAM each, to run four VMs simultaneously.
4. At the elevated Windows PowerShell prompt, type the following command to create three new VMs. The fourth VM will be added later.
>**Important**: Replace the value of 2700MB in the first command below with the RAM value that you calculated in the previous step:
@ -408,10 +405,10 @@ Note: The Hyper-V Windows PowerShell module is not available on Windows Server 2
Add-Computer -DomainName contoso -Credential $cred
Restart-Computer
```
>PC1 is removed from its domain in this step while not connected to the corporate network so as to ensure the computer object in the corporate domain is unaffected. We have not also renamed PC1 to "PC1" here so that it maintains some of its mirrored identity. However, if desired you can also rename the computer.
>PC1 is removed from its domain in this step while not connected to the corporate network so as to ensure the computer object in the corporate domain is unaffected. We have not also renamed PC1 to "PC1" in system properties so that it maintains some of its mirrored identity. However, if desired you can also rename the computer.
18. After PC1 restarts, sign in to the contoso.com domain with the (user1) account you created in step 8.
19. Minimize the PC1 window but do not turn it off while the second Windows Server 2012 R2 VM (SRV1) is configured. This ensures that the Hyper-V host has enough resources to run all VMs simultaneously. Next, SRV1 will be started, joined to the contoso.com domain, and configured with RRAS and DNS services.
19. Minimize the PC1 window but do not turn it off while the second Windows Server 2012 R2 VM (SRV1) is configured. This verifies that the Hyper-V host has enough resources to run all VMs simultaneously. Next, SRV1 will be started, joined to the contoso.com domain, and configured with RRAS and DNS services.
20. On the Hyper-V host computer at an elevated Windows PowerShell prompt, type the following commands:
```
Start-VM SRV1
@ -442,17 +439,17 @@ Note: The Hyper-V Windows PowerShell module is not available on Windows Server 2
```
>The previous commands assume that network interfaces were added to the SRV1 VM in the order specified by this guide, resulting in an interface alias of "Ethernet" for the private interface and an interface alias of "Ethernet 2" for the public interface. If the interfaces on SRV1 are not named the same, you must adjust these commands appropriately.
To view a list of interfaces and their associated interface aliases on the VM, you use the Get-NetAdapter cmdlet. See the following example:
To view a list of interfaces and their associated interface aliases on the VM, use the following Windows PowerShell command:
```
Get-NetAdapter
Get-NetAdapter | ? status -eq up | Get-NetIPAddress -AddressFamily IPv4 | ft IPAddress, InterfaceAlias
Name InterfaceDescription ifIndex Status MacAddress LinkSpeed
---- -------------------- ------- ------ ---------- ---------
Ethernet 2 Microsoft Hyper-V Network Adapter #2 14 Up 00-15-5D-83-26-06 1 Gbps
Ethernet Microsoft Hyper-V Network Adapter 12 Up 00-15-5D-83-26-05 10 Gbps
IPAddress InterfaceAlias
--------- --------------
10.137.130.118 Ethernet 2
192.168.0.2 Ethernet
```
24. The DNS server role was installed on SRV1 so that we can forward DNS queries from DC1 to SRV1 to resolve Internet names without having to configure a forwarder outside the PoC network. To add this server-level DNS forwarder on DC1, type the following command at an elevated command prompt on DC1:
24. The DNS server role was installed on SRV1 so that we can forward DNS queries from DC1 to SRV1 to resolve Internet names without having to configure a forwarder outside the PoC network. To add this server-level DNS forwarder on DC1, type the following command at an elevated Windows PowerShell prompt on DC1:
```
Add-DnsServerForwarder -IPAddress 192.168.0.2
```
@ -473,16 +470,11 @@ Note: The Hyper-V Windows PowerShell module is not available on Windows Server 2
## Appendix A: Configuring Hyper-V on Windows Server 2008 R2
If your Hyper-V host is running Windows Server 2008 R2, you can use the Hyper-V manager interface to configure Hyper-V, or you can use Hyper-V WMI. Some instructions to configure Hyper-V using WMI are also included in this section for convenience.
If your Hyper-V host is running Windows Server 2008 R2, several of the steps in this guide will not work because they use the Hyper-V Module for Windows PowerShell, which is not available on Windows Server 2008 R2.
For more information about the Hyper-V Manager interface in Windows Server 2008 R2, see [Hyper-V](https://technet.microsoft.com/library/cc730764.aspx) in the Windows Server TechNet Library.
To manage Hyper-V on Windows Server 2008 R2, you can use Hyper-V WMI, or you can use the Hyper-V Manager console.
To install Hyper-V on Windows Server 2008 R2, use the Add-WindowsFeature cmdlet:
```
Add-WindowsFeature -Name Hyper-V
```
Use the following Windows PowerShell commands to create a virtual switch on Windows Server 2008 R2:
An example that uses Hyper-V WMI to create a virtual switch on Windows Server 2008 R2 is provided below. Converting all Hyper-V module commands used in this guide to Hyper-V WMI is beyond the scope of the guide. If you must use a Hyper-V host running Windows Server 2008 R2, the steps in the guide can also be accomplished by using the Hyper-V Manager console.
```
$SwitchFriendlyName = "poc-internal"
@ -506,12 +498,13 @@ $Result = $VirtualSwitchManagementService.ConnectSwitchPort($InternalSwitchPort,
$filter = "SettingID='" + $InternalEthernetPort.DeviceID +"'"
$NetworkAdapterConfiguration = gwmi Win32_NetworkAdapterConfiguration -filter $filter
```
Use the following Windows PowerShell commands to add VMs on Windows Server 2008 R2:
To install Hyper-V on Windows Server 2008 R2, you can use the Add-WindowsFeature cmdlet:
```
command here
Add-WindowsFeature -Name Hyper-V
```
For more information about the Hyper-V Manager interface in Windows Server 2008 R2, see [Hyper-V](https://technet.microsoft.com/library/cc730764.aspx) in the Windows Server TechNet Library.
## Appendix B: Verify the configuration
Use the following procedures to verify that the PoC environment is configured properly and working as expected.