Building Clouds with Windows Azure Pack
上QQ阅读APP看书,第一时间看更新

Hyper-V deployment best practices

Hypervisor is the core foundation of WAP-based cloud infrastructure as every virtual machine including management workload VMs such as WAP admin/tenant portal VM, SCVMM, SPF will be running inside a VM on Hyper-V host only. Let's have a look at a few of the deployment best practices of Hyper-V Server.

It is recommended to maintain symmetry in terms of configuration, best practices applied across all Hyper-V hosts. SCVMM and AD group policies can be used to configure and manage Hyper-V configurations and policies across all the hosts.

Centralized management is the key element in every cloud solution.

Hyper-V installation best practices

Though Windows Server 2012 R2 Hyper-V installation is quite straightforward. It's recommended to follow best practices of Hyper-V installation for a smooth and stable virtualized infrastructure.

Best practices for hypervisor installation are as follows:

  • Supported hardware and latest hardware firmware: It is recommended to use supported hardware for proven performance and stability. Always ensure to update the firmware of the server's hardware or chassis or blades as applicable.
  • Install OS using hardware vendor provided tools: Major server hardware vendors provide their proprietary tools for installing operating system such as HP intelligent provisioning. This ensures that the hypervisor is deployed with proper hardware-specific drivers and integration tools.
  • Choose correct deployment option: In a cloud infrastructure, it is recommended to use the Server Core version to utilize the benefits of the Server Core deployment, such as less disk footprint and attack surface, which reduces management and updates burden. If you deploy the Server with GUI, it is advised to remove all unnecessary components.
  • Latest device drivers: Use the latest device drivers for hardware devices regardless of the proprietary and commodity hardware.
  • Windows updates: Ensure to update the hypervisor with the latest patches and service packs that are available. It is recommended to have patch management solutions deployed for ensuring the continuous deployment of the latest hot fixes.
  • Page file: Hyper-V server automatically manages page file size as per the physical memory that is installed in the system. It should be set to System Managed.
  • Windows firewall: Configure Windows firewall rules as per environmental requirements. An organization may choose to disable the firewall if the port level access is being managed by network firewalls.
  • Hypervisor hardening and VA: Apply standard security policies as per the organization's defined standard. Perform necessary vulnerability assessments and remediation as per the organization's policies.
  • Naming convention and domain: Ensure to follow the proper hostname convention and join the domain wherever applicable. For cluster nodes, it is required to join hosts to the domain.

Hyper-V networking best practices

Best practices for Hyper-V networking are as follows:

  • Separate network for Hyper-V and VM network traffic: A separate physical and logical network should be considered for management traffic such as host management and live migration, and another for virtual machine traffic as per the VM network zone such as internal, DMZ, and so on.
  • Configure redundancy at physical network path: Configure at least two NIC adaptors connecting to two different network switch in each network team. Ensure not to have any single point of failure.
  • Configure teaming and load balancing policies: Windows Server 2012 /R2 provides multiple load balancing policies(Hyper-V port, address hash, dynamic balancing, and so on) which provides maximum performance and reliability for Hyper-V network. Ensure to configure proper NIC teaming load balancing policies.
  • Separate network for IP storage traffic: It is recommended to use a separate physical and logical network for IP based storage traffic such as iSCSI, SMB, and so on.
  • Implement network QoS: Use the Hyper-V network Quality of Service (QoS) feature to ensure that no single VM becomes the network bandwidth constraints for other VMs. It becomes important to implement QOD in a WAP-based cloud solution to ensure providing request network bandwidth to tenants' virtual machines as per their plan and subscription.
  • Monitor network usage: Monitor Hyper-V network virtualization continuously to plan to get insight of network usage and plan for future scalability.
  • Use SDN (Software Defined Networking): This is not a Hyper-V networking best practice, but looking at cloud solution using SDN, aka network virtualization, can enable automated provisioning, management and flexibilities for cloud networking.

Hyper-V storage deployment best practices

Best practices for Hyper-V storage deployment are as follows:

  • Ensure redundancy for storage path: Use multipath IO for storage paths. Eliminate any single point of failure at server port, storage port, or SAN switch and so on. Configure multipathing policies as per SAN provider guidelines for reliability and efficiency.
  • Using vhdx: New virtual disk file format that is vhdx was introduced with Windows Server 2012. VHD provides multiple benefits over older format VHD in terms of performance and reliability. Use vhdx instead of vhd unless exceptionally required.
  • Size volumes and CSV properly: Sizing workload VMs is important in terms of capacity and IOPS. Oversized volumes may cause performance and outage issues.
  • Implement storage QoS: Use Hyper-V storage quality of service feature to ensure that no single VM becomes the storage performance constraints for other VMs with respect to IOPS. It is a must for a WAP-based cloud solution to ensure providing requested storage IOPS to tenants' virtual machines as per their plan and subscription.
  • Monitor storage usage: Monitor Hyper-V storage continuously for capacity and performance to plan to get insight of network usage and plan for future scalability.
  • Use SDS/SMI-S/SMP integrations: This is not a Hyper-V storage best practice, but from a cloud prospective it is recommended to use SDS (Software Defined Storage), SMI-S provider array integration for better provisioning, management and automation for cloud storage.

Hyper-V virtual machine deployment best practices

Best practices for Hyper-V virtual machine deployment are as follows:

  • Properly sizing of VM Compute: A greater number of virtual CPUs doesn't guarantee more performance, assign CPUs to VMs as per actual application requirements. The same goes for memory. Ensure not to oversize or undersize virtual machines.
  • Use Generation-2 VM: Generation 2 VMs provide multiple features over Generation-1 VMs such as UEFI boot, synthetic hardware, faster installation and booting time and more. It is recommended to use Generation-2 VMs unless specifically required.
  • Use dynamic memory: It is recommended to use dynamic memory to make the most out of physical RAM available in your server. Using dynamic memory in a large cloud environment can help in increasing host density. It is recommended to plan carefully while using dynamic memory to avoid any performance hit on any of the virtual machines or hosts.
  • Use non-uniform memory access (NUMA) if supported: NUMA helps virtual machines having multiple virtual CPUs assigned to scale and perform better by facilitating it to use local cache and memory bus of the CPU executing its instruction. NUMA is dependent upon hardware architecture.
  • Remove unused virtual hardware: It's recommended to use unused virtual hardware such as a floppy drive and so on.
  • Use proper integration services: Integration service are installed inside guest operating systems to make those virtualization aware and avail features such as graceful shutdown from Hyper-V manager, time sync, data exchange and so on. All the latest Windows operating systems by default include integration service, for non-Windows OS it may be required to manually install integration services.
  • Monitor virtual machine usage: Monitor VM usage continuously for compute and take necessary corrective action for oversized and undersized virtual machines.

Hyper-V cluster and mobility deployment best practices

Best practices for Hyper-V cluster and mobility deployment are as follows:

  • Cluster Validation Report: Microsoft Windows' failover cluster provides features to examine the nodes with respect to Hyper-V configuration, inventory, network, storage and system configuration before deploying a cluster. Any error or warning produced by validation check should be remediated with the necessary corrective actions. Successfully validated cluster is the key to smooth Hyper-V HA functionalities.
  • Use SCVMM to deploy and manage highly available virtual machines: This isn't particularly related to Hyper-V cluster best practice, but for a cloud solution it is recommended to deploy and manage Hyper-V cluster and mobility via SCVMM.
  • Use separate network for live migration: It is recommended to use separate physical and logical network live migration traffic for reliability and performance.
  • Cluster Aware Updating: It is recommended to use CAU for patching and upgrading cluster nodes. With this organizations and service providers can ensure no outages to end customers during the patching of hypervisors. WSUS can be integrated with VMM to automate updates to Hyper-V hosts.