Benjamin Armstrong 高级项目经理 微软 Session Code: VIR311 部署 Windows Server 2008 Hyper-V and System Center Virtual Machine Manager 2008 最佳实践 Benjamin Armstrong 高级项目经理 微软
目录 讨论Hyper-V部署策略 理解Hyper-V的性能 演示: Hyper-V 讨论SCVMM部署策略 演示: SCVMM 理解如何部署PRO
Hyper V 最佳实践
Windows Server 2008 和Hyper-V 技术 Windows Server 2008 的一个角色(Std, EE, DC) 可以在 Windows Server 2008 完整版和核心版安装 实际应用中可以使用资源使用最小的Server Core 基于Hypervisor的架构 灵活动态的虚拟化解决方案 由Microsoft System Center的一系列产品来管理
Hyper-V 的架构 子分区 Windows hypervisor 9/20/2018 10:29 AM Hyper-V 的架构 父分区 子分区 Provided by: ISV / IHV / OEM Applications Applications Applications WMI Provider OS Microsoft Hyper-V VMMS Applications Microsoft / Citrix (XenSource) User Mode Ring 3 VM Worker Processes Windows Server 2008 Supported Windows OS Windows Kernel VSC Non-Hypervisor Aware OS Xen-Enabled Linux Kernel Linux VSC Hypercall Adapter Windows Kernel VSP IHV Drivers VMBus Kernel Mode Ring 0 VMBus VMBus Emulation Windows hypervisor “Designed for Windows” Server Hardware © 2006 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.
Hyper-V 系统要求 64-Bit 处理器并且有对虚拟化的支持 内存 硬盘 网络 Intel-VT AMD-V 需要基于硬件的数据执行保护Data Execution Prevention (DEP) AMD (NX no execute bit) Intel (XD execute disable) 内存 父分区 1GB 每个虚拟机有 ~21MB 的额外开销 硬盘 父分区 存储VHD的空间 存储VSS snapshots的空间 存储VM snapshots的空间 网络 一张网卡用于父分区的管理 一张或多张用于虚拟机 一张网卡用于iSCSI (可选择)
如何组建一个平衡的系统 存储设备 Windows Server 2008 x64版本 EE/DTC 四个处理器/四核 (共16 核) 内存 AMD-V or Intel VT 内存 每核最低配置2 GB (共32 GB) 每核建议配置4 GB (共64 GB) 存储设备 4Gb光纤通道 网络 1 Gb/E 网卡 用作虚拟机管理/丛集心跳(cluster heartbeat)/虚拟机转移(migration) 1 四口 Gb/E PCI-E 网卡用于虚拟机
Windows Server核心版 Windows Server经常部署为一个单一的角色 Server 核心版是一个最小化的安装 优点 9/20/2018 10:29 AM Windows Server核心版 Windows Server经常部署为一个单一的角色 在以前的Windows Server版本中,必须部署和服务真个操作系统 Server 核心版是一个最小化的安装 提供Server必须的功能 命令行界面,无图形界面 优点 从根本上提高系统的可靠性。 代码少意味着布丁(Patches)少,易于 维护。 减少共计面。 更安全可靠,便于管理。 MICROSOFT CONFIDENTIAL © 2006 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.
Hyper V 存储设备最佳实践
Hyper-V 存储设备最佳实践 性能从最快到最慢 直通硬盘(Pass Through Disks) 固定硬盘(Fixed disk)VHDs/直通硬盘 (Pass Through disk) 性能很相近 动态扩展 VHDs 根据需要增长 不适于在实际生产中使用 直通硬盘(Pass Through Disks) 优点:虚拟机直接写硬盘,不需要通过VHD 缺点: 不能用虚拟机快照(snapshots) 整个硬盘完全给一个虚拟机使用
Hyper-V 存储设备最佳实践 利用MPIO 提供SAN 路径和带宽优势 对于高强度I/O的负载,使用通过硬盘( Pass thru disks) 数据库负载 OLTP/DSS 文件服务器 在宿主机上,使用 ISCSI 达到最佳性能 使用 支持TOE and offload 的硬件 在虚拟机丛集(cluster)中,使用 ISCSI
Hyper V 网络最佳实践
Hyper-V 网络 虚拟机 父分区 Synthetic NIC Legacy NIC 每个虚拟机支持12个网卡 8 synthetic 9/20/2018 Hyper-V 网络 虚拟机 Synthetic NIC Legacy NIC 每个虚拟机支持12个网卡 8 synthetic 4 legacy 速度可达到 10Gb/s 支持VLAN 父分区 虚拟网络邦定到物理网卡 外部 – 决定于系统的网卡数目 内部 – 无限制 私有 – 无限制 只支持以太网卡 Network teaming 支持VLAN Trunking 没有无线网络支持 © 2008 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.
父分区: TCP/IP 属性 父分区局域网的配置 虚拟交换器的配置 9/20/2018 © 2008 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.
Hyper-V 网络配置最佳实践 举例 服务器有四个物理网卡 网卡 1: 用于父分区的管理 网卡 2: 用于父分区的 iSCSI 9/20/2018 Hyper-V 网络配置最佳实践 举例 服务器有四个物理网卡 网卡 1: 用于父分区的管理 网卡 2: 用于父分区的 iSCSI 网卡 3/4: 用于虚拟机网络 © 2008 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.
Hyper-V, Networking & iSCSI 9/20/2018 Hyper-V, Networking & iSCSI © 2008 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.
“Designed for Windows” Server Hardware 9/20/2018 10:29 AM 网络的流程 Parent Partition Child Partitions VM Service WMI Provider VM Worker Processes Applications Applications Applications User Mode Windows Server 2008 VM 1 VM 2 VM 3 Windows Kernel VSC Windows Kernel VSC Linux Kernel VSC VSP Kernel Mode VMBus VMBus VMBus VMBus Windows hypervisor “Designed for Windows” Server Hardware Mgmt NIC 1 iSCSI NIC 2 VSwitch 1 NIC 3 VSwitch 2 NIC 4 MICROSOFT CONFIDENTIAL © 2007 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.
虚拟化和高可用性
Microsoft Hyper-V 快速转移 解决计划中或意外的停机 计划中的停机 快速的转移虚拟机以维护硬件 比意外的停机更常见 意外的停机 自动转移到别的节点 (硬件或电源故障) 不经常出现,更难处理
快速转移的基本过程:计划中的停机 保存状态 转移虚拟机 恢复状态并开始运行 保存真个虚拟机状态 移存储设备的连接从一台宿主机转移到另外一台 恢复虚拟机状态并开始运行 VHDs Shared Storage Network Connectivity
快速转移中的存储设备的最佳实践 丛集中的直通硬盘(Pass-through Disks) 提供更好的 I/O 性能 虚拟机配置文件和虚拟机文件分离 创建共享文件加来存储虚拟机的配置文件。 基于VHD 给每个虚拟机一个逻辑存储单元(LUN )--这是最佳选择。 一个逻辑存储单元(LUN)上有多个虚拟机,但是所有的故障转移备份在另一个单元 第三方的解决方案:一个逻辑单元上运行多个虚拟机并有更细化的故障转移
快速转移中的存储设备的最佳实践 SAN/iSCSI 利用多路IO(MPIO)来解决路径的可用性和提高I/O 的产量 使用GUID ID,而不是驱动盘符来提供虚拟机的存储设备 \\?\<GUID>\ 使用Mountvol.exe 找到使用的LUN GUID
在线转移 会在Windows Server 2008 R2发布 允许转移虚拟机而没有网络停机时间 建立与Windows 故障转移丛集(Failover Clustering) 高可用性和移动性 现有的对丛集的投资可以用于使用这项技术
Hyper V 备份
Hyper-V 备份最佳实践 确保你的备份支持 VSS 虚拟机备份最佳实践 9/20/2018 Hyper-V 备份最佳实践 确保你的备份支持 VSS 在Hyper V中支持VSS writer 虚拟机备份最佳实践 利用Hyper V 的VSS writer 在线对虚拟机快照 System Center 数据保护管理 (Data Protection Manager) 提供Hyper V VSS 快照 快速恢复虚拟机 复制快照到备份的服务器 © 2008 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.
Hyper-V 备份最佳实践 安装 KB956697 解决VSS 备份在虚拟机配置文件不存在时停止工作的问题 http://support.microsoft.com/default.aspx/kb/956697
Hyper V 的性能
Hyper-V 的性能 对性能需要理解的几个问题 虚拟处理器不邦定在物理处理器 物理内存的使用包括所有虚拟机的内存 父分区也是一个虚拟机 9/20/2018 Hyper-V 的性能 对性能需要理解的几个问题 虚拟处理器不邦定在物理处理器 物理内存的使用包括所有虚拟机的内存 父分区1GB + 虚拟机的内存 +21MB的额外开销 父分区也是一个虚拟机 只运行系统应用程序 (备份,防病毒) 用新的性能计数器(Performance Counter)来测量Hyper V 和虚拟机的性能 29 关于Hypervisor 的performance counters © 2008 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.
Hyper-V 的性能 测量处理器的使用 测量宿主机处理器的使用 测量虚拟机的处理器使用 9/20/2018 Hyper-V 的性能 测量处理器的使用 测量宿主机处理器的使用 Hyper-V Hypervisor Logical Processor(*)\% Total Run Time: The percentage of time spent by the processor in guest and hypervisor code. 测量虚拟机的处理器使用 \HyperVisor Hyper-V Logical Processors(*)\% Guest Run Time: © 2008 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.
Hyper-V的性能 测量内存的使用 测量宿主机的可用内存: 对于虚拟机,使用同样的方法 9/20/2018 Hyper-V的性能 测量内存的使用 测量宿主机的可用内存: \Memory\Available MBytes: Available MBytes is the amount of physical memory available to processes running on the computer, in Megabytes. 对于虚拟机,使用同样的方法 © 2008 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.
演示 Hyper-V Benjamin Armstrong Senior Program Manager Lead Microsoft
SCVMM 部署最佳实践
VMM 2008 的架构 Management Interfaces SAN Storage Connector 9/20/2018 10:29 AM VMM 2008 的架构 Administrator’s Console Self Service Web Portal Operator’s Console Web Console Windows PowerShell Windows® PowerShell Connector Virtual Machine Manager Server Operations Manager Server Management Interfaces VMM Library Server VM Template ISO Script VHD VM VMware VI3 Virtual Center Server VM VM ESX Host VM VM VM SAN Storage Microsoft Management Summit 2007, March 26-30, 2007, San Diego, California© 2007 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.
VMM 2008 的系统要求 VMM 2008 Server 需要 Windows Server 2008 x64的安装 PowerShell 必须在安装前加入 VMM 2008 Console 可以在Windows Server 2003, Windows Vista, and Windows Server 2008 x86/x64安装 非Windows Server 2008 的安装需要先安装PowerShell 1.0 VMM 2008 代理(Agent)安装在 在Windows Server 2003/2008 Windows Server 2008 的安转需要本地 WinRM
VMM 2008 的安装 由于安全原因,VMM 2008 Server 需要 Active Directory. 可以管理没有AD 的计算机, 但需要AD 才能安装 每个 VMM 2008 的组件可以单独安装,或全部装在同一服务器 VMM 2008 可以在虚拟机内运行 注意鸡和蛋的问题 (需要Server Manager 来启动运行VMM 的虚拟机)
VMM 2008 的可扩展性 每个VMM Server 支持400 台宿主机8000台虚拟机 数据中心VMM 最佳实践 根据地理位置分割系统管理 在宿主机附近创立库服务器(library servers ) 在分支办公室,可以将库服务器装载在宿主机操作系统。 分配不同的磁盘用于I/O 库服务器的复制 VMM 本身没有 复制工能 利用分布式文件系统的复制功能( DFS-R) 第三方复制工具 (Doubletake)
演示 VMM 2008 Benjamin Armstrong Senior Program Manager Lead Microsoft
宿主机和丛集的配置 远端安装Hyper-V 或Virtual Server 简化Hyper-V 宿主机丛集的管理 Virtual Server 可以在Windows Server 2003 上安装, 但是 WinRM 必须先安装在宿主机上。 简化Hyper-V 宿主机丛集的管理 一步添加真个Hyper-V 宿主机丛集 丛集必须在VMM之外创立 自己动检测节点的加入或去除 管理用于Hyper-V的Windows Server 2008 故障转移丛集(Failover clusters ) 规定在高可用虚拟机(HA VM)正常运行情况下故障节点的数目 智能规划保证西创立的高可用虚拟机不会让丛集超负载 节点失败出发负载的重新计算
虚拟机的部署和丛集的预留(Placement and Cluster Reserve) Cluster reserve = 1 node Can the cluster sustain 1 node failure? YES Place the VM Clustered Host 1 Clustered Host 2 Clustered Host 3
虚拟化和知识的聚合 Knowledge Here
性能和资源的优化 (PRO) 根据负载和应用程序进行资源优化 可以通过Operations Manager 2007 MP 进行扩展 创立政策使VMM 自动或人工地对系统变化进行反应 可以被用于Vmware和Microsoft 系统 利用PRO 最大限度的利用系统资源
性能和资源的优化(PRO)
PRO – 首次使用 Hyper-V and VMware 系统的性能 VM 的正确配置 可扩展的架构… 处理器和内存 9/20/2018 10:29 AM PRO – 首次使用 Hyper-V and VMware 系统的性能 处理器和内存 VM 的正确配置 可扩展的架构… © 2007 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.
疑问和解答
参考资料 Windows Server 2008 with Hyper-V Microsoft Hyper-V Server 2008 http://www.microsoft.com/windowsserver2008/en/us/hyperv.aspx Microsoft Hyper-V Server 2008 http://www.microsoft.com/servers/hyper-v-server/default.mspx System Center Virtual Machine Manager http://www.microsoft.com/systemcenter/virtualmachinemanager/en/us/default.aspx Virtual PC Guy http://blogs.msdn.com/Virtual_PC_Guy/
感谢您参与此会场! 您的意见与建议对我们非常重要。 请您填写反馈表。
© 2008 Microsoft Corporation. All rights reserved © 2008 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.