Overview
The objective of this Guide is help Customers and/or Pure SEs quickly configure a Microsoft Windows Server 2019, or newer, Hyper-V environment for testing. Both manual configuration guidance and automation scripts are provided.
There are 2 optional sections, System Center Virtual Machine Manager (Step 2a - SCVMM Prerequisites (optional)) and Step 4a - Hyper-V Failover Cluster configuration (optional), which can be used if either are planned to be part of the environment. SCVMM can be used to manage Hyper-V clusters, provision storage, and create VM templates. It integrates to the Pure FlashArray through SMI-S. Standalone Hyper-V Servers are less complex, and may be deployed if the intent is just to provide one or more Hypervisors to deploy load generating VMs to test the FlashArray. This configuration would not involve Failover Clustering, so VMs could not be easily migrated. Failover Clustering is more complicated to configure, and provides high availability to virtual machines that are configured as highly available. These VMs can be live migrated, and failed over during any failure test cases.
This guide does not take into consideration environments with multiple Server NICs, DHCP, or complex networking configurations such as teaming or VLANs in order to keep the guide concise. If such complexity applies to the lab environment, be sure to manually configure the network cards, virtual switches, and note the DHCP IP Addresses on the Servers and VMs. These IP Addresses will be used as inputs if the automation scripts are used.
The Microsoft ISO files will need to be acquired by the Customer, from Microsoft. Manual steps that can be copied, edited, and pasted into PowerShell accompany each section. Automation leveraging the provided script package is outlined in the Hyper-V POC Automation Guide Appendix.
Step 1 – Gather the Prerequisites
- On the 3 physical servers:
- Install Windows Server 2019 Datacenter GUI Note: Server Core can be used but is not shown.
- Configure with static IP Addresses.
- Connect to the Flash Array with Fibre Channel or iSCSI.
- If Fibre Channel, configure Zones on the fabric for Fibre Channel connectivity between the Servers and FlashArray.
- If iSCSI, configure the Setup iSCSI on Windows Server.
- On the FlashArray, create a Host, add the IQN/WWN to the Host, and then create and connect a Pure Volume to each physical server. See Create a Pure Host or Host Group for Pure PowerShell SDK Examples.
- If a Failover Cluster is being used for Server2 & Server3, be sure to create a Host Group on the FlashArray and place the 2 Hosts in the Host Group. Only 1 Pure Volume is required and should be added to the Host Group. This volume will be configured as a Cluster Shared Volume (CSV).
- On Server1, format the Pure Volume and assign the drive letter ‘D’.
- Create a folder called ‘share’ on the root of the Pure volume ‘D:\’ using the Administrative Tools in Windows, and create an SMB share as ‘share’. See Find the Pure Volume on the Physical Server for Examples. Place automation scripts and the following files in the 'D:\share' folder:
- Windows Server 2019 ISO
- IO tool of choice (optional: Diskspd for Windows is included in Pure-HyperV-Script.zip)
- (PowerShell automation Scripts) Extract to d:\share
- If the Servers will not have Internet Access download the following and place in d:\share
- Everpure Hyper-V PoC Automation Guide
- Everpure Hyper-V PoC Automation Guide
- Create a folder called ‘share’ on the root of the Pure volume ‘D:\’ using the Administrative Tools in Windows, and create an SMB share as ‘share’. See Find the Pure Volume on the Physical Server for Examples. Place automation scripts and the following files in the 'D:\share' folder:
- SCVMM Deployment (optional)
- Enable the System Center Virtual Machine Manager. See Enable SMI-S on the FlashArray for an Example.
- SCVMM 2019 ISO
- SQL Server 2016 ISO (SCVMM2019 supports many versions of SQL Server, UR1 required for SQL2017, UR2 required for SQL2019)
- Windows Assessment and Deployment Kit (ADK)
- Windows PE add-on for the ADK
Step 2 - Install Prerequisites for all physical servers
- Enable the Hyper-V role on all of the Windows 2019 servers and restart the server using PowerShell as an administrator or use Server Manager.
Install-WindowsFeature Hyper-V -IncludeManagementTools Get-WindowsFeature Hyper-V - Create a vSwitch named 'VMswitch’ in the Hyper-V Virtual Switch Manager and map it to the physical NIC adapter for VM communication.
Create a Virtual Switch in PowerShell Example:
Get-NetAdapter $net = Get-NetAdapter -Name 'Pick_the_management_network_Adapter' New-VMSwitch -Name "VMSwitch" -AllowManagementOS $True -NetAdapterName $net.NameNote: If the VMSwitch is placed on the MGMT NIC, it will remove the MGMT IP breaking your connection. The MGMT IP will have to be added to the virtual switch through KVM.
The above "Ethernet 5 Properties" shows how IPv4/IPv6 is now unchecked after creating the Virtual Switch on Ethernet Interface #5.
The above image shows how the new Virtual Switch "vmvswitch" needs to be manually configured with the server's static IP.
- For Multipath-IO, add the Pure FlashArray to the MPIO settings.
Install-WindowsFeature Multipath-IO -IncludeManagementTools New-MSDSMSupportedHw -VendorId PURE -ProductId FlashArray Remove-MSDSMSupportedHw -VendorId 'Vendor*' -ProductId 'Product*' Set-MPIOSetting -NewPathRecoveryInterval 20 -CustomPathRecovery Enabled -NewPDORemovePeriod 30 -NewDiskTimeout 60 -NewPathVerificationState Enabled - Turn off firewall settings for the network.
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False - Reboot the servers
Step 2a - SCVMM Prerequisites (optional)
SCVMM requires components that are included in the Windows Assessment and Deployment Kit (ADK), and Windows PE addon to the ADK. After downloading the ADK and WINPE addon installers they must be run so that the entire package can be downloaded. Run these installer files from Server1 and select DOWNLOAD. Set the download path to the D:\share in the adk and adkwinpe subfolders. This should be done before Step3 as the automation3.ps1 script will copy these files to the SCVMM VM's VHDx before creating the VM.
- Run adksetup.exe and set the Download Path to the share, d:\share\adk, on Server1.
- Run adkwinpesetup.exe and set the Download Path to the share, d:\share\adkwinpe, on Server1.
- Extract the SCVMM files from the ISO. Execute the ISO which will mount it and open Windows File Manager. Execute the SCVMM_2019.EXE file and extract to d:\share\vmm2019, on Server1.
Step 3 - Infrastructure VM Configuration
Create Golden VHDx Image
-
Run the following to create a Golden VHDX image from the Windows Server 2019 ISO File. Running the script will open a file browser window. Browse to the Windows Server 2019 ISO, which should be in the same directory as the script, the d:\share on Server1. This will create a Gold.VHDX file in the d:\share folder. This Gold.VHDx image will be modified and copied for each provisioned VM setting the hostname and password. Variables that can be easily changed are located in variables.ps1.
./create-vhxd.ps1 -
Next run the automation.ps1 and let it run for 40 minutes. If excluding SCVMM run the automation2.ps1 script.
.automation3.ps1or.automation2.ps1What follows is the manual execution of each subscript.
VM2 – Diskspd
Diskspd was chosen for this document as it is easy to configure and automate. Other tools can be used, such as Iometer or VDBench.
Diskspd can be run on VM2 to provide IO load in order to test failure test cases and ensure configuration errors are identified. If more load is required, provision more Pure Volumes and connect them to the Host or Host Group and copy VM2 to multiple Pure Volumes. Some sample command lines for Diskspd are located in the Git repo. Diskspd.exe is located in the root of the C:\ drive on the VM. What follows is an example diskspd configuration that is 100% 4k Read IO:
diskspd -c2G -b4K -r -o1 -W60 -d60 -Sh testfile.dat
Step 4 - Server2 & Server3 Configuration
If SCVMM is not being deployed, the physical servers only need to be joined to the domain if Server2 and Server3 are being configured as a Failover Cluster.
- Set DNS to the AD virtual machine's (VM1) IP Address.
$wmi = Get-WmiObject win32_networkadapterconfiguration | where {($_.IPEnabled -eq "True")} Set-DnsClientServerAddress -InterfaceIndex $wmi.InterfaceIndex -ServerAddresses <AD-VM-IP> - Add the servers to the created AD domain with the provided script.
./join-domain.ps1 server2 ./join-domain.ps1 server3 - Alternatively, login to Server2 or Server3 and join the domain in the Gui or the following powershell:
Add-Computer -DomainName <domain> -Credential <domain>\administrator
Restart-Computer
Step 4a - Hyper-V Failover Cluster configuration (optional)
-
Make sure the physical servers (Server2 & Server3) are joined to the domain before creating a Failover Cluster. A new Cluster IP will need to be provided
Install-WindowsFeature -ComputerName Server2 –Name Failover-Clustering –IncludeManagementTools Install-WindowsFeature -ComputerName Server3 –Name Failover-Clustering –IncludeManagementTools Test-Cluster –Node Server2, Server3 New-Cluster –Name PureCluster –Node Server2, Server3 –StaticAddress <ClusterIP> - If you did not make the Pure Volume for the cluster a unique size, and you don't want to add all available disks to the cluster, follow the directions in the sectionFind the Pure Volume on the Physical Server in the Appendix.
- Add a Pure Volume as a clustered disk.
#add all available disks Get-ClusterAvailableDisk | Add-ClusterDisk #Alternatively - add a specific disk Get-Disk -Number 11 | Add-ClusterDisk - If placing VM's on the clustered disk, promote the clustered disk to a Cluster Shared Volume (CSV). The cluster disk name is assigned after adding a disk to the cluster in the previous command.
Add-ClusterSharedVolume -Name "Cluster Disk 4"