570 likes | 1.26k Views
Super Server Management with SCVMM. Super Server Management with SCVMM. Derek Wilson Senior Premier Field Engineer Microsoft Corporation. Agenda. Virtual Machine Manager 2008 R2 Capabilities What's new in VMM SP1 Dynamic Memory and RemoteFX Support Advanced Management – Virtualization
E N D
Super Server Management with SCVMM Super Server Management with SCVMM Derek Wilson Senior Premier Field Engineer Microsoft Corporation
Agenda • Virtual Machine Manager 2008 R2 Capabilities • What's new in VMM SP1 • Dynamic Memory and RemoteFXSupport • Advanced Management – Virtualization • VM Provisioning – Templates, Profiles, Rapid Provisioning • PowerShell automation • Offline VM Servicing Tool • Troubleshooting Hints • Best Practices, Tips and Tricks
Virtual Machine Manager 2008 R2 Capabilities • Clustered Shared Volumes • Hot addition/removal of storage • SAN migrations in and out of clustered hosts • Maintenance Mode • Live Migration • Expanded support for iSCSI SANs • Support for optimized networking • Support for Quick Storage Migration • Queuing of Live migrations • Support for third party CFS Support for third party CFS Support for optimized networking Maintenance Mode Hot addition/removal of storage Expanded support for iSCSI SANs Clustered Shared Volumes SAN migrations in and out of clustered hosts Live Migration: Queuing of Live migrations Support for Quick Storage Migration For users requiring a true clustered file system, VMM 2008 R2 supports third party file systems by detecting CFS disks and allows for deploying multiple VMs per LUN. • Place multiple virtual machines on a single LUN and manage them individually. The key benefit that CSV delivers here is greatly simplified LUN configuration for the administrator. Quickly and efficiently respond to changing storage requirements of virtual machines. Easily migrate virtual machines between clustered hosts without affecting the connected users. Perform multiple Live Migrations without having to keep track of other Live Migrations within the cluster. Ability to automatically migrate VMs in and out of clustered hosts using SAN transfers. Simplify the process of initiating maintenance or upgrades to virtual hosts, VMM 2008 R2 provides maintenance mode – a one-step process whereby active virtual machines are safely evacuated to other hosts within the cluster before maintenance begins. Support for two new networking services – Virtual Machine Queue (VMQ) and TCP Chimney – built into Windows Server 2008 R2. Key benefits to both of these technologies are more efficient processing of network traffic (through the creation of virtual network queues in the former and offloading of TCP/IP workloads to a physical NIC, in the latter) and thus freeing up CPU cycles on the host machine. With expanded support now covering the majority of available iSCSI SANs, VMM 2008 R2 enables administrators to choose from a much wider range of options when selecting a new SAN solution. For those with SAN infrastructure in place, VMM 2008 R2 features greater SAN compatibility enabling administrators to leverage their storage investments. VMM 2008 R2 now allows for the migration of a VM’s storage both within the same host and across hosts with minimum downtime. VMM 2008 R2 also supports VMware storage vMotion so the storage for a VMware VM can be transferred on the same hosts no downtime.
Disjoint Domains • Host has different FQDN in AD and DNS • For example: server name is foo • FQDN in AD: foo.domain.contoso.com • FQDN in DNS: foo.contoso.com • For Kerberos authentication, SPN needs to be created for DNS Name • VMM 2008 • Required custom SPN to be manually configured in AD • VMM 2008 R2 • Automatically creates custom SPN for DNS name • AD needs to be configured to give permissions to VMM for SPN read/write permissions
Powershell Automation • Cross platform automation • Any cmdlet works on all supported platforms • Standardize scripts and procedures • Build value-add tools using higher level languages (e.g. C#) • Use VMM Library to organize, share and run all scripts • Powershell scripts available at the end of each wizard
One Way to Manage VMs Via PS $VMName = "Windows Server 2003“ $NewVMName = "Windows Server 2003 - new" • Setup variables for the VM we are looking for, and the new name • $VMName = "Windows Server 2003“ • $NewVMName = "Windows Server 2003 - new" • #Get a VMManagementService object • $VMManagementService = gwmi –class "Msvm_VirtualSystemManagementService" -namespace "root\virtualization" -computername "." • #Get the VM object that we want to modify • $query = "SELECT * FROM Msvm_ComputerSystem WHERE ElementName='" + $VMName + "'“ • $VM = gwmi -query $query -namespace "root\virtualization" -computername "." • #Get the VirtualSystemSettingsData of the VM we want to modify • $query = "Associators of {$VM} WHERE AssocClass=MSVM_SettingsDefineState“ • $VMSystemSettingData = gwmi -query $query -namespace "root\virtualization" -computername "." • #Change the ElementName property • $VMSystemSettingData.ElementName = $NewVMName • #Update the VM with ModifyVirtualSystem • $Result = $VMManagementService.ModifyVirtualSystem( $VM.__PATH,$VMSystemSettingData.psbase.GetText(1)) $VMManagementService = gwmi –class "Msvm_VirtualSystemManagementService" -namespace "root\virtualization" -computername "." $query = "SELECT * FROM Msvm_ComputerSystem WHERE ElementName='" + $VMName + "‘“$VM = gwmi -query $query -namespace "root\virtualization" -computername "." $query = "Associators of {$VM} WHERE AssocClass=MSVM_SettingsDefineState“ $VMSystemSettingData = gwmi -query $query -namespace "root\virtualization" -computername "."
The SCVMM Way.. • #Setup variables for the VM • $VMName = "Windows Server 2003“ • $NewVMName = "Windows Server 2003 - new" • #Connect to the SCVMM Server • $server = get-vmmserver –computer localhost • #Find the virtual machine to modify • $vm = get-vm –Name $VMName • #Update the VM • set-vm –VM $vm –Name $NewVMName
PowerShell Foundation Virtual Machine Manager Admin Console Virtual Machine Manager PowerShell Console
Speedup VM provisioning using Templates • Consist of Hardware and Guest OS Profile • Consistent hardware and guest OS configuration across all VMs • Reduce Provisioning time • Enables provisioning using Self Service Portal
VM Provisioning using PowerShell • Automate provisioning of VMs • Create multiple VMs at the same time • Can provision using data file E.g. Comma Separated files • Provisioning can be scheduled for a pre determined date and time. • Handy for repeated kind of VM provisioning with same configurations E.g. Setting up Lab VMs
Rapid Provisioning (Cmdline Only) • Rapidly create VMs from template • In VMM R2 • Create hardware and OS profiles with desired settings. • Create a template using profiles and specify blank VHD • Out of Band to VMM R2 • Create generalized VHD • Provision storage, clone VHD and present it to host • Using storage technologies such as snap cloning • In VMM R2 • Call New-VM with new parameter –UseLocalVirtualHardDisk
PowerShell and VM Provisioning Templates and Profiles Provisioning using PowerShell Rapid Provisioning Single VM Using Differencing disk Multiple VMs using a data file demo
Upgrade • Matrix • Procedure is Similar to upgrading from 2008 to R2 • Updates DB schema • You can’t go back unless you backup the DB! • Updated management pack, so SCOM reintegration required
UpgradeSP1 RC to RTM • Uninstall VMM SP1 RC, retain the DB! • Run upgrade utility • <installation cd root>\i386\bin\UpgradeVMMR2SP1RC.exe • <installation cd root>\amd64\bin\UpgradeVMMR2SP1RC.exe • Install VMM SP1 RTM, use the retained DB.
FAQs about VMM SP1 • How is cluster overcommit affected by DM? • VMM uses assigned memory value for all calculations. • Calculated on cluster refresh every 30 minutes • Hyper-VRoot Memory Reserve • Hyper-V introduced a new memory reserve registry key to prevent DM from taking too much memory from parent partition • Best practice is to not run applications in parent partition • BUT, it may be necessary to increase reserves if running lots of agents • Hyper-V reserve can be accounted for by manually adding to VMM host memory reserve
New Virtualization Features WS2008 R2 SP1 Dynamic Memory RemoteFX Dynamic Memory allows the allocation of a range of memory (min and max) to individual VMs, enabling the system to dynamically adjust the VM’s memory usage based on demand. This provides more consistency in system performance enabling better manageability for administrators Microsoft RemoteFXleverages the power of virtualized graphics resources and advanced codecs to recreate the fidelity of hardware-assisted graphics acceleration, including support for 3D content and Windows Aero, on a remote user’s device. This allows for a local-like, remote experience.
Dynamic Memory Support • Overview • Memory is pooled and dynamically distributed across VMs • Memory is dynamically allocated/removed based on workloads-No Service interruptions • Benefits • More efficiently utilizes physical memory • Enables accurate guest memory sizing • Enables higher consolidation ratio • A production feature
Dynamic Memory in SCVMMPlacement • New intelligent placement checks for DM • Must have SP1 • For migrating stopped or starting VMs • Must have startup memory available on destination host • For running or saved-state VMs • Must have current memory available on destination host • If DM is enabled on any snapshot, then destination must be a SP1 host
Dynamic Memory in SC VMMPowerShell • New settable VM properties DynamicMemoryEnabled DynamicMemoryMaximumMB DynamicMemoryBufferPercentage MemoryWeight • New read-only VM properties MemoryAssignedMBUse for getting current memory usage of any VM DynamicMemoryDemandMB DynamicMemoryStatus • Existing VM properties impacted MemoryMBUsed for setting Static memory and Startup memory value. Backward compatibility is maintained.
Dynamic Memory Requirements • Windows Server 2008 R2 SP1 Host • Supported Operating System in the VM • Upgrade Integration Services in the VM Windows Server 2008 R2 SP1 VM VM VM VM VM VM VM VM VM VM VM VM
Configure DM using PowerShell PS C:\> set-vmprod_server -MemoryMB256 -DynamicMemoryEnabled$true -DynamicMemoryMaximumMB 2048 -DynamicMemoryPreferredBufferPercentage15 -MemoryRelativeWeight8000 ... PS C:\> get-help set-vm NAME Get-VM SYNOPSIS Gets virtual machine objects from the Virtual Machine Manager database. ...
How much memory are my VMs using? PS C:\> get-vm| >> ft Name, CurrentMemory Name CurrentMemory ---- ------------- ws03-1 843 prod_server0 rfx-vm1 1280 PS C:\>
RemoteFX in VMMVMs • New VM settings • Default Standard video adapter • New RemoteFX 3D video adapter • Maximum number of monitors: 1,2,3,4 • Max monitor resolution • 1024x768 (4 monitors max) • 1280x1024 (4 monitors max) • 1600x1200 (3 monitors max) • 1920x1200 (2 monitors max) • Additional VM property • GPU ID (PowerShell only) Windows Server 2008 R2 SP1 VM VM VM VM VM VM VM VM VM VM
RemoteFX requirementsVMs • Supported Operating System in the VM • New Integration Services (part of Windows 7 SP1) • Can be combined with Dynamic Memory Windows Server 2008 R2 SP1 VM VM VM VM VM VM VM VM VM VM VM VM
RemoteFX RequirementsHosts • RemoteFX feature enabled under the Remote Desktop Services Role • CPU must support SLAT • One or more GPUs (Graphics Processing Units) that support DirectX 10 • Enough GPU Memory available for max monitors and resolution Windows Server 2008 R2 SP1 VM VM VM VM VM VM VM VM VM VM VM VM
Intelligent Placement – new checks • Use Current Memory footprint for DM VMs • Check for GPU-compatibility when migrating RemoteFX VMs Windows Server 2008 R2 Windows Server 2008 R2 SP1 Windows Server 2008 R2 SP1 VM VM VM VM VM VM VM VM VM VM VM VM VM VM VM VM VM VM VM VM VM VM
Updates to PROPerformance Resource Optimization • PRO ties specific Operations Manager alerts to remediation actions in VMM • VMM PRO Pack load-balance VMs in a cluster when CPU or Memory exceed a threshold • SP1 update to VMM PRO Pack consider Current Memory utilization for DM VMs • PRO depends on Intelligent Placement
Offline Servicing Challenges • Dormant VM’s Miss patch Tuesday • Wakes up to a virus attack • Wakes up and attacks the network • Wakes up and is out of compliance • Enterprises could have hundreds of dormant VM’s offline for extended periods
Virtual Machine Servicing Tool • Automate servicing of dormant VMs • Applying service patches to OS • Applying service patches to Application • Integration of System Center Products • System Center Virtual Machine Manager • System Center Configuration Manager • Windows Server Update Service • Automate updating stored VMs in SCVMM Library • Automate updating stopped VMs on Hosts • Automate True Offline image patching using DISM (Deployment Image Servicing and Management) • Automate Template VHD update
VMST Features • System Center UI framework • Automation of common patching tasks (Move VM, Start VM, Apply Patch, Shutdown VM, etc.) • PowerShell cmdlets • Request update client for an updated policy • Using SDK for SCCM • Using WMI for WSUS • Status reporting (log files – serviced/pass/fail) • Support Win 7, WS08 R2,W2K3, XP, Vista, WS08 VMs • Support for Virtual Server and Hyper-V environments
VMM Configuration Analyzer 2008 R2 • Free Download • Evaluates important configuration settings for computers that either are serving or might serve VMM roles or other VMM functions. • Requires Microsoft Baseline Configuration Analyzer (MBCA). • Scanning Details: • Setup: confirms system requirements and configuration • Checks refresh update intervals • Image Library: checks files consistency • Infrastructure: check key infrastructure data as: • Version of SQL Installed • SQL Configuration • Network bandwidth • DNS and other configurations • Operations Manager Integration components.
Delete VM that cannot be deleted • Verify a connection to the localhost (or a remote machine if applicable) • Get-VMMServer -ComputerNamelocalhost • Replace "VM Name" with the name of the VM as it appears in SCVMM • $VM = Get-VM -Name "VM Name" • Remove-VM -VM $VM -Force • The VM should be deleted successfully and no longer appear in the admin console.
Why “Unsupported Cluster Configuration” Status? The following situations can cause Unsupported Cluster in Virtual Machine Manager.
Best Practices • Refresh the cluster if you add storage • Locate hosts and library servers close to one another • Install VMM Console to get PowerShell additions • Add-PSSnapin “Microsoft.SystemCenter.VirtualMachineManager” • Cluster create/destroy operations happen outside of VMM • Results are unpredictable if you migrate an HA VM that has VMM in it from the VMM Admin Console • Use Failover Cluster Service
And now … Some PowerShell Scripts
Rapid Provisioning Sample Script • PS C:\> Get-VMMServer -ComputerName "VMMServer1.Contoso.com" • PS C:\> $JobGroupID = [Guid]::NewGuid().ToString() • PS C:\> $Template = Get-Template | where {$_.Name -eqMyTemplate"} • PS C:\> $VMHost = Get-VMHost | where {$_.Name -eq "VMHost.Contoso.com"} • PS C:\> Move-VirtualHardDisk -IDE -BUS 0 -LUN 0 -Path "L:\OS.VHD" -JobGroup $JobGroupID • PS C:\> New-VM -Name "VM06" -Path "L:\" -Template $Template -VMHost $VMHost -JobGroup -$JobGroupID -UseLocalVirtualHardDisks
Extracting VM Values from a data file-Sample • # Get the input variables from the files and into the specific script variables • $vmname = $newvalues[0]# The virtual machine name • $computername = $newvalues[1]# The guest OS computer name • $memory = $newvalues[2]# The amount of RAM to allocate to the VM • $OSSKU = $newvalues[3]# The OS name (VMM has these defined) • $ProductID = $newvalues[4]# The Windows Product ID • $description = $newvalues[5]# The virtual machine description • $vmpath = $newvalues[6]# The path in which to create this vm • $vnetworkname = $newvalues[7]# The Virtual Network Name • $hostname = $newvalues[8]# The name of the host on which to create this vm • $cpuvalue = $newvalues[9]# The CPU name (VMM has these defined) • $cpucount = $newvalues[10]# The number of CPUs • $owner = $newvalues[11]# The owner of the VM • $adminpwd = $newvalues[12]# The guest OS administrator password • $templatename = $newvalues[13]# The template name from which to create this vm
Updating IS from Powershell PS C:\> get-vm | >> where {$_.status -eq 'PowerOff'} | >> set-vm –InstallVirtualizationGuestServices$true >>
Manage Advanced CPU Settings • #Connect to the VMM Server • Get-VMMServer -Computername "Tisyamah55.fareast.corp.microsoft.com" • #Specify the VM we need to make changes in • $VM = Get-VM | where {$_.Name -eq "DM-SRV1"} • #Show the current property values • $VM | Select Name, Hostname, CPUMax, CPUReserve • #Specify the advanced CPU Settings. • Set-VM -VM $VM -CPUMax 30 -CPUReserve 5 • #Show the updated Properties • $VM | Select Name, Hostname, CPUMax, CPUReserve
Online Resources • Web: • Http://technet.microsoft.com/scvmm • Http://www.microsoft.com/scvmm • Http://www.microsoft.com/virtualization • SCVMM Team Blogs: • Http://blogs.technet.com/chengw • Http://blogs.technet.com/rakeshm • Http://blogs.technet.com/m2 • http://blogs.technet.com/scvmm • For TAP, visit our program site: • Http://connect.microsoft.com
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.