Preparing the build lab

Một phần của tài liệu Tài liệu cài đặt và cấu hình Windows Server 2012 (Trang 57 - 76)

1. Correct answer: D

A. Incorrect: The msinfo32 .exe utility is useful for performing a manual assessment of existing Windows Server installations .

B. Incorrect: The Get-WindowsFeature cmdlet is useful for performing a manual assessment of existing Windows Server installations .

C. Incorrect: The Application Compatibility Toolkit is useful for assessing the compatibility of existing software with different Windows platforms .

D. Correct: The Windows Server Catalog identifies system and peripheral hardware from different vendors that has been certified for Windows Server 2012.

2. Correct answer: B

A. Incorrect: During Phase 2: Gather Requirements, the toolkit uses various collection protocols to communicate with devices on your network to collect data to use in performing the various assessments . Because the communications performed by these protocols are subject to the administration and security settings of your envi- ronment, you must gather the user accounts and passwords needed to connect and successfully inventory the devices in your environment prior to running the toolkit .

B. Correct: During Phase 3: Prepare Environment, the toolkit uses several different communication protocols based on your goals and how the environment is configured. These include WMI, Active Directory Domain Services, SQL Server commands, VMware Web services, and SSH with remote shell commands . During this phase, you will prepare your environment to ensure that the toolkit can successfully connect and gather information from the target machines in your environment

C. Incorrect: During Phase 4: Install Toolkit, you download and install the toolkit using the options that best suit your environment and goals .

D. Incorrect: During Phase 5: Collect Data, you launch the MAP Toolkit console and select wizards to begin the data-collection process for your environment . 3. Correct answer: C

A. Incorrect: The Assessment Results section of the Readiness Assessment proposal document summarizes your organization’s Windows Server 2012 readiness, and it provides a detailed analysis and recommendations about the servers, operating systems, and server roles inventoried .

B. Incorrect: The Summary worksheet of the Assessment Summary workbook displays the number of physical servers and virtual machines inventoried, servers running earlier versions of Windows Server, servers running Hyper-V, and servers meeting the minimum system requirements for installing Windows Server 2012 . C. Correct: The ServerAssessment worksheet of the Assessment Summary workbook

displays the Windows Server 2012 system requirements used in performing the assessment along with any other requirements you specified for the assessment.

D. Incorrect: The ServerRolesSummary worksheet of the Assessment Summary workbook summarizes the server roles currently deployed in your environment;

the operating system or systems, number of physical servers, and number of virtual machines each role is running on; and any recommendations concerning the migration of these roles to Windows Server 2012 .

C H A P T E R 2

Deploying servers

Whether you administer a small business with a server room in the back office or a data center for a large enterprise, deploying servers is a key part of your job . Although installing a handful of servers can still be done manually, provisioning hundreds or thousands of server workloads in a virtualized data center is an entirely different affair .

Previous versions of Microsoft Windows Server offered a Server Core installation option with a reduced servicing footprint that made it ideal for enterprise deployment, but smaller organizations often opted for the GUI option because it was easier to configure after instal- lation . With Windows Server 2012 now supporting post-installation conversion between Server Core and GUI, however, Server Core has now become the default installation option for organizations of all sizes .

A key step in the process of planning for server provisioning is setting up a build lab where you can build and maintain the reference images you will be deploying in your production environment . In addition to including Windows Server 2012, such images can also include applications, software updates, and device drivers needed to ensure a successful install . Microsoft provides tools, some of them free, that organizations can use for implementing deployment strategies that can meet their needs .

This chapter provides you with the basic knowledge you will need to perform your job by deploying servers running Windows Server 2012 using the tools and best practices recommended by Microsoft .

Lessons in this chapter:

■ Lesson 1: Installation options 38

■ Lesson 2: Preparing the build lab 47

■ Lesson 3: Building images 54

■ Lesson 4: Deploying images 67

Before you begin

To complete the practice exercises in this chapter

■ You need Windows Server 2012 installation media, either in the form of an .iso file (if you will be performing the practice exercises using virtual machines running on a Hyper-V host) or bootable DVD media (if you will be performing the practice exercises using physical systems) .

■ You should have a server system available for testing purposes that meets the minimum hardware requirements for installing Windows Server 2012 . The server system should have no operating system installed, and it can be either a physical system or a virtual machine running on a Hyper-V host . The network where the server resides should have Internet connectivity .

■ You also should have at least rudimentary knowledge of using Windows PowerShell on earlier versions of Windows Server .

Lesson 1: Installation options

Choosing which installation option to deploy is an important consideration when planning the deployment of your servers . Windows Server 2012 includes new capabilities for post- installation conversion between the Server Core and Server With A GUI installation options . The platform also includes a new Minimal Server Interface option that can provide several benefits for some scenarios. And a new capability called Features On Demand allows admin- istrators to completely remove the installation binaries for roles and features that won’t be needed for their servers . This lesson describes these various capabilities and how to perform the conversion task .

After this lesson, you will be able to

■ Understand the different installation options and their possible benefits.

■ Understand the new Minimal Server Interface option .

■ Use Server Manager or Windows PowerShell to convert between installation options on a running Windows Server 2012 installation .

■ Use Windows PowerShell to convert between installation options on an offline virtual hard disk (VHD) of a virtual machine on which Windows Server 2012 has been installed .

■ Understand the new Features On Demand capability and its possible benefits.

Estimated lesson time: 20 minutes

Understanding installation options

Administrators of smaller Windows Server environments in the past have traditionally relied heavily on GUI-based tools for administering servers because of the ease of use of such tools . Scripting might occasionally have been used for some repetitive tasks, such as performing a bulk creation of user accounts in Active Directory, but most server management was done through the GUI in one of the following ways:

■ By logging on interactively to a server’s console

■ By logging on remotely to a server using Remote Desktop Connection (Mstsc .exe)

■ By using the Remote Server Administration Tools (RSAT) installed on a workstation With the shift toward centralizing IT infrastructure within data centers and cloud

computing, however, most midsized and large organizations now prefer to try automating as much Windows Server administration as possible using scripting . With the enhanced Windows PowerShell support in Windows Server 2012, such automation has now become much easier .

Choosing an installation option

The default installation option when you install Windows Server 2012 is now the Server Core Installation option instead of the Server With A GUI (formerly called Full) option as in previous versions of Windows Server . The reasons for this change are as follows:

■ Server Core requires less disk space than Server With A GUI, which can be important in data centers that use virtualization to consolidate multiple virtualized server workloads per physical host machine .

■ Server Core has a smaller attack surface, which makes it more secure for data-center and cloud computing .

■ Server Core requires fewer software updates, which means less servicing overhead .

■ Administrators can now switch between different installation options after Windows Server 2012 has been deployed, which means you can now change your Server Core installations to Server With A GUI installations without having to wipe and reinstall . What this means is that administrators should always install the Server Core option when deploying Windows Server 2012 unless you have a compelling reason for installing the Server With A GUI option instead .

Managing servers in small environments

Administrators in small environments that have only a few servers can still take advantage of all the benefits that come from running the Server Core installa- tion even if they don’t feel confident working from the command line. They can do this by following these steps:

1. Install Windows Server 2012 on the servers using the Server With A GUI installation option.

2. Perform all initial configuration of the server using the GUI tools available in this installation option.

3. Run the Uninstall-WindowsFeature Server-Gui-Mgmt-Infra –Restart Windows PowerShell command to convert the servers’ Server With A GUI installation to a Server Core installation as described later in this lesson.

4. Install the Remote Server Administration Tools (RSAT) for Microsoft Windows 8 on a client computer, and use these convenient GUI tools for managing the servers.

This procedure makes it easy for such administrators to configure their servers while still allowing them to take advantage of the smaller attack surface, servicing overhead, and disk-space requirements of the Server Core option.

Minimal server interface

In addition to the two installation options (Server Core and Server With A GUI) you can choose from when you deploy Windows Server 2012, there is also a third installation option available in Windows Server 2012 called the Minimal Server Interface . This new installation option can be configured only after deployment by using either Server Manager or Windows PowerShell . It has all the functionality of Server With A GUI except for the following

capabilities, which are not included:

■ Desktop user interface (traditional Windows desktop)

■ Windows 8 user interface (Start screen)

■ Windows Explorer

■ Internet Explorer

■ Some of the Control Panel utilities

The Minimal Server Interface installation has a smaller servicing footprint than the Server With A GUI installation, but administrators can still use it to run local GUI management tools for administering a server .

Converting between installation options

You can use either Windows PowerShell or, in some cases, the new Server Manager console included in Windows Server 2012 to convert between different installation options . For example, to use Server Manager to convert between a Server With A GUI installation and a Minimal Server Interface installation, you would launch the Remote Roles And Features Wizard and remove the Server Graphical Shell feature that you see selected in Figure 2-1 .

FIGURE 2-1 Converting a Server With A GUI installation to a Minimal Server Interface installation . As Figure 2-1 shows, Server With A GUI installations of Windows Server 2012 have two additional features installed that are not installed on Server Core installations:

Graphical Management Tools And Infrastructure This feature includes various infrastructure components and components that provide the Minimal Server Interface that supports GUI management tools, such as MMC consoles, but it does not include Windows Explorer, Internet Explorer, or the start screen . The Windows PowerShell name for this feature is Server-Gui-Mgmt-Infra .

Server Graphical Shell This feature includes components that provide the full graphical user interface, such as Windows Explorer, Internet Explorer, and the start screen . The Windows PowerShell name for this feature is Server-Gui-Shell . In addition, a feature called Desktop Experience optionally can be installed to provide Windows 8 features such as desktop themes, photo management, and Windows Media Player . The Windows PowerShell name for this feature is Desktop-Experience .

Using Windows PowerShell

In most cases, administrators will want to use Windows PowerShell to convert between the different installation options, especially if they are managing remote servers in a data center or Infrastructure as a Service (IaaS) cloud environment . The two Windows PowerShell cmdlets used for converting between different installation options of Windows Server 2012 are the following:

Install-WindowsFeature This cmdlet can be used generally to install one or more roles, role services, or features . The cmdlet also supersedes the older cmdlet Add- WindowsFeature that was used in previous versions of Windows Server, but Add-WindowsFeature still remains as an alias for the newer cmdlet .

Uninstall-WindowsFeature This cmdlet can be used generally to remove one or more roles, role services, or features . The cmdlet also supersedes the older cmdlet Remove-WindowsFeature that was used in previous versions of Windows Server, but Remove-WindowsFeature still remains as an alias for the newer cmdlet .

Both of the preceding cmdlets can be used for installing or uninstalling features to either of the following:

■ Running installations of Windows Server 2012

■ Offline virtual hard disks (VHDs) on which Windows Server 2012 has been installed Note that to install a particular feature on a Windows installation or offline VHD, the feature binaries first must be available for installation. Most feature binaries are available locally in the side-by-side store (%windir%\winsxs folder) on installations of Windows Vista and later . Note, however, that when you perform a clean install of Windows Server 2012 using the Server Core installation option, the feature binaries for the Graphical Management Tools And Infrastructure feature and Server Graphical Shell feature are not staged in the local side- by-side store of a Server Core installation . This means that if you want to install these features on a Server Core installation, you must specify an alternate location for their binaries—for example, a mounted .wim file of a Windows Server 2012 installation of the same service pack level . Alternatively, you can allow the feature binaries to be downloaded and installed from Windows Update, although this can take some time with larger feature binaries . These two methods for obtaining feature binaries that are not available in the local side-by-side store are demonstrated in one of the practice exercises in this chapter .

MORE INFO WHAT DOES “STAGED” MEAN?

When you want to service a Windows installation by adding or removing a feature, the package containing the binaries for installing that feature can be in one of three states:

Installed The package has been installed and is present in the WinSxS folder.

Staged The package has not been installed but is present in the WinSxS folder.

Absent The package is not installed and is not present in the WinSxS folder. This state is also sometimes referred to as “disabled with payload removed.”

Packages that are not present in the WinSxS folder can still be installed in Windows Server 2012 if you use the –Source parameter for the Install-WindowsFeature cmdlet to specify a mounted .wim file—or you can omit the –Source parameter and allow the package needed to be downloaded from Windows Update. The new Features On Demand capability in Windows Server 2012 and described later in this lesson also allows administrators to re- move packages from the WinSxS folder, something that could not be done on installations of previous versions of Windows.

Converting Server Core to Server With A GUI

To use Windows PowerShell to convert a Server Core installation of Windows Server 2012 to a Server With A GUI installation, run the following command:

Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell -Restart -Source C:\mountdir\windows\winsxs

The path C:\mountdir\windows\winsxs for the –Source parameter in the preceding command specifies a mounted Server With A GUI image in the install.wim file in the \sources folder of your Windows Server 2012 installation media .

Alternatively, you could allow the necessary feature binaries to be downloaded and installed from Windows Update by omitting the –Source parameter as follows:

Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell -Restart

Note that if you previously converted a Server With A GUI installation to Server Core and did not remove the binaries for these features, the binaries will remain staged in the WinSxS folder and therefore do not need to be downloaded from Windows Update .

Converting Server Core to Minimal Server Interface

To use Windows PowerShell to convert a Server Core installation of Windows Server 2012 to a Minimal Server Interface installation, use this command:

Install-WindowsFeature Server-Gui-Mgmt-Infra-Restart -Source C:\mountdir\windows\winsxs

The explanation of the –Source parameter is the same as previously noted . To download and install the feature binaries from Windows Update instead of a locally mounted .wim image, use this command:

Install-WindowsFeature Server-Gui-Mgmt-Infra -Restart

Converting Server With A GUI to Server Core

To use Windows PowerShell to convert a Server With A GUI installation of Windows Server 2012 to a Server Core installation, run the following command:

Uninstall-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell -Restart

Converting Server With A GUI to Minimal Server Interface

To use Windows PowerShell to convert a Server With A GUI installation of Windows Server 2012 to a Minimal Server Interface installation, use this command:

Uninstall-WindowsFeature Server-Gui-Mgmt-Infra -Restart

Quick check

What action does the Windows PowerShell command Install-WindowsFeature Server-Gui-Mgmt-Infra –Restart perform when it is run on a Server Core installation of Windows Server 2012?

Quick check answer

It converts the server to a Minimal Server Interface installation by downloading the necessary feature binaries from Windows Update.

Converting between installation options in offline VHDs

To convert an offline VHD in which a Server Core installation of Windows Server 2012 has been installed, run Install-WindowsFeature with the –Source parameter as shown previously but also include the –vhd parameter to specify the path to the .vhd file. For example, con- sider a virtual machine named SERVER6 whose system drive is a VHD located in the following folder on the Hyper-V host:

C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\SERVER6.vhdx

If the virtual machine is offline (stopped), you can convert the Windows Server 2012 installation on the VHD from Server Core to Server With A GUI by performing the following steps:

1. Create a new folder named C:\mountdir on your Hyper-V host . You will use this folder to mount the install.wim file on your Windows Server 2012 installation media so that the Install-WindowsFeature cmdlet can obtain the necessary feature binaries from the WinSxS folder of a Server With A GUI image in the .wim file.

2. Insert your Windows Server 2012 installation media into the DVD drive (assumed to be the D: drive) on your Hyper-V host .

3. Open a command prompt on your Hyper-V host and type dism /get-wiminfo /wimfile:D:\sources\install.wim to display the index numbers of the Windows Server 2012 images in the .wim file. Make a note of the image of a Server With A GUI image that is from the same edition as your Server Core installation . For example, if you in- stalled the SERVERDATACENTERCORE image on your server, note the index number of the SERVERDATACENTER image in the .wim file.

4. Mount the .wim file by typing dism /mount-wim /wimfile:D:\sources\install.wim /Index:<n> /mountdir:C:\mountdir /readonly at an elevated command prompt, where <n> is the previously noted image number .

5. Open the Windows PowerShell console, and run the following command:

Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell -Restart -vhd “ C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\SERVER6.vhdx”

-Source c:\mountdir\windows\winsxs

6. Start the virtual machine using Hyper-V Manager, open it using Virtual Machine Connection, and confirm that is now running a Server With A GUI installation of Windows Server 2012 .

Features on demand

Beginning with Windows Server 2012, you can completely remove the installation binaries for features from the side-by-side store (WinSxS folder) of a running Windows installation or an offline VHD on which Windows has been installed . Administrators might consider doing this on some installations for the following reasons:

■ To further reduce the disk footprint of the installation

■ To enhance the security of the installation by removing binaries for features that will not be needed

To completely remove the binaries of a feature, use the Uninstall-WindowsFeature cmdlet with the –Remove parameter . For example, if you convert a Server With A GUI installation to a Server Core installation, the binaries for the Server-Gui-Mgmt-Infra and Server-Gui-Shell features remain staged in the side-by-side store . If you decide that you will not be reinstalling those features, you can remove their binaries by running the following Windows PowerShell command:

Uninstall-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell -Remove

Note that if you remove the binaries for a feature, you can still reinstall the feature later (and stage the binaries in the side-by-side store again) by using the Install-WindowsFeature cmdlet and either using Windows Update for downloading the binaries or specifying a mounted .wim file using the –Source parameter as described previously .

Lesson summary

■ The Server Core installation is now the default installation option for Windows Server 2012 .

■ You can use Server Manager to convert a Server With A GUI installation to a Server Core or Minimal Server Interface installation .

■ You can use the Install-WindowsFeature and Uninstall-WindowsFeature Windows PowerShell cmdlets to convert between different installation options on a running installation of Windows Server 2012 .

Một phần của tài liệu Tài liệu cài đặt và cấu hình Windows Server 2012 (Trang 57 - 76)

Tải bản đầy đủ (PDF)

(640 trang)