Showing posts with label System Center Virtual Machine Manager 2012. Show all posts
Showing posts with label System Center Virtual Machine Manager 2012. Show all posts

Monday, July 21, 2014

Adding a Windows Deployment Server to System Center Virtual Machine Manager 2012 R2

Administrators can add a Windows Deployment Services (WDS) server into System Center Virtual Machine Manager (VMM) 2012 or later. VMM uses WDS to deploy a Windows with Hyper-V role or a Hyper-V server to a physical host. The WDS which is managed by VMM will deploy a virtual hard hard format to a physical host. In VMM 2012 R2, it supports WDS which is installed in Windows Server 2008 R2, Windows Server 2012 or Windows Server 2012 R2. To add a WDS server into VMM 2012 R2, administrators have to install the WDS role before adding into VMM 2012 R2. In this lab, I will install a Windows Deployment services in a Windows Server 2012 R2 and add it into VMM 2012 R2.

Goal
  • Installing and configuring a Windows Deployment Services (WDS) in a Windows Server 2012 R2
  • Adding a Windows Deployment Services (WDS) into a VMM 2012 R2
Lab environment
Prerequisites
  • VMMAdmin is a local administrator of WDS01
Lab
Installing Windows Deployment Services
1. On VMM01, log in as VMMAdmin.
2. Launch "Server Manager".
3. On "Dashboard" window, click "Add other servers to manage".


4. On "Add Servers" window, next to "Name (CN)", enter "WDS01".
5. Click "Find Now".


6. Select "WDS01", click ">" to add a computer.


7. Click "OK".
8. On "Server Manager" window, click "All Servers".
9. On "SERVERS" pane, right-click "WDS01", select "Add Roles and Features".


10. On "Before You Begin" window, click "Next".
11. On "Installation Type" window, select "Role-based or feature-based installation" and then click "Next".


12. On "Server Selection" window, click "Next".
13. On "Server Roles" window, check "Windows Deployment Services".
14. On "Add Roles and Features Wizard" window, click "Add Features".



15. Click "Next".
16. On "Features" window, click "Next".
17. On "WDS" window, click "Next".


18. On "Role Services" window, make sure "Deployment Server" and "Transport Server" are checked.


This is the requirement of a WDS server to add into VMM 2012 R2.

19. Click "Next".
20. On "Confirmation" window, click "Install".


21. On "Results" window, click "Close".


22. Right-click "WDS01", select "Restart Server".


23. Click "OK".

Configuring WDS
1. On VMM01, log in as VMMAdmin.
2. Launch "Windows Deployment Services" tool.

If "Windows Deployment Services" tool isn't installed on VMM01, perform "Install-WindowsFeature WDS-AdminPack" on PowerShell to install it.

3. On "Windows Deployment Services" console, right-click "Servers", select "Add Server".


4. On "Add Servers" window, select "Another computer" and then enter "WDS01".


5. Click "OK".
6. Right-click "wds01.test.tls1.lab", select "Configure Server".


7. On "Before You Begin" window, click "Next".
8. On "Install Options window, select "Integrated with Active Directory" option.


9. Click "Next".
10. On "Remote Installation Folder Location" window, leave default path, click "Next".


11. Click "Next".
12. On "System Volume Warning" window, click "Yes".


In production environment, the remote installation folder should be placed on non System Volume.

13. On "PXE Server Initial Settings" window, still select "Do not respond to any client computers" option, click "Next".


14. On "Operation Complete" window, un-check "Add images to the server now" option, click "Finish".


Adding WDS into VMM console
1. On VMM01, log in as VMMAdmin.
2. Launch "Virtual Machine Manager Console".
3. Select "Use current Microsoft Windows session identity" option, click "Connect".


4. On "Virtual Machine Manager" console, select "Fabric".
5. Select "Infrastructure > PXE Servers".
6. On "Home" menu, click "Add Resources > PXE Server".


7. On "Add PXE Server" window, next to "Computer name", enter "WDS01".
8. Next to "Use an existing Run As account", click "Browse" to select "VMM Admin".


9. Click "Add".

As a result, the WDS server, WDS01, has been added into VMM console.


In production environment, administrators have to configure a DHCP option for PXE server in a DHCP host.

This posting is provided “AS IS” with no warranties, and confers no rights!

Thursday, July 3, 2014

Scan and apply Windows Updates to a Hyper-V host by a Update Server in System Center Virtual Machine Manager 2012 R2

In previous posts, Windows Server Updates Services server, SUS01, was added to a virtual machine manager console and create Updates Baselines in VMM. Now, I'd like to scan and apply Windows Updates to a host which is managed by VMM01.

Goal
  • Applying Windows Updates to a Hyper-V host
  • Create and delete exemption of Windows Updates

Lab environment

Lab
Checking compliance of a host
1. On VMM01, log in as VMMAdmin.
2. Launch "Virtual Machine Manager Console".
3. Select "Use current Microsoft Windows session identity" option, click "Connect".


4. On "Virtual Manage Manager", select "Fabric".
5. Select "Servers".
6. On the "Home" menu, click "Compliance".


7. Expand "hv02.test.tls1.lab".


There are 2 updates baselines which were assigned to hv02 last time.

8. On the "Home" menu, click "Scan".


As this moment, all "Compliance Status" of HV02 are "Non Compliant".


9.  On the "Home" menu, click "Compliance Properties".


"Compliance Properties" window displayed which Windows Updates are Non Compliant.


We will create an exemption later.

10. Click "OK".

Applying Windows Updates to a host
After scanning, we can apply the Windows Updates to a host.

1. Still in VMM console, on the "Home" menu, click "Remediate".


Remark: Administrators can select one of Updates Baselines and then click "Remediate".

On "Update Remediation" window, all Windows Updates have been checked.


2. Un-check all Windows Updates.


3. In my lab environment, I check "KB2969339".
4. Check "Do not restart servers after remediation".


5. Click "Remediate".


The Windows Update is applying to HV02.


After applying the Windows Update, Virtual Management Server scans HV02 again. However, the "Compliance Status" is still "Non Compliant" because we don't apply all Windows Updates to HV02.



Remark: For applying Windows Update to Hyper-V cluster, administrators can select "Live migration" or "Save state" option for virtual machines.


By default, VMM places each host in maintenance mode before it remediates updates in the host. if you want to bypass maintenance mode, check "Allow remediation of clusters with nodes already in maintenance mode".


Create and Remove Update Exemptions for Windows Updates
1. Still in VMM console, select "Critical Updates 06-2014 for Hyper-V hosts 2012 R2".
2. Click "Compliance Properties".


3. On "Compliance Properties" window , check all "Non Compliant" update under "Critical Updates 06-2014 for Hyper-V hosts 2012 R2".
4. Click "Create".


5. On "Create Exemption" window, administrators can enter some notes before clicking "Create".


The "State" of Windows Updates is changed to "Exempt".


6. Click "OK".

As a result, the "Compliance Status" of "Critical Updates 06-2014 for Hyper-V hosts 2012 R2" is "Compliant".


To delete exemption of Windows Updates, check the Windows Update in "Compliance Properties" window and then click "Delete".


Remark: By default, there is no option to configure "Synchronize Update Server" schedule. Administrators may need to press it manually or create a schedule job to perform "Start-SCUpdateServerSynchronization" cmdlet.

More information

This posting is provided “AS IS” with no warranties, and confers no rights!

Tuesday, July 1, 2014

Creating update baselines in System Center Virtual Machine Manager 2012 R2

Last post, I added "Windows Server Update Service" server to "System Center Virtual Machine Manager 2012 R2". In this port, I'd like to create update baselines and apply it to Windows Servers.

Goal
  • Create "Update Baselines" by VMM console and PowerShell
Lab environment
The lab environment is based on "Installing System Center Virtual Machine Manager 2012 R2 in Windows Server 2012 R2" and "Adding Windows Server Update Service for System Virtual Machine Manager 2012 R2 environment".

Prerequisites
  • Add "Windows Server 2012" into the products of Update Server, SUS01


Lab
Create "Update Baselines"
1. On VMM01, log in as VMMAdmin.
2. Launch "Virtual Machine Manager Console".
3. Select "Use current Microsoft Windows session identity" option, click "Connect".


4. On "Virtual Machine Manager" select "Library".
5. Select "Update Baselines".


By default, there are 2 sample Baselines which are related to "Critical Updates" and "Security Updates" in VMM console. All "Critical Updates" are added into "Sample Baseline for Critical Updates" and all "Security Updates" are added into "Sample Baseline for Security Updates".



6. Right-click "Update Baselines", select "Create Baseline".


7. On "General" window, next to "Name", enter "Critical Updates for Hyper-V hosts 2012 R2".


8. Click "Next".
9. On "Updates" window, click "Add".


10. On "Add Updates to Baseline" window, enter "Critical Updates".


The window displayed all updates with "Critical Updates" key word. However, the result also included all critical updates for Windows Server 2012 and Windows Server 2012 R2. Luckily, the result of Windows Updates is automatically sorted according to Windows Version.

11. Select all Windows Server 2012 R2 "Critical Updates", click "Add".


12. On "Updates" window, click "Next".


13. On "Assignment Scope", we can select host groups to assign updates. In my lab, I check "hv02".


14. Click "Next".
15. On "Summary" window, click "View Script".



Administrators can save and modify this script to create another baseline.

16. Copy and save the script to C:\CUpdate06.ps1
17. Click "Finish".


A new baseline, Critical Updates for Hyper-V hosts 2012 R2, was created.

Based on the filter of "Update Baseline Wizard", it's easy for us to filter the date, version and etc of Windows Updates so we need to use PowerShell to create a new baseline.

17. Launch "Windows PowerShell ISE" as administrator.
18. The script is based on the following requirements to modify it.

~ The Windows Updates are released in June of 2014
~ The Windows Updates are for Windows Server 2012 R2
~ The classification of Windows Updates is Critical
~ The baseline name is "Critical Updates 06-2014 for Hyper-V hosts 2012 R2"
~ Applied to HV02

$baseline = New-SCBaseline -Name "Critical Updates 06-2014 for Hyper-V hosts 2012 R2" -Description ""

$CUUpdate06 = Get-SCUpdate | Where Creationdate -gt 6/1/2014 | Where UpdateClassification -eq 'Critical Updates' | Where Products -eq 'Windows Server 2012 R2'

$scope = Get-SCVMMManagedComputer -ComputerName "hv02.test.tls1.lab"

Set-SCBaseline -Baseline $baseline -AddAssignmentScope $scope -RunAsynchronously -AddUpdates $CUUpdate06 -StartNow


18. Press "F5" to perform this script.
19. On "Windows PowerShell ISE", press "OK" to save and run it.



As a result, the new baseline, Critical Updates 06-2014 for Hyper-V hosts 2012 R2, was created.


This posting is provided “AS IS” with no warranties, and confers no rights!