labmanual hyper v

Upload: vijayprabhu1983

Post on 03-Jun-2018

236 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 Labmanual Hyper V

    1/31

    Implementing Hyper-V

    Lab Exercises

    FINAL

    Released: 6 August 2008

  • 8/12/2019 Labmanual Hyper V

    2/31

    Disclaimer - Terms of Use

    Microsoft Confidential - For Internal Use Only

    2008 Microsoft Corporation. All rights reserved.

    Information in this document, including URL and other Internet Web site references, is subject to

    change without notice. Unless otherwise noted, the companies, organizations, products, domain

    names, e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no

    association with any real company, organization, product, domain name, e-mail address, logo,

    person, place, or event is intended or should be inferred. Complying with all applicable copyright

    laws is the responsibility of the user. Without limiting the rights under copyright, no part of this

    document may be reproduced, stored in or introduced into a retrieval system, or transmitted in

    any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for

    any purpose, without the express written permission of Microsoft Corporation.

    For more information, see Use of Microsoft Copyrighted Contentat

    http://www.microsoft.com/about/legal/permissions/

    Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectualproperty rights covering subject matter in this document. Except as expressly provided in any

    written license agreement from Microsoft, the furnishing of this document does not give you any

    license to these patents, trademarks, copyrights, or other intellectual property.

    The Microsoft company name and Microsoft products mentioned herein may be either registered

    trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

    The names of actual companies and products mentioned herein may be the trademarks of their

    respective owners.

    This document reflects current views and assumptions as of the date of development and is

    subject to change. Actual and future results and trends may differ materially from any

    forward-looking statements. Microsoft assumes no responsibility for errors or omissions inthe materials.

    THIS DOCUMENT IS FOR INFORMATIONAL AND TRAINING PURPOSES ONLY AND IS

    PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED,

    INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY,

    FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.

    http://www.microsoft.com/about/legal/permissions/http://www.microsoft.com/about/legal/permissions/http://www.microsoft.com/about/legal/permissions/
  • 8/12/2019 Labmanual Hyper V

    3/31

    Table of Contents

    About This Lab ........................................................................................................................................ 1

    Hyper-V Lab Exercises ............................................................................................................................ 2

    The Lab Environment ............................................................................................................................. 3Network Layout .............................................................................................................................................. 3

    Computer Names and IP Addresses ............................................................................................................... 3

    Accounts and Group Membership ................................................................................................................. 4

    Domain Membership ..................................................................................................................................... 4

    Lab: Implementing Hyper-V ................................................................................................................... 5

    Exercise 1: Install Windows Server 2008 Hyper-V .............................................................................................. 6

    Exercise 2: Configure Windows Server 2008 Hyper-V ........................................................................................ 8

    Exercise 3: Creating and Managing Virtual Machines ...................................................................................... 11Exercise 4: Install Operating System in a Virtual Machine ............................................................................... 12

    Exercise 5: Install Integration Services ............................................................................................................. 14

    Exercise 6: Configure iSCSI For a Pass-through Disk ......................................................................................... 15

    Exercise 7: Install Windows Server 2008 on a Pass-through Disk .................................................................... 17

    Exercise 8: Hyper-V Management Pack............................................................................................................ 19

    Exercise 9: Exploring Hyper-V with PowerShell ................................................................................................ 21

    Exercise 10: Hyper-V Snapshots ....................................................................................................................... 25

    Exercise 11: Export and Import Virtual Machines ........................................................................................... 27

  • 8/12/2019 Labmanual Hyper V

    4/31

  • 8/12/2019 Labmanual Hyper V

    5/31

    FINAL Lab Exercises - About This Lab

    Microsoft Confidential - For Internal Use Only 1

    About This LabThis Lab Manual describes the environment required to perform practice exercises in this

    course and lab sessions included in this manual.

    Practice exercises are performed on physical and virtual machines on two computers perparticipant. To complete the exercises, your computer hardware and software must be

    configured as described in the Classroom Setup Guide that accompanies this course.

    Critical:Lab sessions that accompany this course may use a preconfigured virtual machine

    environment. If you start or modify VMs in any way prior to use in lab exercises, exercise

    tasks and steps will not work as intended. DO NOT start or modify any VM until

    instructed to do so in the lab exercises.

    What You Will Learn

    After completing the lab sessions in this course you will be able to:Install Windows Server 2008 Hyper-V.

    Configure Windows Server 2008 Hyper-V.

    Create and manage Hyper-V virtual machines.

    Install operating systems as Hyper-V virtual machines.

    Use Hyper-V Snapshots.

    Configure and use iSCSI and Pass-through disks.

    Install an operating system as a virtual machine using a pass-through disk.

    Use the Hyper-V Management Pack.

    Configure Hyper-V using Windows PowerShell.

  • 8/12/2019 Labmanual Hyper V

    6/31

    Implementing Hyper-V FINAL

    2 2008 Microsoft Corporation. All rights reserved.

    Hyper-V Lab ExercisesThis manual provides the steps to perform the following lab exercises:

    Exercise 1: Install Windows Server 2008 Hyper-V

    In this exercise, you will install Hyper-V on a server running a Full installation ofWindows Server 2008 and a server running a Server Core installation of Windows Server

    2008.

    Exercise 2: Configure Windows Server 2008 Hyper-V

    In this exercise, you will perform various configuration tasks using the Hyper-V Manager

    on Windows Server 2008.

    Exercise 3: Creating and Managing Virtual Machines

    In this exercise, you will use the Hyper-V Manager in Windows Server 2008 to create and

    manage a virtual machine.

    Exercise 4: Install Operating System in a Virtual MachineIn this exercise, you will install Windows Server 2008 64-bit edition in a virtual machine

    and create a Windows Vista SP1 virtual machine using an existing virtual hard disk (.vhd).

    Exercise 5: Install Integration Services

    In this exercise, you will install the Hyper-V Integration Services in a Windows Vista SP1

    virtual machine.

    Exercise 6: iSCSI and Pass-through Disks

    In this exercise, you will configure the CORE-01 server to connect to an iSCSI device on

    ADMIN-01.

    Exercise7: Install Windows Server 2008 on Pass-through DiskIn this exercise, you will create a new virtual machine and install Windows Server 2008

    using a pass-through disk.

    Exercise 8: Hyper-V Management Pack

    In this exercise, you will use a pre-configured Windows Vista virtual machine to explore

    the Hyper-V Management pack.

    Exercise 9: Exploring Hyper-V with PowerShell

    In this exercise, you will use Windows PowerShell to explore Windows Server 2008

    Hyper-V and manipulate virtual machines.

    Exercise 10: Hyper-V Snapshots

    In this exercise, you will create a snapshot and then revert to that snapshot to undo a

    change in a VM.

    Exercise 11: Export and Import Virtual Machines

    In this exercise, you will export a virtual machine from one Hyper-V server and import it

    to another Hyper-V server.

  • 8/12/2019 Labmanual Hyper V

    7/31

    FINAL Lab Exercises - The Lab Environment

    Microsoft Confidential - For Internal Use Only 3

    The Lab EnvironmentTo complete this lab, you will need the hardware and software configuration described in

    the Classroom Setup Guide that accompanies this course.

    Network LayoutThe following figure illustrates the lab network configuration for each student. The lab

    network must be isolated from production networks.

    Figure 1. Network Layout

    Computer Names and IP Addresses

    The following table provides the computer configuration for the classroom lab network.

    Table 1. Lab Computer Names and IP Addresses

    Computer Name IP Address Preferred DNS Server Role

    ADMIN-01 192.168.0.1 192.168.0.1 Domain Controller

    CORE-01 192.168.0.2 192.168.0.1 Member Server

  • 8/12/2019 Labmanual Hyper V

    8/31

    Implementing Hyper-V FINAL

    4 2008 Microsoft Corporation. All rights reserved.

    Accounts and Group Membership

    Important:You must log on as an administrative user in order to perform all of the tasks in this lab.

    The following user accounts and passwords must be configured on the physical computer

    and in all virtual machines:

    Administrativeusername and password

    Username: Administrator Password: LS1setup!

    Member of: Local Administrators and Domain Administrators

    Domain Membership

    Your physical computers should already be joined to a domain.

    Lab exercises may require you to join the following virtual domain(s):

    contoso.com

  • 8/12/2019 Labmanual Hyper V

    9/31

    FINAL Lab Exercises - Lab: Implementing Hyper-V

    Microsoft Confidential - For Internal Use Only 5

    Lab: Implementing Hyper-VIn the following exercises, you will install Microsoft Hyper-V, create, configure, and install

    virtual machines that will run in Microsoft Hyper-V, and use a variety of management

    tools to configure and manage Hyper-V servers both locally and remotely.

    Estimated time to complete this lab: X hours

    Before You Begin

    Before starting this lab:

    Verify the lab environment:

    o

    2 computers with Windows Server 2008 Enterprise 64-bit edition.

    o 1 of the computers should be a Server Core installation.

    o Both computers should be connected with a crossover network cable.

    o

    Each computer should have a C:\Labfiles and a C:\Scripts folder that isshared.

    What You Will Learn

    After completing this lab you will be able to create and manage virtual machines in

    Hyper-V.

    After completing all of the exercises you will be able to:

    Install Windows Server 2008 Hyper-V Role

    Configure Windows Server 2008 Hyper-V

    Create and manage Hyper-V virtual machines

    Create a virtual machine that uses a Pass-through disk.

    Take snapshots of virtual machines

    Manage Hyper-V using Windows PowerShell

    Manage Hyper-V using the Hyper-V Management Pack

  • 8/12/2019 Labmanual Hyper V

    10/31

    Implementing Hyper-V FINAL

    6 2008 Microsoft Corporation. All rights reserved.

    Exercise 1: Install Windows Server 2008 Hyper-V

    In this exercise, you will install Hyper-V on a server running a Full installation of

    Windows Server 2008 and a server running a Server Core installation of Windows Server

    2008.

    Scenario

    The goal of this exercise is to install and configure Windows Server 2008 Hyper-V to

    prepare your server for creation of virtual machines.

    Tasks

    1.

    Upgrade Hyper-V to RTM.

    a.

    Start theADMIN-01and CORE-01physical machines and logon as

    contoso\administrator.

    b. On theADMIN-01 server, open the folder C:\Labfiles\Hyper-V

    RTM\KB950050and execute Windows6.0-KB950050-x64.msu.

    c.

    Click OKwhen prompted to install KB950050.

    d.

    RestartADMIN-01 when prompted.

    e.

    On the CORE-01server, open the folder C:\Labfiles\Hyper-V

    RTM\KB950050and execute Windows6.0-KB950050-x64.msu from

    the command prompt.

    f. Click OKwhen prompted to install KB950050.

    g. Restart CORE-01when prompted.

    2.

    Install Windows Hyper-V on ADMIN-01 and CORE-01.

    a.

    Start theADMIN-01and CORE-01physical machines and logon as

    contoso\administrator.

    b. Server Manager should start automatically on Admin-01. After Server

    Manager has refreshed, right-click on Rolesand selectAdd Roles.

    c. Click Nextand then under Select one or more roles to install on this

    server, check Hyper-Vand then click Next.

    d.

    Click Next on the Introduction to Hyper-Vscreen, and again click Next

    on the Create Virtual Networksscreen.

    e.

    Confirm the installation options and then click Install. Click Closein the

    Installation Resultsscreen and then Yesto restart the server when

    prompted.

  • 8/12/2019 Labmanual Hyper V

    11/31

    FINAL Lab Exercises - Lab: Implementing Hyper-V

    Microsoft Confidential - For Internal Use Only 7

    f.

    On the CORE-01physical machine, make sure that the command prompt

    is open and execute start /w ocsetup Microsoft-Hyper-Vto install

    Hyper-V.

    g. Click Noon the Windows Package Managerdialog that is displayed to

    restart the server when prompted.

    h.

    At the command prompt on CORE-01, type bcdedit /set

    hypervisorlaunchtype autoand then press Enter.

    i. Restart the physical machine CORE-01by executing the command

    shutdown /r /t 0.

    j. After restart, logon to bothADMIN-01and CORE-01as

    contoso\administratorto complete the Hyper-V installation process.

  • 8/12/2019 Labmanual Hyper V

    12/31

    Implementing Hyper-V FINAL

    8 2008 Microsoft Corporation. All rights reserved.

    Exercise 2: Configure Windows Server 2008 Hyper-V

    In this exercise, you will perform various initial configuration tasks using the Hyper-V

    Manager on Windows Server 2008.

    Scenario

    You have just installed Windows Server 2008 Hyper-V on a new host computer and you

    are planning to begin creating virtual machines to migrate workloads. You will begin by

    configuring management tools, creating virtual networks, and a virtual hard disk. You will

    also configure global defaults for Windows Server 2008 Hyper-V.

    Tasks

    1. Open the Windows Hyper-V Manager Console and connect to remote Hyper-

    V server.

    a. Ensure you are logged on to yourADMIN-01and your CORE-01

    computers using the username Contoso\Administratorand the

    password LS1setup!.

    b. On the Startmenu, point toAdministrative Tools, and then click Hyper-

    V Manager.

    c. Leave the Hyper-V Manager console open for the remainder of this

    exercise.

    d.

    Connect to the local computer,ADMIN-01, and accept the End User

    License Agreement.e. Right-click on Microsoft Hyper-V Serversand then click Connect to

    server. SelectAnother Computerand then enter CORE-01in the text

    box.

    f.

    When Hyper-V Manager connects to Core-01, the End User License

    Agreement should again be displayed. Accept the EULA and you should

    have access to Core-01 in the Hyper-V Manager running on Admin-01.

    2.

    Configure Virtualization Settings

    a. In Hyper-V Manager, clickADMIN-01, and then in theActionspane, click

    Hyper-V Server Settings.

    b.

    In the Hyper-V Settingsdialog box, click Virtual Hard Disks.

    c.

    In Specify the default folder to store virtual hard disk files, type

    C:\LabFiles\VHDand then clickApply.

    d. In the Hyper-V Settingsdialog box, click Virtual Machines.

  • 8/12/2019 Labmanual Hyper V

    13/31

    FINAL Lab Exercises - Lab: Implementing Hyper-V

    Microsoft Confidential - For Internal Use Only 9

    e.

    In the Specify the default folder to store virtual machine

    configuration files, type C:\LabFiles\VMand then click OK.

    f. Repeat the previous steps under Task 2 and configure CORE-01with the

    same settings asADMIN-01.

    3.

    Create a Private Virtual Network Switch

    a. In Hyper-V Manager, clickADMIN-01and then in theActions pane, click

    Virtual Network Manager.

    b.

    In the Virtual Network Managerdialog box, under Create virtual

    network, click Private, and then clickAdd.

    c. Name the new network Guest Only Networking, and under Connection

    Typemake sure Private virtual machine networkis selected. Click OK.

    d. Repeat the previous steps under Task 3 and configure CORE-01with the

    same settings asADMIN-01.

    4.

    Create an External Virtual Network Switch

    IMPORTANT: Do not create an external network on the Core-01

    server during this exercise.

    a.

    In Hyper-V Manager, clickADMIN-01and then in theActions pane, click

    Virtual Network Manager.

    b. In the Virtual Network Managerdialog box, under Create virtual

    network, click External, and then clickAdd.

    c. Name the new network External, and under Connection Typemake sure

    Externalis selected. Select the network card installed in the host machineand then clickApply.

    d. Click Yeson theApply Networking Changeswarning dialog.

    Important:Once the external switch is created, if the host network card can no longer be connected

    to the network. Restore network connectivity on ADMIN-01, run

    C:\scripts\restorenet.cmd from a command prompt and then re-check all of the network

    card bindings for the Local Area Connection by using the Network Control Panel. Do not

    create an external network on CORE-01.

    Due to differences in hardware, restorenet.cmd may not restore network connectivity.

    You may need to edit the file and change the Local Area Connection 3 to Local AreaConnection # where # matches the interface on your machine. On most machines that

    have one network card, Hyper-V will create Local Area Connection 3 and so

    restorenet.cmd attempts to set the IP address of this interface.

  • 8/12/2019 Labmanual Hyper V

    14/31

    Implementing Hyper-V FINAL

    10 2008 Microsoft Corporation. All rights reserved.

    5.

    Create a New Virtual Hard Disk

    a.

    In Hyper-V Manager, clickADMIN-01, in theActionspane, click New,

    and then click Hard Disk.

    b. Click Nexton the New Virtual Hard Disk Wizardscreen.

    c.

    Select Dynamically expandingand then click Next.

    d. Name the disk V_Server1_IDE01.vhd, make sure the Location specifies

    C:\Labfiles\VHD, and then click Finish.

    e.

    Repeat the previous steps under Task 5 and configure CORE-01with the

    same settings asADMIN-01.

    6. Expand the Virtual Hard Disk.

    a.

    In Hyper-V Manager, clickADMIN-01, and then in theActionspane, click

    Edit Disk.

    b.

    In the Edit Virtual Hard Disk Wizard, click Next.

    c. On the Locate Virtual Hard Diskpage, click Browse.

    d. In the Opendialog box, click V_Server1_IDE01and then click Open.

    e. On the Locate Virtual Hard Diskpage, click Next.

    f. On the Choose Actionpage, click Expand, and then click Next.

    g.

    On the Expand Virtual Hard Diskpage, in New size, type 200, and then

    click Next.

    h.

    Click Finishto close the Edit Virtual Hard Disk Wizard.

  • 8/12/2019 Labmanual Hyper V

    15/31

    FINAL Lab Exercises - Lab: Implementing Hyper-V

    Microsoft Confidential - For Internal Use Only 11

    Exercise 3: Creating and Managing Virtual Machines

    In this exercise, you will use the Hyper-V Manager in Windows Server 2008 to create and

    manage a virtual machine.

    Scenario

    You will begin by using the New Virtual Machine Wizard to create a new virtual machine

    on the Hyper-V Server that is running Server Core that uses the virtual network switch

    and virtual hard disk you created in the previous exercise. You will then install the

    Windows Server 2008 64-bit operating system as a virtual machine and interact with that

    Virtual Machine.

    Tasks

    1. Create a New Virtual Machine

    a. Ensure you are logged on toADMIN-01as Contoso\Administratorusing

    the password LS1setup!, and that you have Hyper-V Manageropen.

    b.

    In Hyper-V Manager, click CORE-01, in theActionspane, click New, and

    then click Virtual Machine.

    c. Click Nexton the first screen of the New Virtual Machine Wizard.

    d. Name the new virtual machine V_Server1and the click Next.

    e. Enter 512MBin the Memory box and then click Next.

    f. Select Guest Only Networkingin the connection box and then click Next.

    g. Click the radio buttonAttach a virtual hard disk laterand then click Next.

    h. Review the configuration and make sure Start the virtual machine after it

    is createdis unchecked and then click Finish.

    2.

    Add a Hard Drive to the Virtual Machine

    a.

    In Hyper-V Manager, click CORE-01, and then in Virtual Machines, click

    V_Server1, and then in theActionspane, click Settings.

    b. In the Settings for V_Server1 dialog box, click IDE Controller 0.

    c. In IDE Controller, click Disk Drive, and then clickAdd.

    d. In Media, click Browse, type c:\LabFiles\VHD\V_Server1_IDE01.vhd,

    and then click Open.

    e.

    Click OK to close the V_Server1 Settingsdialog box.

  • 8/12/2019 Labmanual Hyper V

    16/31

    Implementing Hyper-V FINAL

    12 2008 Microsoft Corporation. All rights reserved.

    Exercise 4: Install Operating System in a Virtual

    Machine

    In this exercise, you will install an operating system in a virtual machine using a .ISO fileand you will also create a virtual machine using an existing virtual hard disk (.vhd).

    Scenario

    A .ISO image of the Windows Server 2008 DVD-ROM and a pre-installed Windows Vista

    SP1 virtual machine have been provided to use for this exercise.

    You will install Windows Server 2008 into a virtual machine and create a Windows Vista

    SP1 virtual machine using an existing virtual hard disk.

    Tasks

    1.

    Add the ISO image to the virtual machine DVD drive.

    a. In Hyper-V Manager, click CORE-01, and then in Virtual Machines, click

    V_Server1, and then in theActionspane, click Settings.

    b.

    Click DVD Driveunder IDE Controller 1and then click Image file:under

    Media.

    c. Click the Browse button and browse to C:\Labfiles\iso\.Click on

    ws08vl.isoand then click Open. Click OKon the Settings for V_Server1

    dialog.

    2.

    Start the Virtual Machine and Install Operating Systema.

    Click on the V_Server1virtual machine and then underActionsfor

    V_Server1, click Start.

    b. Once the V_Server1 is started, double-click on V_Server1to open the

    Virtual Machine Connection.

    c. Accept the default settings and start the installation of Windows Server

    2008. Select Enterprise Edition full installationwhen prompted and

    install to the virtual disk that was created in Exercise 2.

    Note:

    It may take several minutes to complete the installation of the Windows Server 2008 virtual

    machine. Continue with the lab while you are waiting for the installation to finish.

    3. Create a Windows Vista SP1 Virtual Machine.

    a. In Hyper-V Manager, click CORE-01, in theActionspane, click New, and

    then click Virtual Machine.

  • 8/12/2019 Labmanual Hyper V

    17/31

    FINAL Lab Exercises - Lab: Implementing Hyper-V

    Microsoft Confidential - For Internal Use Only 13

    b.

    A Windows Vista SP1 virtual machine has been pre-installed and the .vhd

    file is included in the C:\Labfiles\VHDfolder. Create a new virtual machine

    namedWindows Vista SP1 Enterpriseand make sure underConfigure

    Networkingthat theGuest Only Networknetwork is selected.

    c.

    On the Connect Virtual Hard Diskpage, select Use an existing virtual

    hard diskand then click Browse. Select V_Client1.vhdand then click

    Open. Click Finishto close the wizard.

    d. Repeat steps a con theAdmin-01 server.

    4.

    Explore configuration options for a virtual machine.

    a. In Hyper-V Manager on CORE-01, click on the Windows Vista SP1 Enterprise

    virtual machine and then in the Action pane, click Settings.

    b.

    Review the settings and note which items can be changed when the virtual

    machine is running and which items cannot. List the items that can be changedbelow:

    c. Answer:

    d.

    Shut down the Windows Vista SP1 Enterprisevirtual machine on CORE-01.

    e.

    In Hyper-V Manager on CORE-01, click on the Windows Vista SP1 Enterprise

    virtual machine and then in the Action pane, click Settings.

    f.

    Add an additional processor to the Windows Vista SP1 Enterprise virtual

    machine.

    g. Question/discussion: How many processors can you add to this virtual

    machine? Is this what you would expect based on the hardware you are

    running Hyper-V manager on?

    h.

    Answer:

  • 8/12/2019 Labmanual Hyper V

    18/31

    Implementing Hyper-V FINAL

    14 2008 Microsoft Corporation. All rights reserved.

    Exercise 5: Install Integration Services

    In this exercise, you will install the Hyper-V Integration Services in a Windows Vista SP1

    virtual machine.

    Scenario

    Completing the tasks in this exercise will allow you to use the network adapter that is

    installed with the Integration Services to connect to an external network as well as the

    parent partition from the virtual machine.

    Tasks

    1.

    Start the Windows Vista SP1 Enterprise Virtual Machine and install the

    Integration Services.

    a.

    In Hyper-V Manager on ADMIN-01, click to select theADMIN-01Hyper-Vserver in the navigation pane.

    b. Click to select the Windows Vista SP1 Enterprise virtual machine in the

    details pane.

    c.

    Start andConnect tothe Windows Vista SP1 Enterprisevirtual machine

    using the links in the Hyper-V Manager action pane. This will open the

    Virtual Machine Connection client application for the virtual machine.

    d. Logon to the Windows Vista SP1 Enterprise virtual machine using the local

    administrator account and the password LS1setup!.

    e.

    In the Virtual Machine Connection client application for the Windows VistaSP1 Enterprise virtual machine, click theActionmenu and then click the

    Insert Integration Services Setup Diskitem.

    f. In the Autoplay window that appears after inserting the Integration

    Services disk, click the Install Microsoft Hyper-V Integration

    Componentsoption.

    Tip:

    If the Autoplay window does not appear after inserting the Integration Services disk, use

    Explorer to browse to the CD drive in the Windows Vista SP1 virtual machine. Either

    double-click the CD drive to start the Integration Services installation or explorethe CD

    drive to the Support\x86 folder and click Setup.exe to start the installation.

    g. Restart the Windows Vista SP1 Enterprise virtual machine if prompted

    after installing the Integration Services.

  • 8/12/2019 Labmanual Hyper V

    19/31

    FINAL Lab Exercises - Lab: Implementing Hyper-V

    Microsoft Confidential - For Internal Use Only 15

    Exercise 6: Configure iSCSI For a Pass-through Disk

    In this exercise, you will configure the CORE-01 server to connect to an iSCSI device on

    ADMIN-01.

    Scenario

    The Server ADMIN-01 has a pre-configured iSCSI Target and Device that will simulate a

    iSCSI device on the network. You will manage this iSCSI device and create a disk that you

    can install a Hyper-V child partition to.

    Tasks

    1.

    Configure the firewall on ADMIN-01.

    a.

    Logon toADMIN-01as contoso\admininstratorand start a command

    prompt.b. Run the following command to add the wintarget.exe exception to the

    firewall on ADMIN-01:

    Netsh firewall add allowedprogramc:\windows\system32\wintarget.exe WinTarget ENABLE

    2.

    Configure the iSCSI Initiator on CORE-01.

    a.

    Logon to CORE-01as contoso\administrator.

    b.

    Use the command prompt to start the Microsoft iSCSI Initiatorservice and

    configure it to start automatically. Use the sc (service control) command

    line tool to configure the automatic startup by using the following

    command:

    sc config msiSCSI start= auto

    c.

    Start the msiSCSIservice by using the following command:

    Net start msiscsi

    d.

    Add the target portal on ADMIN-01 by typing the following command on

    CORE-01:

    iSCSIcli QAddTargetPortal 192.168.0.1

    e.

    List the available iSCSI targets using the following command:

    Iscsicli ListTargets

    f.

    Use the targets that were listed in the previous command to login to the

    target using the following command:

    Iscsicli QloginTarget iqn.1991-05.com.microsoft:admin-01-core-01-target

  • 8/12/2019 Labmanual Hyper V

    20/31

    Implementing Hyper-V FINAL

    16 2008 Microsoft Corporation. All rights reserved.

    Note:

    The commands you issue might be slightly different than the above. The key is to use the

    ListTargets command to list the target and then cut and paste the name from the

    command prompt into the QloginTarget and PersistentLoginTarget commands.

    g.

    To make the target persist after reboot, execute the following command:

    Important:In the following command there are 15 asterisks and a space between all of them. If the

    command is not entered exactly as shown it will fail.

    iSCSIcli PersistentLoginTarget iqn.1991-05.com.microsoft:admin-01-core-01-target T * * * * * * * * * * * * * * * 0

    h.

    Verify that the target is connected and persisted using the following

    commands:

    Iscsicli ListPersistentTargets

    Iscsicli ReportTargetMappings

    3.

    Use Diskpart to prepare the storage.

    a.

    On CORE-01, use the command prompt to start the diskpartutility by

    using the following command:

    Diskpart

    b. List the disks and note the disk number using the following command:

    List disk

    c.

    Disk 2 should be displayed as 78GB and offline. Use the following

    commands to online the disk, clear attributes, and then Offlinethe disk. The

    following shows the commands, one per line, and you should press enter

    after each command:

    select disk 2

    online disk

    attrib disk clear readonly

    offline disk

    d. Type Exitto leave diskpart.

  • 8/12/2019 Labmanual Hyper V

    21/31

  • 8/12/2019 Labmanual Hyper V

    22/31

    Implementing Hyper-V FINAL

    18 2008 Microsoft Corporation. All rights reserved.

    3.

    Start the Virtual Machine and Install Operating System

    a.

    After adding the hard drive to the virtual machine, click on the Windows

    Server 2008 Pass-throughvirtual machine and then underActions, click

    Start.

    b.

    Once the virtual machine is started, double-click on Windows Server 2008Pass-throughto open the Virtual Machine Connection.

    c.

    Accept the default settings and start the installation of Windows Server

    2008. Select Enterprise Edition full installationwhen prompted and

    complete the installation.

    d. After the installation is finished, shut down the Windows Server 2008 Pass-

    through virtual machine.

  • 8/12/2019 Labmanual Hyper V

    23/31

    FINAL Lab Exercises - Lab: Implementing Hyper-V

    Microsoft Confidential - For Internal Use Only 19

    Exercise 8: Hyper-V Management Pack

    In this exercise, you will use a pre-configured Windows Vista virtual machine to explore

    the Hyper-V Management pack and examine the effect of a failure in the Hyper-V Virtual

    Machine Management service.

    Scenario

    A Windows Vista SP1 32-bit virtual machine has been included in the C:\Labfiles folder of

    your physical machine. This virtual machine was created during Exercise 4 and will be

    used to connect back to the Hyper-V server using Hyper-V Manager.

    IMPORTANT: For this exercise, make sure you start and use the Windows Vista SP1

    Enterprise virtual machine on ADMIN-01, configure it to use an external network.

    Tasks

    1.

    Start and configure Windows Vista virtual machine

    a. In Hyper-V ManageronADMIN-01, double-click on the Windows Vista

    SP1 Enterprisevirtual machine and then click the Start button.

    b.

    Logon to the virtual machine using theAdministratoraccount and the

    password LS1setup!.

    c. Verify network connectivity and make sure the virtual machine has an

    operating network and the IP address is set to 192.168.0.100 and DNS

    server is set to 192.168.0.1.

    d.

    Add the Vista machine to the contoso.comdomain and reboot when

    prompted.

    e. After reboot, logon to the domain as contoso\administratorusing the

    password LS1setup!.

    2.

    Install and use Hyper-V Management Pack

    a.

    Connect to the share \\ADMIN-01\Labfilesand browse to the Hyper-V

    RTMfolder. Copy the folder KB952627to the desktop of the Vista Machine.

    b.

    Open the KB952627folder on the desktop and double-click onWindows6.0-KB952627-x86.msuto install the Hyper-V Management

    pack.

    c. After installation, click on the Start menu and search for Hyper-V. Select the

    Hyper-V Managerin the search results at the top of the Start menu.

  • 8/12/2019 Labmanual Hyper V

    24/31

    Implementing Hyper-V FINAL

    20 2008 Microsoft Corporation. All rights reserved.

    d.

    Once Hyper-V Manager is open, right-click on the Hyper-V Managericon

    and select Connect to server. SelectAnother computerand enterADMIN-

    01.

    e. Repeat the above step and connect to CORE-01.

    f.

    Verify that you can manage virtual machines on bothADMIN-01and CORE-01.

    3.

    Examine effect of Hyper-V Virtual Machine Management service failure.

    a.

    Open Hyper-V Manager onADMIN-01and make sure all of the virtual

    machines that are installed are started and running.

    b. OnADMIN-01, open Task Manager by pressing CTRL-ALT-DELETE. Note

    the number of vmwp.exe processes and record the result here:

    c. Open a Virtual Machine Connectionto each virtual machine that is

    running on ADMIN-01.

    d.

    OnADMIN-01, open Server Manager, expand Configuration, and then

    click on Services. In the middle pane, click on Hyper-V Virtual Machine

    Managementservice and then click on the Stopbutton to stop the service.

    e. Questions/Discussions: Are the virtual machines on ADMIN-01 still

    running? What (if anything) happened to the vmwp.exe processes on

    ADMIN-01 after the service was stopped? Hyper-V Manager on ADMIN-01

    should now be displaying a message The Virtual Machine Management

    Service is not available. What can you do to restore Hyper-V Manager

    functionality?

    f.

    Answers:

  • 8/12/2019 Labmanual Hyper V

    25/31

    FINAL Lab Exercises - Lab: Implementing Hyper-V

    Microsoft Confidential - For Internal Use Only 21

    Exercise 9: Exploring Hyper-V with PowerShell

    In this exercise, you will use Windows PowerShell to explore Windows Server 2008

    Hyper-V and manipulate virtual machines.

    Before You Begin

    Before starting this lab:

    Complete Exercises 1-8

    Configure | verify your lab environment:

    o Physical machines ADMIN-01 and CORE-01 with Hyper-V installed

    What You Will Learn

    After completing this exercise, you will be able to explore and manipulate a Hyper-V

    server and virtual machines using Windows PowerShell.

    After completing the exercises you will be able to:

    Enumerate available classes in the Hyper-V WMI namespace

    Start, Create a virtual machine, take a memory dump of a virtual machine and

    change settings in virtual machine using PowerShell and WMI.

    Scenario

    Windows Server 2008 Hyper-V is includes a full set of management and automation

    interfaces which are based on Windows Management Instrumentation (WMI). This allows

    administrators to create custom management tools and scripts using any platform that

    supports WMI, such as Windows Script Host, PowerShell, or .NET.

    Important:The following scripts should be run using the 32-bit version of PowerShell. Do not close

    PowerShell in between executing the commands in this lab or the environment will have

    to be reconfigured. This can be accomplished by repeating the steps in 4a, Prepare

    PowerShell to run scripts.

    Tip:

    Some of the following commands contain commands that must be enclosed in quotes, and

    virtual machine names that must be enclosed in single quotes. Please take note of this to make

    sure you enter the command correctly.

    Tasks

    1. Display available Windows Server 2008 Hyper-V WMI Objects.

    a. Ensure you are logged on toAdmin-01as Contoso\Administratorusing

    the password LS1setup!.

  • 8/12/2019 Labmanual Hyper V

    26/31

    Implementing Hyper-V FINAL

    22 2008 Microsoft Corporation. All rights reserved.

    b.

    If Server Manager is not already open onADMIN-01, open it and then

    expand Features. Right-click on Featuresand selectAdd Features.

    c. Select Windows PowerShellfrom the Select Featuresscreen and follow

    the wizard to install Windows PowerShell.

    d.

    On the Startmenu, point toAll Programs, click Windows PowerShell 1.0and then click Windows PowerShell.

    e.

    In Windows PowerShell, type the following command, and then press

    ENTER.

    Get-WMIObject namespace root\Virtualization computernamecore-01 list

    f. The results of this command should be a list of the WMI objects from the

    root\virtualization namespace.

    2.

    Explore Virtualization System Management Service

    a.

    In Windows PowerShell, type the following commands, pressing ENTER

    after each command. This series of commands will first store an instance of

    the Virtual System Management Service in an object. It will then display the

    current values of the object, and finally enumerate the available properties

    and methods.

    $VM = Get-WMIObject query Select * from MSVM_ComputerSystemwhere ElementName = V_Server1 namespace root\Virtualizationcomputername core-01

    $VM

    $VM | get-member

    b. When displaying the properties of the new $VM object, you should see the

    results of the query. The command was successful if _PATHdisplays

    \\CORE-01, ElementName = V_Server1,and PrimaryOwnerName =

    contoso\administrator.

    3.

    Explore Virtual Networks

    a. In Windows PowerShell, type the following commands, pressing ENTER

    after each command. This series of commands will first display details on all

    configured virtual network switches. It will then display the properties and

    methods available for working with virtual network switches.

    Get-WMIObject MSVM_VirtualSwitch namespace root\Virtualizationcomputername core-01

    Get-WMIObject MSVM_VirtualSwitch namespace root\Virtualizationcomputername core-01 | Get-Member

  • 8/12/2019 Labmanual Hyper V

    27/31

  • 8/12/2019 Labmanual Hyper V

    28/31

    Implementing Hyper-V FINAL

    24 2008 Microsoft Corporation. All rights reserved.

    d.

    Using Hyper-V Manager, verify that the startup order of the Windows

    Server 2008 Pass-throughvirtual machine is Legacy Network Adapter,

    IDE, CD, and then Floppy.

    6.

    Create a virtual machine

    a.

    Change to the C:\Labfiles\Scriptsfolder in PowerShell and execute thefollowing command to create a new virtual machine on CORE-01:

    create-vm core-01 NewScriptedVM

    b.

    Verify that a new virtual machine named NewScriptedVM was created on

    CORE-01.

    7. Create a memory dump of a virtual machine.

    a.

    If it is not already started, start the Windows Vista SP1 Enterprisevirtual

    machine on CORE-01.

    b.

    Execute the following command to manually force a memory dump of thevirtual machine:

    Dumpvm s core-01 v Windows Vista SP1 Enterprise

    c.

    If the Vista SP1 virtual machine does not blue screen with a Stop

    0x000000e2 exception, add a DWORD registry value named

    CrashOnCtrlScrollto the Vista SP1 machine and set it to 0x1. Add the value

    to HKLM\System\CurrentControlSet\Services\i8042prt\parameters.

    Reboot the Vista SP1 virtual machine and then try the script again.

  • 8/12/2019 Labmanual Hyper V

    29/31

    FINAL Lab Exercises - Lab: Implementing Hyper-V

    Microsoft Confidential - For Internal Use Only 25

    Exercise 10: Hyper-V Snapshots

    In this exercise, you will create snapshots and then apply snapshots to revert to a

    previous configuration (i.e. to undochanges to the virtual machine).

    Scenario

    A snapshot is a point-in-time picture of a virtual machines running state. Snapshots can

    be used to create checkpoints that allow you to quickly roll back a configuration change,

    or revert a VM to a previous state. Capturing snapshots is an important part of Hyper-V

    management and administration.

    Tasks

    1. Create a Virtual Machine Snapshot

    a. Make sure the V_Server1virtual machine is running on CORE-01. Click on

    V-Server1in Hyper-V Manager, and then on theActionmenu, click

    Snapshot.

    b.

    Click on the Snapshot that you just created above and then click Renamein

    Action menu. Rename the snapshot to First Snapshot No folder.

    c. Logon to the virtual machine V_Server1running on CORE-01using the

    administrator account and password. Create a new folder named New

    Folder 1on the desktop of the V_Server1virtual machine.

    d.

    Use Hyper-v Manager to take another snapshot of the V_Server1 virtual

    machine. Rename the snapshot to Second Snapshot Folder 1.

    e. Repeatsteps c and d two more times and create a third and fourth

    snapshot and a New Folder 2and New Folder 3on the desktop. Make sure

    to take a new snapshot after each folder is created.

    2.

    Restore the VM from a snapshot

    a.

    In Hyper-V Manager, under Snapshots, click Second Snapshot Folder 1,

    and then in theActionspane, clickApply.

    b. In theApply Snapshotdialog box, clickApply.

    Note:

    The green arrow that indicates the active snapshot should move from Fourth Snapshot to the

    Second Snapshot.

    c. Switch to V_Server1on CORE-01and logon to this virtual machine.

    d. Verify that there is only one folder on the desktop of the virtual machine

    named New Folder 1.

  • 8/12/2019 Labmanual Hyper V

    30/31

    Implementing Hyper-V FINAL

    26 2008 Microsoft Corporation. All rights reserved.

    e.

    In Hyper-V Manager, click V_Server1, and then under Snapshotsright-click

    on First Snapshot No folder, and then click Delete Snapshot Subtree.

    f. Click Deletein the Delete Snapshot Treedialog to confirm the deletion.

    g. Question/discussion: How many New Folders are on the desktop of the

    V_Server1 virtual machine after deleting the snapshot tree? Is thissomething you would expect?

    h.

    Answer:

    i. Close the V_Server1 on CORE-01Virtual Machine Connection window.

    j.

    In Hyper-V Manager, click V_Server1and then in theActionspane, click

    Shut Down.

    k.

    If a message is displayed about forcing the shutdown, click Forceto forcethe shutdown.

  • 8/12/2019 Labmanual Hyper V

    31/31