0% encontró este documento útil (0 votos)
78 vistas18 páginas

Clústeres de Conmutación por Error en Hyper-V

Este documento describe los pasos para configurar un clúster de conmutación por error con dos hosts Hyper-V virtualizados anidados (LON-NVHOST3 y LON-NVHOST4) para proporcionar alta disponibilidad a las máquinas virtuales. Incluye instrucciones para conectar los hosts al almacenamiento iSCSI compartido, instalar Hyper-V en los hosts anidados, configurar conmutadores de red virtuales y volúmenes de almacenamiento compartidos, e implementar el clúster de conmutación por error.

Cargado por

lucas
Derechos de autor
© © All Rights Reserved
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como TXT, PDF, TXT o lee en línea desde Scribd
0% encontró este documento útil (0 votos)
78 vistas18 páginas

Clústeres de Conmutación por Error en Hyper-V

Este documento describe los pasos para configurar un clúster de conmutación por error con dos hosts Hyper-V virtualizados anidados (LON-NVHOST3 y LON-NVHOST4) para proporcionar alta disponibilidad a las máquinas virtuales. Incluye instrucciones para conectar los hosts al almacenamiento iSCSI compartido, instalar Hyper-V en los hosts anidados, configurar conmutadores de red virtuales y volúmenes de almacenamiento compartidos, e implementar el clúster de conmutación por error.

Cargado por

lucas
Derechos de autor
© © All Rights Reserved
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como TXT, PDF, TXT o lee en línea desde Scribd

[20740C] M�dulo 09: Implementaci�n de cl�steres de conmutaci�n por error con

Windows Server 2016 Hyper-V


1. Laboratorio: Implementaci�n de cl�steres de conmutaci�n por error con Windows
Server 2016 Hyper-V
Gui�n:

La implementaci�n inicial de m�quinas virtuales en Hyper-V ha sido exitosa para


Adatum Corporation. Como siguiente paso en la implementaci�n de VM, Adatum est�
considerando formas de garantizar que los servicios y aplicaciones implementados en
las VM est�n altamente disponibles. Como parte de la implementaci�n de alta
disponibilidad para la mayor�a de los servicios y aplicaciones de red, Adatum
tambi�n est� considerando opciones para hacer que las m�quinas virtuales que se
ejecutan en Hyper-V tengan una alta disponibilidad.

Como uno de los administradores de red senior de Adatum, usted es responsable de


integrar Hyper-V con cl�steres de conmutaci�n por error para garantizar que las
m�quinas virtuales implementadas en Hyper-V est�n altamente disponibles. Usted es
responsable de planificar la configuraci�n de almacenamiento y la m�quina virtual,
y de implementar las m�quinas virtuales como servicios de alta disponibilidad en el
cl�ster de conmutaci�n por error. Tiene hardware limitado; por lo tanto, para
facilitar las pruebas antes de la implementaci�n en su entorno de producci�n,
habilitar� la virtualizaci�n anidada para probar la agrupaci�n en cl�steres de dos
hosts Hyper-V.

Siguiente ejercicio

2. Ejercicio 1: configuraci�n del entorno virtual


Tarea 1: configurar el host f�sico, las m�quinas virtuales y la virtualizaci�n
anidada

Inicie sesi�n en la m�quina virtual LON-HOST2 como Adatum \ Administrator con la


contrase�a Pa55w.rd . En LON-HOST2 , haga clic en Inicio y luego en Windows
PowerShell .

En la ventana de Windows PowerShell , escriba el siguiente comando y luego presione


Entrar:
Install-WindowsFeature -Name Hyper-V,Hyper-V-Tools,Hyper-V-PowerShell -Restart
Tu computadora se reiniciar� un par de veces. Aseg�rese de seleccionar 20740C-LON-
HOST2 en el men� de inicio cada vez que se reinicie.

Inicie sesi�n en LON-HOST2 como Adatum \ Administrator con la contrase�a Pa55w.rd .


Haga clic en Inicio , luego en Windows Powershell y luego ejecute el siguiente
comando:
New-VMSwitch -Name "Host Internal Network" -SwitchType Internal

Abra el Explorador de archivos y luego vaya a E: \ Archivos de programa \ Microsoft


Learning \ 20740 \ Drives. (Tenga en cuenta que la letra de la unidad puede variar
seg�n su m�quina host).

Ejecute las siguientes secuencias de comandos para crear los conmutadores


necesarios e importar las m�quinas virtuales que deben importarse para este
laboratorio:
CreateVirtualSwitches.ps1
LON-HOST2_VM-Pre-Import-20740C.ps1
Utilice la letra de unidad C para las im�genes base y D para las im�genes del
curso.

Abra el Administrador del servidor , haga clic en Herramientas y luego en


Administrador de Hyper-V .

En el panel izquierdo, seleccione LON-HOST2 .

En el panel Virtual Machines , seleccione 20740C-LON-NVHOST3.

En el men� Acciones , haga clic en Actualizar versi�n de configuraci�n y luego en


Actualizar .

Repita los pasos 8 y 9 para 20740-LON-NVHOST4 y 20740C-LON-DC1-C .

Inicie Windows PowerShell desde el men� Inicio y luego ejecute los siguientes
comandos para habilitar la virtualizaci�n anidada en 20740C-LON-NVHOST3 y 20740C-
LON-NVHOST4.
Set-VMProcessor -VMName 20740C-LON-NVHOST3 -ExposeVirtualizationExtensions $true
-Count 2

Set-VMMemory 20740C-LON-NVHOST3 -DynamicMemoryEnabled $false

Get-VMNetworkAdapter -VMName 20740C-LON-NVHOST3| Set-VMNetworkAdapter


-MacAddressSpoofing On

Set-VMProcessor -VMName 20740C-LON-NVHOST4 -ExposeVirtualizationExtensions $true


-Count 2

Set-VMMemory 20740C-LON-NVHOST4 -DynamicMemoryEnabled $false

Get-VMNetworkAdapter -VMName 20740C-LON-NVHOST4| Set-VMNetworkAdapter


-MacAddressSpoofing On
Ejercicio anteriorSiguiente ejercicio

3. Ejercicio 1: configuraci�n del entorno virtual


Tarea 2: instalar Hyper-V en hosts de virtualizaci�n anidados

Abra el Administrador del servidor , haga clic en Herramientas y luego en


Administrador de Hyper-V .

En el panel izquierdo, seleccione LON-HOST2 .

In the Virtual Machines pane, select 20740C-LON-NVHOST3.

In the Actions menu, click Start.

Repeat steps 3 and 4 for 20740-LON-NVHOST4 and 20740C-LON-DC1-C.

If you closed Windows PowerShell window on LON-HOST2, click Start, right-click


Windows PowerShell, and then click Run as Administrator.

To open a PSSession utilizing Windows PowerShell Direct, at the Windows PowerShell


command prompt, type the following command, and then press Enter:
Enter-PSSession -VMName 20740C-LON-NVHOST3

In the Credentials request dialog box, in the Username text box, type
Adatum\Administrator, and in the Password text box, type Pa55w.rd,and then press
Enter.

To install Hyper-V, type the following command at the Windows PowerShell command
prompt, and then press Enter:
Install-WindowsFeature -Name Hyper-V,Hyper-V-Tools,Hyper-V-Powershell -Restart

Wait until the installation completes. Type the following command at the Windows
PowerShell command prompt, and then press Enter:
Exit
Note: If this generates the error "Command 'Exit' was not run as the session in
which it was intended to run was either closed or broken," ignore this error.

Repita los pasos del 7 al 10 para 20740C-LON-NVHOST4 .

Para configurar la red, en un indicador de Windows PowerShell en LON-HOST2 ,


escriba el siguiente comando: (Tenga en cuenta que la ruta puede diferir en su
m�quina host).
Invoke-Command -VMName 20740C-LON-NVHOST3 -FilePath "D:\Program Files\Microsoft
Learning\20740\Drives\CreateVirtualSwitches.ps1"

En el cuadro de di�logo Solicitud de credenciales , en el cuadro de texto Nombre de


usuario , escriba Adatum \ Administrador , y en el cuadro de texto Contrase�a ,
escriba Pa55w.rd y luego presione Entrar.

Repita los pasos 12 y 13 para 20740C-LON-NVHOST4 .

Cambie a la consola del Administrador Hyper-V , haga clic con el bot�n derecho en
20740C-LON-NVHOST3 , haga clic en Conectar y luego inicie sesi�n como Adatum \
Administrador con la contrase�a Pa55w.rd .

Repita el paso 15 para 20740C-LON-NVHOST4 .


Ejercicio anteriorSiguiente ejercicio

4. Ejercicio 2: configuraci�n de un cl�ster de conmutaci�n por error para Hyper-V


Tarea 1: conectarse al destino iSCSI desde ambas m�quinas host

En LON-NVHOST3 , haga clic en Inicio , haga clic en el �cono del Administrador del
servidor y luego en la ventana del Administrador del servidor, haga clic en
Herramientas y luego en Iniciador iSCSI .

En el indicador de Microsoft iSCSI , haga clic en S� .

Click the Discovery tab.

On the Discovery tab, click Discover Portal.

In the IP address or DNS name text box, type 172.16.0.10, and then click OK.

Click the Targets tab, and then click Refresh.

In the Discovered targets list, click iqn.1991-05.com.microsoft:lon-dc1-target1-


target, and then click Connect.

If not already selected, select Add this connection to the list of Favorite
Targets, and then click OK.

To close iSCSI Initiator Properties dialog box, click OK.

Switch to LON-NVHOST4.

On LON-NVHOST4, open Server Manager, click Tools, and then click iSCSI Initiator.

In the Microsoft iSCSI dialog box, click Yes.

In the iSCSI Initiator dialog box, click the Discovery tab.

On the Discovery tab, click Discover Portal.

In the IP address or DNS name text box, type 172.16.0.10, and then click OK.

Click the Targets tab, and then click Refresh.

In the Discovered targets list, click iqn.1991-05.com.microsoft:lon-dc1-target1-


target, and then click Connect.

Select Add this connection to the list of Favorite Targets, and then click OK.

To close the iSCSI Initiator Properties dialog box, click OK.

On LON-NVHOST4, in Server Manager, click Tools, and then click Computer Management.

Expand Storage, and then click Disk Management.

Right-click Disk 1, and then click Online. (This is the first disk that is 20 GB in
size. Your disk number might be different.)

Right-click Disk 1, and then click Initialize Disk.

In the Initialize Disk dialog box, click OK.

Right-click the unallocated space next to Disk 1, and then click New Simple Volume.

On the Welcome page, click Next.

On the Specify Volume Size page, click Next.

On the Assign Drive Letter or Path page, click Next.

En la p�gina Formatear partici�n , en el cuadro de texto Etiqueta de volumen ,


escriba ClusterDisk .

Seleccione la casilla de verificaci�n Realizar un formateo r�pido , haga clic en


Siguiente y luego en Finalizar .
Nota: Si aparece un mensaje de Microsoft Windows para formatear el disco, haga clic
en Cancelar.

Repita los pasos 22 a 30 para el Disco 2 y el Disco 3. En el paso 29, utilice la


siguiente configuraci�n:
Nombre del disco 2: ClusterVMs
Nombre del disco 3: Qu�rum

Vuelva a LON-NVHOST3 .

En LON-NVHOST3 en el Administrador del servidor , haga clic en Herramientas y luego


en Administraci�n de equipos .

Expanda Almacenamiento y luego haga clic en Administraci�n de discos .

Haga clic con el bot�n derecho en Administraci�n de discos y luego en Actualizar .

Haga clic con el bot�n derecho en Disco 1 y luego haga clic en En l�nea .

Haga clic con el bot�n derecho en Disco 2 y luego haga clic en En l�nea .

Haga clic con el bot�n derecho en Disco 3 y luego haga clic en En l�nea .

Cierre la consola de administraci�n de equipos.


Nota: Los n�meros de disco pueden variar seg�n el n�mero de discos f�sicos en la
computadora host. Elija los discos que tengan un tama�o de 20 GB.

Ejercicio anteriorSiguiente ejercicio

5. Ejercicio 2: configuraci�n de un cl�ster de conmutaci�n por error para Hyper-V


Tarea 2: configurar la agrupaci�n en cl�steres de conmutaci�n por error en ambas
m�quinas host

On LON-NVHOST3, ensure that Server Manager console is open.

In Server Manager, on the Dashboard, click Add roles and features.

On the Before you begin page, click Next.

On the Select installation type page, click Next.

On the Select destination server page, ensure that Select server from the server
pool is selected, and then click Next.

On the Select server roles page, click Next.

On the Select features page, in the Features list, click Failover Clustering. At
the Add features that are required for failover clustering prompt, click Add
Features, and then click Next.

On the Confirm installation selections page, click Install.

When installation is complete, click Close.

Switch to LON-NVHOST4.

Repeat steps 1 through 9 on LON-NVHOST4.

Switch back to LON-NVHOST3.


On LON-NVHOST3, in Server Manager, click Tools, and then click Failover Cluster
Manager.

In Failover Cluster Manager, in the center pane, under Management, click Create
Cluster.

On the Before You Begin page of the Create Cluster Wizard, read the information,
and then click Next.

En la p�gina Seleccionar servidores , en el cuadro de texto Ingresar el nombre del


servidor , escriba LON-NVHOST3 y luego haga clic en Agregar . Nuevamente, en el
cuadro de texto Ingrese el nombre del servidor , escriba LON-NVHOST4 y luego haga
clic en Agregar .

Verifique las entradas y luego haga clic en Siguiente .

En la p�gina Advertencia de validaci�n , haga clic en No. No necesito soporte de


Microsoft para este cl�ster y luego haga clic en Siguiente .
Nota: est� omitiendo la validaci�n para ahorrar algo de tiempo en el laboratorio.
En un entorno de producci�n, nunca debe omitir la validaci�n del cl�ster.

En la p�gina Punto de acceso para administrar el cl�ster , en el cuadro de texto


Nombre del cl�ster , escriba VMCluster .

En el cuadro de texto Direcci�n , escriba 172.16.0.126 y luego haga clic en


Siguiente .

En el cuadro de di�logo Confirmaci�n , verifique la informaci�n, desactive la


casilla de verificaci�n Agregar todo el almacenamiento elegible al cl�ster y luego
haga clic en Siguiente .

En la p�gina Resumen , haga clic en Finalizar.


Ejercicio anteriorSiguiente ejercicio

6. Ejercicio 2: configuraci�n de un cl�ster de conmutaci�n por error para Hyper-V


Tarea 3: configurar discos para un cl�ster de conmutaci�n por error

En LON-NVHOST3 , en la consola de Failover Cluster Manager , expanda


VMCluster.Adatum.com , expanda Almacenamiento , haga clic con el bot�n derecho en
Discos y luego haga clic en Agregar disco .

En el cuadro de di�logo Agregar discos al cl�ster , verifique que todos los discos
est�n seleccionados y luego haga clic en Aceptar .

Haga clic en Discos en el panel izquierdo y verifique que todos los discos se
muestren como Almacenamiento disponible en el Administrador de cl�steres de
conmutaci�n por error .

Haga clic en Cluster Disk 1 , haga clic con el bot�n derecho en ese disco y luego
haga clic en Add to Cluster Shared Volumes .

Haga clic con el bot�n derecho en VMCluster.adatum.com , haga clic en M�s


acciones , haga clic en Configurar configuraci�n de qu�rum de cl�ster y, a
continuaci�n, haga clic en Siguiente .

En la p�gina Seleccionar opci�n de configuraci�n de qu�rum , haga clic en Usar


configuraci�n de qu�rum predeterminada y, a continuaci�n, haga clic en Siguiente .

En la p�gina de Confirmaci�n , haga clic en Siguiente .

En la p�gina Resumen , haga clic en Finalizar.


Ejercicio anteriorSiguiente ejercicio

7. Ejercicio 3: configuraci�n de una m�quina virtual de alta disponibilidad


Tarea 1: Mueva el almacenamiento de la m�quina virtual al destino iSCSI

Aseg�rese de que LON-NVHOST3 sea ??el propietario del disco que acaba de asignar a
Cluster Shared Volume . Puede leer el valor del propietario en la columna Nodo
propietario . Si ese no es el caso, mueva el disco a LON-NVHOST3 antes de continuar
con el paso 2.
Nota: para mover el disco:

Haga clic con el bot�n derecho en el disco y luego haga clic en Mover.

Haga clic en Seleccionar nodo, haga clic en LON-NVHOST3 y luego haga clic en
Aceptar.

En LON-NVHOST3 , en el escritorio, en la barra de tareas, haga clic en el icono del


Explorador de archivos .

En el Explorador de archivos , expanda la unidad C : , expanda Archivos de programa


, expanda Microsoft Learning , expanda 20740 , expanda Unidades , expanda 20740C-
NANO-SVR1 y luego haga clic en Discos duros virtuales .
Nota: La letra de la unidad puede ser diferente seg�n la m�quina f�sica.

En el panel de detalles, mueva el archivo de disco duro virtual 20740C-NANO-


SVR1.vhd a la ubicaci�n C: \ ClusterStorage \ Volume1 .
Ejercicio anteriorSiguiente ejercicio

8. Ejercicio 3: configuraci�n de una m�quina virtual de alta disponibilidad


Tarea 2: configurar la m�quina virtual como de alta disponibilidad

On LON-NVHOST3, in Failover Cluster Manager, click Roles, and then in the Actions
pane, click Virtual Machines.

Click New Virtual Machine.


Select LON-NVHOST3 as the cluster node, and then click OK.

In the New Virtual Machine Wizard, on the Before You Begin page, click Next.

On the Specify Name and Location page, in the Name text box, type TestClusterVM,
click Store the virtual machine in a different location,and then click Browse.

Browse to and select C:\ClusterStorage\Volume1, click Select Folder, and then click
Next.

On the Specify Generation page, click Generation** 1 **, and then click Next.

On the Assign Memory page, type 256, and then click Next.

On the Configure Networking page, leave the selection as Not Connected, and then
click Next.

On the Connect Virtual Hard Disk page, click Use an existing virtual hard disk, and
then click Browse.

Vaya a C: \ ClusterStorage \ Volume1 , haga clic en 20740C-NANO-SVR1.vhd y luego


haga clic en Abrir .

Haga clic en Siguiente y luego en Finalizar . Si aparece un error inform�ndole que


Microsoft Management ha dejado de funcionar, reinicie esta tarea desde el paso 1.

En la p�gina Resumen del Asistente de alta disponibilidad , haga clic en


Finalizar .

Haga clic con el bot�n derecho en TestClusterVM y luego haga clic en


Configuraci�n .

En LON-NVHOST3 , en el cuadro de di�logo Configuraci�n de TestClusterVM , en el


panel de navegaci�n, expanda Procesador y luego haga clic en Compatibilidad .

En el panel derecho, seleccione la casilla de verificaci�n Migrar a un equipo


f�sico con una versi�n de procesador diferente y luego haga clic en Aceptar .

Haga clic con el bot�n derecho en TestClusterVM y luego haga clic en Iniciar .

Aseg�rese de que la m�quina virtual se inicie correctamente.


Ejercicio anteriorSiguiente ejercicio

9. Ejercicio 3: configuraci�n de una m�quina virtual de alta disponibilidad


Tarea 3: VM de conmutaci�n por error

En LON-NVHOST4 , en la consola del Administrador del servidor, haga clic en


Herramientas y luego en Administrador de cl�steres de conmutaci�n por error .

Expanda VMCluster.Adatum.com y luego haga clic en Roles .

Haga clic con el bot�n derecho en TestClusterVM , haga clic en Mover , haga clic en
Live ** Migration y, a continuaci�n, haga clic en Seleccionar nodo **.
Haga clic en LON-NVHOST4 y luego en Aceptar . Espere hasta que se migre la m�quina.
Ver� que la columna Propietario ** Nodo ** cambiar� el valor cuando se complete la
migraci�n.
Nota: Si la �nica opci�n es LON-NVHOST3, seleccione LON-NVHOST3 y contin�e con la
pr�ctica de laboratorio.

Haga clic con el bot�n derecho en TestClusterVM y luego haga clic en Conectar .

Aseg�rese de poder acceder a la m�quina virtual y operarla despu�s de migrarla a


otro host.

En Failover Cluster Manager , haga clic con el bot�n derecho en TestClusterVM y


seleccione Apagar .
Ejercicio anteriorSiguiente ejercicio

10. Ejercicio 3: configuraci�n de una m�quina virtual de alta disponibilidad


Tarea 4: Configurar el drenaje al apagar

En LON-NVHOST3, seleccione Inicio de Windows y luego inicie Windows PowerShell .

En el s�mbolo del sistema de Windows PowerShell , escriba el siguiente comando y


luego presione Entrar:
(Get-Cluster).DrainOnShutdown
Nota: Esto deber�a devolver un valor de " 1 ".

En LON-NVHOST3 , restaure el Administrador de cl�steres de conmutaci�n por error .

Seleccione Roles en Failover Cluster Manager .

En LON-NVHOST4 , haga clic en Inicio de Windows , seleccione Encendido y luego


seleccione Apagar.

En el cuadro de di�logo emergente, seleccione Continuar.

Observe la migraci�n en vivo de TestClusterVM a LON-NVHOST3 desde LON-NVHOST4 antes


de apagarse.
Ejercicio anteriorSiguiente ejercicio

11. Ejercicio 3: configuraci�n de una m�quina virtual de alta disponibilidad


Tarea 5: Prep�rese para el pr�ximo m�dulo

Cuando haya terminado con el laboratorio, revierta todas las m�quinas virtuales a
su estado inicial

En la computadora host, inicie Hyper-V Manager .

Apague todas las m�quinas virtuales.

Reinicie su computadora y, cuando se le solicite, elija Windows Server 2016 .


Ejercicio anterior

[20740C] Module 09: Implementing Failover Clustering with Windows Server 2016
Hyper-V
1. Lab: Implementing failover clustering with Windows Server 2016 Hyper-V
Scenario:

The initial deployment of VMs on Hyper-V has been successful for Adatum
Corporation. As a next step in VM deployment, Adatum is considering ways to ensure
that the services and applications deployed on the VMs are highly available. As
part of the implementation of high availability for most network services and
applications, Adatum is also considering options for making the VMs that run on
Hyper-V highly available.

As one of the senior network administrators at Adatum, you are responsible for
integrating Hyper-V with failover clustering to ensure that the VMs deployed on
Hyper-V are highly available. You are responsible for planning the VM and storage
configuration, and for implementing the VMs as highly available services on the
failover cluster. You have limited hardware; so, to facilitate testing before
implementation in your production environment, you will enable nested
virtualization to test clustering two Hyper-V Hosts.

Next Exercise

2. Exercise 1: Configuring virtual environment


Task 1: Configure physical host, VMs, and nested virtualization

Log in to the LON-HOST2 virtual machine as Adatum\Administrator with password


Pa55w.rd. On LON-HOST2, click Start, and then click Windows PowerShell.

In the Windows PowerShell window, type the following command, and then press Enter:
Install-WindowsFeature -Name Hyper-V,Hyper-V-Tools,Hyper-V-PowerShell -Restart
Your computer will restart a couple of times. Be sure to select 20740C-LON-HOST2 at
the boot menu each time it restarts.

Sign into LON-HOST2 as Adatum\Administrator with the password Pa55w.rd. Click


start, then click Windows Powershell, then run the following command:
New-VMSwitch -Name "Host Internal Network" -SwitchType Internal

Open File Explorer, and then browse to E:\Program Files\Microsoft


Learning\20740\Drives. (Note that the drive letter may vary based upon your host
machine.)

Run the following scripts to create the needed switches and import the VMs that
need to be imported for this lab:
CreateVirtualSwitches.ps1
LON-HOST2_VM-Pre-Import-20740C.ps1

Use drive letter C for base images and D for course images.
Open Server Manager, click Tools, and then click Hyper-V Manager.

In the left pane, select LON-HOST2.

In the Virtual Machines pane, select 20740C-LON-NVHOST3.

On the Actions menu, click Upgrade Configuration Version, and then click Upgrade.

Repeat steps 8 and 9 for 20740-LON-NVHOST4 and 20740C-LON-DC1-C.

Start Windows PowerShell from the Start menu, and then run the following commands
to enable nested virtualization on 20740C-LON-NVHOST3 and 20740C-LON-NVHOST4.
Set-VMProcessor -VMName 20740C-LON-NVHOST3 -ExposeVirtualizationExtensions $true
-Count 2

Set-VMMemory 20740C-LON-NVHOST3 -DynamicMemoryEnabled $false

Get-VMNetworkAdapter -VMName 20740C-LON-NVHOST3| Set-VMNetworkAdapter


-MacAddressSpoofing On

Set-VMProcessor -VMName 20740C-LON-NVHOST4 -ExposeVirtualizationExtensions $true


-Count 2

Set-VMMemory 20740C-LON-NVHOST4 -DynamicMemoryEnabled $false

Get-VMNetworkAdapter -VMName 20740C-LON-NVHOST4| Set-VMNetworkAdapter


-MacAddressSpoofing On
Previous ExerciseNext Exercise

3. Exercise 1: Configuring virtual environment


Task 2: Install Hyper-V on nested virtualization hosts

Open Server Manager, click Tools, and then click Hyper-V Manager.

In the left pane, select LON-HOST2.

In the Virtual Machines pane, select 20740C-LON-NVHOST3.

In the Actions menu, click Start.

Repeat steps 3 and 4 for 20740-LON-NVHOST4 and 20740C-LON-DC1-C.

If you closed Windows PowerShell window on LON-HOST2, click Start, right-click


Windows PowerShell, and then click Run as Administrator.

To open a PSSession utilizing Windows PowerShell Direct, at the Windows PowerShell


command prompt, type the following command, and then press Enter:
Enter-PSSession -VMName 20740C-LON-NVHOST3

In the Credentials request dialog box, in the Username text box, type
Adatum\Administrator, and in the Password text box, type Pa55w.rd,and then press
Enter.

To install Hyper-V, type the following command at the Windows PowerShell command
prompt, and then press Enter:
Install-WindowsFeature -Name Hyper-V,Hyper-V-Tools,Hyper-V-Powershell -Restart
Wait until the installation completes. Type the following command at the Windows
PowerShell command prompt, and then press Enter:
Exit
Note: If this generates the error "Command 'Exit' was not run as the session in
which it was intended to run was either closed or broken," ignore this error.

Repeat steps 7 through 10 for 20740C-LON-NVHOST4.

To configure networking, in a Windows PowerShell prompt on LON-HOST2, type the


following command: (Note that the path may differ on your host machine.)
Invoke-Command -VMName 20740C-LON-NVHOST3 -FilePath "D:\Program Files\Microsoft
Learning\20740\Drives\CreateVirtualSwitches.ps1"

In the Credentials request dialog box, in the Username text box, type
Adatum\Administrator, and in the Password text box, type Pa55w.rd, and then press
Enter.

Repeat steps 12 and 13 for 20740C-LON-NVHOST4.

Switch to the Hyper-V Manager console, right-click 20740C-LON-NVHOST3, click


Connect, and then sign in as Adatum\Administrator with the password Pa55w.rd.

Repeat step 15 for 20740C-LON-NVHOST4.


Previous ExerciseNext Exercise

4. Exercise 2: Configuring a failover cluster for Hyper-V


Task 1: Connect to the iSCSI target from both host machines

On LON-NVHOST3, click Start, click the Server Manager icon, and then in the Server
Manager window click Tools, and then click iSCSI Initiator.

At the Microsoft iSCSI prompt, click Yes.

Click the Discovery tab.

On the Discovery tab, click Discover Portal.

In the IP address or DNS name text box, type 172.16.0.10, and then click OK.

Click the Targets tab, and then click Refresh.

In the Discovered targets list, click iqn.1991-05.com.microsoft:lon-dc1-target1-


target, and then click Connect.

If not already selected, select Add this connection to the list of Favorite
Targets, and then click OK.

To close iSCSI Initiator Properties dialog box, click OK.

Switch to LON-NVHOST4.

On LON-NVHOST4, open Server Manager, click Tools, and then click iSCSI Initiator.

In the Microsoft iSCSI dialog box, click Yes.

In the iSCSI Initiator dialog box, click the Discovery tab.


On the Discovery tab, click Discover Portal.

In the IP address or DNS name text box, type 172.16.0.10, and then click OK.

Click the Targets tab, and then click Refresh.

In the Discovered targets list, click iqn.1991-05.com.microsoft:lon-dc1-target1-


target, and then click Connect.

Select Add this connection to the list of Favorite Targets, and then click OK.

To close the iSCSI Initiator Properties dialog box, click OK.

On LON-NVHOST4, in Server Manager, click Tools, and then click Computer Management.

Expand Storage, and then click Disk Management.

Right-click Disk 1, and then click Online. (This is the first disk that is 20 GB in
size. Your disk number might be different.)

Right-click Disk 1, and then click Initialize Disk.

In the Initialize Disk dialog box, click OK.

Right-click the unallocated space next to Disk 1, and then click New Simple Volume.

On the Welcome page, click Next.

On the Specify Volume Size page, click Next.

On the Assign Drive Letter or Path page, click Next.

On the Format Partition page, in the Volume label text box, type ClusterDisk.

Select the Perform a quick format check box, click Next, and then click Finish.
Note: If a Microsoft Windows prompt appears to format the disk, click Cancel.

Repeat steps 22 through 30 for Disk 2 and Disk 3. In step 29, use the following
settings:
Disk 2 name: ClusterVMs

Disk 3 name: Quorum

Switch back to LON-NVHOST3.

On LON-NVHOST3 in Server Manager, click Tools, and then click Computer Management.

Expand Storage, and then click Disk Management.

Right-click Disk Management, and then click Refresh.

Right-click Disk 1, and then click Online.

Right-click Disk 2, and then click Online.

Right-click Disk 3, and then click Online.


Close Computer Management console.
Note: Disk numbers might vary based on the number of physical disks in the host
computer. Choose the disks that are 20 GB in size.

Previous ExerciseNext Exercise

5. Exercise 2: Configuring a failover cluster for Hyper-V


Task 2: Configure failover clustering on both host machines

On LON-NVHOST3, ensure that Server Manager console is open.

In Server Manager, on the Dashboard, click Add roles and features.

On the Before you begin page, click Next.

On the Select installation type page, click Next.

On the Select destination server page, ensure that Select server from the server
pool is selected, and then click Next.

On the Select server roles page, click Next.

On the Select features page, in the Features list, click Failover Clustering. At
the Add features that are required for failover clustering prompt, click Add
Features, and then click Next.

On the Confirm installation selections page, click Install.

When installation is complete, click Close.

Switch to LON-NVHOST4.

Repeat steps 1 through 9 on LON-NVHOST4.

Switch back to LON-NVHOST3.

On LON-NVHOST3, in Server Manager, click Tools, and then click Failover Cluster
Manager.

In Failover Cluster Manager, in the center pane, under Management, click Create
Cluster.

On the Before You Begin page of the Create Cluster Wizard, read the information,
and then click Next.

On the Select Servers page, in the Enter server name textbox, type LON-NVHOST3, and
then click Add. Again, in the Enter server name text box, type LON-NVHOST4, and
then click Add.

Verify the entries, and then click Next.

On the Validation Warning page, click No. I don't require support from Microsoft
for this cluster, and then click Next.
Note: You are skipping validation to save some time in the lab. In a production
environment, you should never skip cluster validation.
On the Access Point for Administering the Cluster page, in the Cluster Name text
box, type VMCluster.

In the Address text box, type 172.16.0.126, and then click Next.

In the Confirmation dialog box, verify the information, clear the Add all eligible
storage to the cluster option check box, and then click Next.

On the Summary page, click Finish.


Previous ExerciseNext Exercise

6. Exercise 2: Configuring a failover cluster for Hyper-V


Task 3: Configure disks for a failover cluster

On LON-NVHOST3, in the Failover Cluster Manager console, expand


VMCluster.Adatum.com, expand Storage, right-click Disks, and then click Add Disk.

In the Add Disks to Cluster dialog box, verify that all disks are selected, and
then click OK.

Click Disks in the left pane and verify that all disks display as Available Storage
in Failover Cluster Manager.

Click Cluster Disk 1, right-click that disk,and then click Add to Cluster Shared
Volumes.

Right-click VMCluster.adatum.com, click More Actions,click Configure Cluster Quorum


Settings, and then click Next.

On the Select Quorum Configuration Option page, click Use default quorum
configuration,and then click Next.

On the Confirmation page, click Next.

On the Summary page, click Finish.


Previous ExerciseNext Exercise

7. Exercise 3: Configuring a highly available VM


Task 1: Move VM storage to the iSCSI target

Ensure that LON-NVHOST3 is the owner of the disk that you just assigned to Cluster
Shared Volume. You can read the owner value in the Owner Node column. If that is
not the case, then move the disk to LON-NVHOST3 before proceeding to step 2.
Note: To move the disk:

Right-click the disk, and then click Move.

Click Select Node, click LON-NVHOST3, and then click OK.

On LON-NVHOST3, on the desktop, on the taskbar, click the File Explorer icon.
In File Explorer, expand drive C:, expand Program Files, expand Microsoft Learning,
expand 20740, expand Drives, expand 20740C-NANO-SVR1, and then click Virtual Hard
Disks.
Note: The drive letter might be different depending on the physical machine.

In the details pane, move the 20740C-NANO-SVR1.vhd virtual hard disk file to the
C:\ClusterStorage\Volume1 location.
Previous ExerciseNext Exercise

8. Exercise 3: Configuring a highly available VM


Task 2: Configure the VM as highly available

On LON-NVHOST3, in Failover Cluster Manager, click Roles, and then in the Actions
pane, click Virtual Machines.

Click New Virtual Machine.

Select LON-NVHOST3 as the cluster node, and then click OK.

In the New Virtual Machine Wizard, on the Before You Begin page, click Next.

On the Specify Name and Location page, in the Name text box, type TestClusterVM,
click Store the virtual machine in a different location,and then click Browse.

Browse to and select C:\ClusterStorage\Volume1, click Select Folder, and then click
Next.

On the Specify Generation page, click Generation** 1 **, and then click Next.

On the Assign Memory page, type 256, and then click Next.

On the Configure Networking page, leave the selection as Not Connected, and then
click Next.

On the Connect Virtual Hard Disk page, click Use an existing virtual hard disk, and
then click Browse.

Browse to C:\ClusterStorage\Volume1, click 20740C-NANO-SVR1.vhd, and then click


Open.

Click Next, and then click Finish. If an error appears informing you that Microsoft
Management has stopped working, restart this task from step 1.

On the Summary page of the High Availability Wizard, click Finish.

Right-click the TestClusterVM, and then click Settings.

On LON-NVHOST3, in the Settings for TestClusterVM dialog box, in the navigation


pane, expand Processor, and then click Compatibility.

In the right pane, select the Migrate to a physical computer with a different
processor version check box, and then click OK.
Right-click TestClusterVM, and then click Start.

Ensure that the VM starts successfully.


Previous ExerciseNext Exercise

9. Exercise 3: Configuring a highly available VM


Task 3: Failover VM

On LON-NVHOST4, in Server Manager console, click Tools, and then click Failover
Cluster Manager.

Expand VMCluster.Adatum.com, and then click Roles.

Right-click TestClusterVM, click Move, click Live** Migration , and then click
Select Node**.

Click LON-NVHOST4, and then click OK. Wait until the machine is migrated. You will
see that the Owner** Node** column will change the value when migration completes.
Note: If the only option is LON-NVHOST3, select LON-NVHOST3 and continue the lab.

Right-click TestClusterVM, and then click Connect.

Ensure that you can access and operate the VM after it is migrated to another host.

In Failover Cluster Manager, right click TestClusterVM, and select Shut Down.
Previous ExerciseNext Exercise

10. Exercise 3: Configuring a highly available VM


Task 4: Configure drain on shutdown

On LON- NVHOST3, select Windows Start, and then launch Windows PowerShell.

At the Windows PowerShell command prompt, type the following command, and then
press Enter:
(Get-Cluster).DrainOnShutdown
Note: This should return a value of " 1".

On LON- NVHOST3,restore Failover Cluster Manager.

Select Roles in Failover Cluster Manager.

On LON-NVHOST4, click on Windows Start, select Power, and then select Shut down.

On the pop-up dialog box, select Continue.

Observe TestClusterVM live migrate to LON- NVHOST3 from LON-NVHOST4 before shutting
down.
Previous ExerciseNext Exercise

11. Exercise 3: Configuring a highly available VM


Task 5: Prepare for the next module
When you are finished with the lab, revert all VMs to their initial state

On the host computer, start Hyper-V Manager.

Shut down all VMs.

Restart your computer, and when prompted, choose Windows Server 2016.
Previous Exercise

También podría gustarte