VMFleet 2.0 - Quick Start Guide

Published Oct 07 2021 04:05 PM 746 Views
Microsoft

Written by Jason Yi, PM on the Azure Edge & Platform team at Microsoft. 

 

Introduction

As we introduce the new generation VMFleet, we also want to provide a quick how to guide to help you quickly get started! Today we will cover 2 paths you can take: using the traditional and customized VMFleet test vs using the new pre-defined workload profile. Let’s dive in.

 

From Setup to Start-FleetSweep

This is the traditional path of setting up VMFleet and running it using your desired DiskSpd parameters/flags.

 

Prerequisites

Before we begin setting up VMFleet, there are a few prerequisites that you should have ready.

  • Ensure that you have 1 CSV per node
    • Within Storage Spaces Direct, CPU usage is based on the host. Therefore, it is recommended that you split the storage load by creating as many CSVs as there are host nodes. We can go ahead and create a CSV per node in the cluster.
    • You may run the following:
Get-ClusterNode |% {
    New-Volume -StoragePoolFriendlyName S2D* -FriendlyName $_ -FileSystem CSVFS_ReFS -Size <DESIRED SIZE>
}
  • Ensure that you create a “collect” volume.
    • You may run the following:
New-Volume -StoragePoolFriendlyName S2D* -FriendlyName collect -FileSystem CSVFS_ReFS -Size 200GB
  • If you have ran VMFleet in the past, please ensure that prior VMFleet directories are completely removed from existing volumes.
  • Retrieve or install a Server Core VHDX file. If you do not have one handy, we can create a new one by following the below instructions.
    • Download WS2019 Server Core ISO from the public website.
    • Open Hyper-V Manager.
    • Click “New”, then “Virtual Machine”.
    • Navigate through the prompts and pick a location to store your VM.
    • Once your VM is created, boot up the VM and follow the instructions. This is where you will decide your VM password, or what we will later call, “adminpass”.
      • This is important as we will use this later, so make sure you write this down.
    • Log out of the VM, and navigate to where you stored your VM. You should find a “Virtual Hard Disks” folder. Inside, you should find your new Server Core VHDX file.
    • Rename it to “Gold.vhdx”.
    • Copy or move the file to the cluster environment that you want to run VMFleet in.
    • Done!

Deployment

  1. First, we need to install the new PowerShell Module from the PowerShell Gallery and then load it into our terminal. Run the following:
Install-Module -Name “VMFleet”
Import-Module VMFleet
  • Sanity Check:
    • Run "Get-Module VMFleet" to confirm the module exists.
    • Run "Get-Command -Module VMFleet" to obtain a list of functions included in the module.
  1. We will now set up the directory structure within the “Collect” CSV created earlier. Run "Install-Fleet"
  • This creates the necessary VMFleet directories which include:
    1.  Collect/control
      • Contains the scripts that the Virtual Machines continuously monitor.
      • Control.ps1: the control script the VMs use to implement the control loop (what used to be called “master.ps1”).
      • Run.ps1: The VMs continuously look for the most recent version of run.ps1 and runs the newly updated script (parameters).
    2.  Collect/flag
      • Location where the control script drops the “go”, “pause”, and “done” flag files. Users should not need to look at these files.
    3. Collect/result
      • Location of the output files from the VMFleet test run.
    4.  Collect/tools
      • DiskSpd will be preinstalled in this folder.
      • Note: Please move the VHDX file into this collect folder. CSV Cache is also turned off by default.
  1. We will now create our “fleet” of VMs by running:
New-Fleet -basevhd <PATH TO VHDX> -vms [ENTER_NUM_VMS] -adminpass [ENTER_ADMINPASS] -connectuser [ENTER_NODE_USER] -connectpass [ENTER_NODE_PASS]
  • "adminpass" is the administrator password for the Server Core Image. This is the password you set on your Virtual Machine earlier.
  • "connectuser" is a domain account with access to the cluster.
  • "connectpass " is the password for the above domain account.
  • "vms" is the number of VM's to create per node.
    • If this parameter is not provided, the default is a 1:1 subscription ratio where the Number of VMs = Number of physical cores.
  1. [Optional] You can consider modifying the VM hardware configuration. Run
Set-Fleet -ProcessorCount 1 -MemoryStartupBytes 2gb -MemoryMaximumBytes 2gb -MemoryMinimumBytes 2gb

Note:

  • If you specify “MemoryMaximumBytes”, you must specify “MemoryMinimumBytes”, which implies that your VMs will have dynamic memory.
  • If you omit “MemoryMaximumBytes” or “MemoryMinimumBytes”, it implies that your VMs will have static memory.
    • If MemoryStartupBytes = MemoryMinimumBytes = MemoryMaximumBytes, that also denotes static memory.
  • “MemoryStartupBytes” is a mandatory parameter.
  • It is recommended that the number of vCPUs should not exceed the number of logical processors. If you would like more information, refer to this: Understanding and using Hyper-V hypervisor scheduler types | Microsoft Docs

Start Running VMFleet!

  1. Open 2 PowerShell terminals. In the first one, run Watch-Cluster and in the second one, run Start-Fleet. This second function will turn on all the VMs in a “paused” state.
  2. At this point you can run Start-FleetSweep [ENTER_PARAMETERS] or take this time to explore and run any of the other functions!
    • Here is a sample sweep command to help you get started: "Start-FleetSweep -b 4 -t 8 -o 8 -w 0 -d 300 -p r"
  3. Done!

Aftermath

Once you are done running VMFleet you can run Stop-Fleet to shut down all the virtual machines or run Remove-Fleet to completely delete all the virtual machines on your environment.

 

From Setup to Measure-FleetCoreWorkload

This is a new workflow for setting up VMFleet and the predefined profile workloads (General, Peak, VDI, SQL).

 

Prerequisites

Before we begin setting up VMFleet, there are a few prerequisites that you should have ready.

  • Ensure that you have 1 CSV per node
    • Within Storage Spaces Direct, CPU usage is based on the host. Therefore, it is recommended that you split the storage load by creating as many CSVs as there are host nodes. We can go ahead and create a CSV per node in the cluster.
    • In order to be precise about the CSV size, please use our new VMFleet command: "Get-FleetVolumeEstimate"
      • This will output a prescribed CSV size based on different resiliency types. We recommend you select a 2-way mirrored value or 3-way mirrored value depending on your node count.
  • You may run the following: (use the CSV size from Get-FleetVolumeEstimate)
Get-ClusterNode |% {
    New-Volume -StoragePoolFriendlyName S2D* -FriendlyName $_ -FileSystem CSVFS_ReFS -Size <DESIRED SIZE>
}
  • Ensure that you create a “collect” volume.
    • You may run the following:
New-Volume -StoragePoolFriendlyName S2D* -FriendlyName collect -FileSystem CSVFS_ReFS -Size 200GB
  • If you have ran VMFleet in the past, please ensure that prior VMFleet directories are completely removed from existing volumes.
  • Retrieve or install a Server Core VHDX file. If you do not have one handy, we can create a new one by following the below instructions.
    • Download WS2019 Server Core ISO from the public website.
    • Open Hyper-V Manager.
    • Click “New”, then “Virtual Machine”.
    • Navigate through the prompts and pick a location to store your VM.
    • Once your VM is created, boot up the VM and follow the instructions. This is where you will decide your VM password, or what we will later call, “adminpass”.
      • This is important as we will use this later, so make sure you write this down.
    • Log out of the VM, and navigate to where you stored your VM. You should find a “Virtual Hard Disks” folder. Inside, you should find your new Server Core VHDX file.
    • Rename it to “Gold.vhdx”.
    • Copy or move the file to the cluster environment that you want to run VMFleet in.
    • Done!

Deployment

  1. Let’s begin deploying VMFleet. First, we need to install the new PowerShell Module from the PowerShell Gallery and then load it into the terminal. Run the following:
Install-Module -Name “VMFleet”
Import-Module VMFleet

 

  • Sanity Check:
    • Run "Get-Module VMFleet" to confirm the module exists.
    • Run "Get-Command -Module VMFleet" to obtain a list of commands included in the module.

     2. We will now set up the directory structure within the “Collect” CSV that we created earlier. Run "Install-Fleet"

  • This creates the necessary VMFleet directories which include:

     3. We will now create our “fleet” of VMs by running:

New-Fleet -basevhd <PATH TO VHDX> -adminpass [ENTER_ADMINPASS] -connectuser [ENTER_NODE_USER] -connectpass [ENTER_NODE_PASS]
  • "adminpass" is the administrator password for the Server Core Image. This is the password you set on your Virtual Machine earlier.
  • "connectuser" is a domain account with access to the cluster.
  • "connectpass " is the password for the above domain account.
  • "vms" is the number of VM's to create per node.
    • Please do not provide this parameter, we will use our default subscription ratio of 1:1. Number of VMs = Number of physical cores.

     4. Measure-FleetCoreWorkload also collects diagnostic data (Get-SDDCDiagnosticInfo). Therefore, before running the command, we must also install the NuGet Package if you have not previously done so. In doing so, we also need to temporairly set the PSGallery as a trusted repository source (Note: This will temporarily relax the security boundary). 

$repo = Get-PSRepository -Name PSGallery
if ($null -eq $repo) { Write-Host "The PSGallery is not configured on this system, please address this before continuing" }
else {
    if ($repo.InstallationPolicy -ne 'Trusted') {
        Write-Host "Setting the PSGallery repository to Trusted, original InstallationPolicy: $($repo.InstallationPolicy)"
        Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
    } 

    ### Installing the pre-requisite modules

    Install-PackageProvider NuGet -Force
    Install-Module -Name PrivateCloud.DiagnosticInfo -Force
    Install-Module -Name MSFT.Network.Diag -Force

    if ($repo.InstallationPolicy -ne 'Trusted') {
        Write-Host "Resetting the PSGallery repository to $($repo.InstallationPolicy)"
        Set-PSRepository -Name PSGallery -InstallationPolicy $repo.InstallationPolicy
    } 
}  

Run Measure-FleetCoreWorkload!

     5. We can now run Measure-FleetCoreWorkload. Running the command below will automatically run all 4 workloads (General, Peak, VDI, SQL) and place the individual outputs in the result directory. IMPORTANT: If you plan on running another test, please clear the result directory.

Measure-FleetCoreWorkload

     6. Congratulations! You’re done! All you need to do is wait for the test to complete.

  • Note: If you ever run into an error and need to rerun Measure-FleetCoreWorkload, don’t be afraid to do so! It is smart enough to pick up from where it last stopped and continue the test without starting from scratch.
%3CLINGO-SUB%20id%3D%22lingo-sub-2824778%22%20slang%3D%22en-US%22%3EVMFleet%202.0%20-%20Quick%20Start%20Guide%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2824778%22%20slang%3D%22en-US%22%3E%3CP%3E%3CEM%3EWritten%20by%20Jason%20Yi%2C%20PM%20on%20the%20Azure%20Edge%20%26amp%3B%20Platform%20team%20at%20Microsoft.%26nbsp%3B%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH1%20id%3D%22toc-hId-1470365871%22%20id%3D%22toc-hId-1470365931%22%3EIntroduction%3C%2FH1%3E%0A%3CP%3EAs%20we%20introduce%20the%20new%20generation%20VMFleet%2C%20we%20also%20want%20to%20provide%20a%20quick%20how%20to%20guide%20to%20help%20you%20quickly%20get%20started!%20Today%20we%20will%20cover%202%20paths%20you%20can%20take%3A%20using%20the%20traditional%20and%20customized%20VMFleet%20test%20vs%20using%20the%20new%20pre-defined%20workload%20profile.%20Let%E2%80%99s%20dive%20in.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH1%20id%3D%22toc-hId--337088592%22%20id%3D%22toc-hId--337088532%22%3EFrom%20Setup%20to%20Start-FleetSweep%3C%2FH1%3E%0A%3CP%3EThis%20is%20the%20traditional%20path%20of%20setting%20up%20VMFleet%20and%20running%20it%20using%20your%20desired%20DiskSpd%20parameters%2Fflags.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-353472882%22%20id%3D%22toc-hId-353472942%22%3EPrerequisites%3C%2FH2%3E%0A%3CP%3EBefore%20we%20begin%20setting%20up%20VMFleet%2C%20there%20are%20a%20few%20prerequisites%20that%20you%20should%20have%20ready.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EEnsure%20that%20you%20have%201%20CSV%20per%20node%3CUL%3E%0A%3CLI%3EWithin%20Storage%20Spaces%20Direct%2C%20CPU%20usage%20is%20based%20on%20the%20host.%20Therefore%2C%20it%20is%20recommended%20that%20you%20split%20the%20storage%20load%20by%20creating%20as%20many%20CSVs%20as%20there%20are%20host%20nodes.%20We%20can%20go%20ahead%20and%20create%20a%20CSV%20per%20node%20in%20the%20cluster.%3C%2FLI%3E%0A%3CLI%3EYou%20may%20run%20the%20following%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EGet-ClusterNode%20%7C%25%20%7B%0A%20%20%20%20New-Volume%20-StoragePoolFriendlyName%20S2D*%20-FriendlyName%20%24_%20-FileSystem%20CSVFS_ReFS%20-Size%20%3CDESIRED%20size%3D%22%22%3E%0A%7D%0A%3C%2FDESIRED%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CUL%3E%0A%3CLI%3EEnsure%20that%20you%20create%20a%20%E2%80%9Ccollect%E2%80%9D%20volume.%3CUL%3E%0A%3CLI%3EYou%20may%20run%20the%20following%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3ENew-Volume%20-StoragePoolFriendlyName%20S2D*%20-FriendlyName%20collect%20-FileSystem%20CSVFS_ReFS%20-Size%20200GB%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CUL%3E%0A%3CLI%3EIf%20you%20have%20ran%20VMFleet%20in%20the%20past%2C%20please%20ensure%20that%20prior%20VMFleet%20directories%20are%20completely%20removed%20from%20existing%20volumes.%3C%2FLI%3E%0A%3CLI%3ERetrieve%20or%20install%20a%20Server%20Core%20VHDX%20file.%20If%20you%20do%20not%20have%20one%20handy%2C%20we%20can%20create%20a%20new%20one%20by%20following%20the%20below%20instructions.%3CUL%3E%0A%3CLI%3EDownload%20WS2019%20Server%20Core%20ISO%20from%20the%20public%20website.%3C%2FLI%3E%0A%3CLI%3EOpen%20Hyper-V%20Manager.%3C%2FLI%3E%0A%3CLI%3EClick%20%E2%80%9CNew%E2%80%9D%2C%20then%20%E2%80%9CVirtual%20Machine%E2%80%9D.%3C%2FLI%3E%0A%3CLI%3ENavigate%20through%20the%20prompts%20and%20pick%20a%20location%20to%20store%20your%20VM.%3C%2FLI%3E%0A%3CLI%3EOnce%20your%20VM%20is%20created%2C%20boot%20up%20the%20VM%20and%20follow%20the%20instructions.%20This%20is%20where%20you%20will%20decide%20your%20VM%20password%2C%20or%20what%20we%20will%20later%20call%2C%20%E2%80%9Cadminpass%E2%80%9D.%3CUL%3E%0A%3CLI%3EThis%20is%20important%20as%20we%20will%20use%20this%20later%2C%20so%20make%20sure%20you%20write%20this%20down.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3ELog%20out%20of%20the%20VM%2C%20and%20navigate%20to%20where%20you%20stored%20your%20VM.%20You%20should%20find%20a%20%E2%80%9CVirtual%20Hard%20Disks%E2%80%9D%20folder.%20Inside%2C%20you%20should%20find%20your%20new%20Server%20Core%20VHDX%20file.%3C%2FLI%3E%0A%3CLI%3ERename%20it%20to%20%E2%80%9CGold.vhdx%E2%80%9D.%3C%2FLI%3E%0A%3CLI%3ECopy%20or%20move%20the%20file%20to%20the%20cluster%20environment%20that%20you%20want%20to%20run%20VMFleet%20in.%3C%2FLI%3E%0A%3CLI%3EDone!%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH2%20id%3D%22toc-hId--1453981581%22%20id%3D%22toc-hId--1453981521%22%3EDeployment%3C%2FH2%3E%0A%3COL%3E%0A%3CLI%3EFirst%2C%20we%20need%20to%20install%20the%20new%20PowerShell%20Module%20from%20the%20PowerShell%20Gallery%20and%20then%20load%20it%20into%20our%20terminal.%20Run%20the%20following%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EInstall-Module%20-Name%20%E2%80%9CVMFleet%E2%80%9D%0AImport-Module%20VMFleet%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CUL%3E%0A%3CLI%3ESanity%20Check%3A%3CUL%3E%0A%3CLI%3ERun%20%22%3CSTRONG%3EGet-Module%20VMFleet%3C%2FSTRONG%3E%22%20to%20confirm%20the%20module%20exists.%3C%2FLI%3E%0A%3CLI%3ERun%20%22%3CSTRONG%3EGet-Command%20-Module%20VMFleet%3C%2FSTRONG%3E%22%20to%20obtain%20a%20list%20of%20functions%20included%20in%20the%20module.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3COL%20start%3D%222%22%3E%0A%3CLI%3EWe%20will%20now%20set%20up%20the%20directory%20structure%20within%20the%20%E2%80%9CCollect%E2%80%9D%20CSV%20created%20earlier.%20Run%20%22%3CSTRONG%3EInstall-Fleet%3C%2FSTRONG%3E%22%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CUL%3E%0A%3CLI%3EThis%20creates%20the%20necessary%20VMFleet%20directories%20which%20include%3A%3COL%3E%0A%3CLI%3E%26nbsp%3BCollect%2Fcontrol%3CUL%3E%0A%3CLI%3EContains%20the%20scripts%20that%20the%20Virtual%20Machines%20continuously%20monitor.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3EControl.ps1%3C%2FSTRONG%3E%3A%20the%20control%20script%20the%20VMs%20use%20to%20implement%20the%20control%20loop%20(what%20used%20to%20be%20called%20%E2%80%9Cmaster.ps1%E2%80%9D).%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3ERun.ps1%3C%2FSTRONG%3E%3A%20The%20VMs%20continuously%20look%20for%20the%20most%20recent%20version%20of%20run.ps1%20and%20runs%20the%20newly%20updated%20script%20(parameters).%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3E%26nbsp%3BCollect%2Fflag%3CUL%3E%0A%3CLI%3ELocation%20where%20the%20control%20script%20drops%20the%20%E2%80%9Cgo%E2%80%9D%2C%20%E2%80%9Cpause%E2%80%9D%2C%20and%20%E2%80%9Cdone%E2%80%9D%20flag%20files.%20Users%20should%20not%20need%20to%20look%20at%20these%20files.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3ECollect%2Fresult%3CUL%3E%0A%3CLI%3ELocation%20of%20the%20output%20files%20from%20the%20VMFleet%20test%20run.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3E%26nbsp%3BCollect%2Ftools%3CUL%3E%0A%3CLI%3EDiskSpd%20will%20be%20preinstalled%20in%20this%20folder.%3C%2FLI%3E%0A%3CLI%3E%3CSTRONG%3ENote%3A%20%3C%2FSTRONG%3EPlease%20move%20the%20VHDX%20file%20into%20this%20collect%20folder.%20CSV%20Cache%20is%20also%20turned%20off%20by%20default.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3COL%20start%3D%223%22%3E%0A%3CLI%3EWe%20will%20now%20create%20our%20%E2%80%9Cfleet%E2%80%9D%20of%20VMs%20by%20running%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3ENew-Fleet%20-basevhd%20%3CPATH%20to%3D%22%22%20vhdx%3D%22%22%3E%20-vms%20%5BENTER_NUM_VMS%5D%20-adminpass%20%5BENTER_ADMINPASS%5D%20-connectuser%20%5BENTER_NODE_USER%5D%20-connectpass%20%5BENTER_NODE_PASS%5D%3C%2FPATH%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CUL%3E%0A%3CLI%3E%22adminpass%22%20is%20the%20administrator%20password%20for%20the%20Server%20Core%20Image.%20This%20is%20the%20password%20you%20set%20on%20your%20Virtual%20Machine%20earlier.%3C%2FLI%3E%0A%3CLI%3E%22connectuser%22%20is%20a%20domain%20account%20with%20access%20to%20the%20cluster.%3C%2FLI%3E%0A%3CLI%3E%22connectpass%20%22%20is%20the%20password%20for%20the%20above%20domain%20account.%3C%2FLI%3E%0A%3CLI%3E%22vms%22%20is%20the%20number%20of%20VM's%20to%20create%20per%20node.%3CUL%3E%0A%3CLI%3EIf%20this%20parameter%20is%20not%20provided%2C%20the%20default%20is%20a%201%3A1%20subscription%20ratio%20where%20the%20Number%20of%20VMs%20%3D%20Number%20of%20physical%20cores.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3COL%20start%3D%224%22%3E%0A%3CLI%3E%5BOptional%5D%20You%20can%20consider%20modifying%20the%20VM%20hardware%20configuration.%20Run%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3ESet-Fleet%20-ProcessorCount%201%20-MemoryStartupBytes%202gb%20-MemoryMaximumBytes%202gb%20-MemoryMinimumBytes%202gb%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSTRONG%3ENote%3C%2FSTRONG%3E%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EIf%20you%20specify%20%E2%80%9CMemoryMaximumBytes%E2%80%9D%2C%20you%20%3CSTRONG%3Emust%3C%2FSTRONG%3E%20specify%20%E2%80%9CMemoryMinimumBytes%E2%80%9D%2C%20which%20implies%20that%20your%20VMs%20will%20have%20dynamic%20memory.%3C%2FLI%3E%0A%3CLI%3EIf%20you%20omit%20%E2%80%9CMemoryMaximumBytes%E2%80%9D%20or%20%E2%80%9CMemoryMinimumBytes%E2%80%9D%2C%20it%20implies%20that%20your%20VMs%20will%20have%20static%20memory.%3CUL%3E%0A%3CLI%3EIf%20MemoryStartupBytes%20%3D%20MemoryMinimumBytes%20%3D%20MemoryMaximumBytes%2C%20that%20also%20denotes%20static%20memory.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3E%E2%80%9CMemoryStartupBytes%E2%80%9D%20is%20a%20mandatory%20parameter.%3C%2FLI%3E%0A%3CLI%3EIt%20is%20recommended%20that%20the%20number%20of%20vCPUs%20should%20not%20exceed%20the%20number%20of%20logical%20processors.%20If%20you%20would%20like%20more%20information%2C%20refer%20to%20this%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-server%2Fvirtualization%2Fhyper-v%2Fmanage%2Fmanage-hyper-v-scheduler-types%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EUnderstanding%20and%20using%20Hyper-V%20hypervisor%20scheduler%20types%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH2%20id%3D%22toc-hId-1033531252%22%20id%3D%22toc-hId-1033531312%22%3EStart%20Running%20VMFleet!%3C%2FH2%3E%0A%3COL%20start%3D%227%22%3E%0A%3CLI%3EOpen%202%20PowerShell%20terminals.%20In%20the%20first%20one%2C%20run%20Watch-Cluster%20and%20in%20the%20second%20one%2C%20run%20Start-Fleet.%20This%20second%20function%20will%20turn%20on%20all%20the%20VMs%20in%20a%20%E2%80%9Cpaused%E2%80%9D%20state.%3C%2FLI%3E%0A%3CLI%3EAt%20this%20point%20you%20can%20run%20Start-FleetSweep%20%5BENTER_PARAMETERS%5D%20or%20take%20this%20time%20to%20explore%20and%20run%20any%20of%20the%20other%20functions!%3CUL%3E%0A%3CLI%3EHere%20is%20a%20sample%20sweep%20command%20to%20help%20you%20get%20started%3A%20%22%3CSTRONG%3EStart-FleetSweep%20-b%204%20-t%208%20-o%208%20-w%200%20-d%20300%20-p%20r%22%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3EDone!%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CH2%20id%3D%22toc-hId--773923211%22%20id%3D%22toc-hId--773923151%22%3EAftermath%3C%2FH2%3E%0A%3CP%3EOnce%20you%20are%20done%20running%20VMFleet%20you%20can%20run%20%3CSTRONG%3EStop-Fleet%3C%2FSTRONG%3E%20to%20shut%20down%20all%20the%20virtual%20machines%20or%20run%20%3CSTRONG%3ERemove-Fleet%3C%2FSTRONG%3E%20to%20completely%20delete%20all%20the%20virtual%20machines%20on%20your%20environment.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH1%20id%3D%22toc-hId--784426315%22%20id%3D%22toc-hId--784426255%22%3EFrom%20Setup%20to%20Measure-FleetCoreWorkload%3C%2FH1%3E%0A%3CP%3EThis%20is%20a%20new%20workflow%20for%20setting%20up%20VMFleet%20and%20the%20predefined%20profile%20workloads%20(General%2C%20Peak%2C%20VDI%2C%20SQL).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--93864841%22%20id%3D%22toc-hId--93864781%22%3EPrerequisites%3C%2FH2%3E%0A%3CP%3EBefore%20we%20begin%20setting%20up%20VMFleet%2C%20there%20are%20a%20few%20prerequisites%20that%20you%20should%20have%20ready.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EEnsure%20that%20you%20have%201%20CSV%20per%20node%3CUL%3E%0A%3CLI%3EWithin%20Storage%20Spaces%20Direct%2C%20CPU%20usage%20is%20based%20on%20the%20host.%20Therefore%2C%20it%20is%20recommended%20that%20you%20split%20the%20storage%20load%20by%20creating%20as%20many%20CSVs%20as%20there%20are%20host%20nodes.%20We%20can%20go%20ahead%20and%20create%20a%20CSV%20per%20node%20in%20the%20cluster.%3C%2FLI%3E%0A%3CLI%3EIn%20order%20to%20be%20precise%20about%20the%20CSV%20size%2C%20please%20use%20our%20new%20VMFleet%20command%3A%20%22%3CSTRONG%3EGet-FleetVolumeEstimate%22%3C%2FSTRONG%3E%3CUL%3E%0A%3CLI%3EThis%20will%20output%20a%20prescribed%20CSV%20size%20based%20on%20different%20resiliency%20types.%20We%20recommend%20you%20select%20a%202-way%20mirrored%20value%20or%203-way%20mirrored%20value%20depending%20on%20your%20node%20count.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3EYou%20may%20run%20the%20following%3A%20(use%20the%20CSV%20size%20from%20Get-FleetVolumeEstimate)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EGet-ClusterNode%20%7C%25%20%7B%0A%20%20%20%20New-Volume%20-StoragePoolFriendlyName%20S2D*%20-FriendlyName%20%24_%20-FileSystem%20CSVFS_ReFS%20-Size%20%3CDESIRED%20size%3D%22%22%3E%0A%7D%0A%3C%2FDESIRED%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CUL%3E%0A%3CLI%3EEnsure%20that%20you%20create%20a%20%E2%80%9Ccollect%E2%80%9D%20volume.%3CUL%3E%0A%3CLI%3EYou%20may%20run%20the%20following%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3ENew-Volume%20-StoragePoolFriendlyName%20S2D*%20-FriendlyName%20collect%20-FileSystem%20CSVFS_ReFS%20-Size%20200GB%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CUL%3E%0A%3CLI%3EIf%20you%20have%20ran%20VMFleet%20in%20the%20past%2C%20please%20ensure%20that%20prior%20VMFleet%20directories%20are%20completely%20removed%20from%20existing%20volumes.%3C%2FLI%3E%0A%3CLI%3ERetrieve%20or%20install%20a%20Server%20Core%20VHDX%20file.%20If%20you%20do%20not%20have%20one%20handy%2C%20we%20can%20create%20a%20new%20one%20by%20following%20the%20below%20instructions.%3CUL%3E%0A%3CLI%3EDownload%20WS2019%20Server%20Core%20ISO%20from%20the%20public%20website.%3C%2FLI%3E%0A%3CLI%3EOpen%20Hyper-V%20Manager.%3C%2FLI%3E%0A%3CLI%3EClick%20%E2%80%9CNew%E2%80%9D%2C%20then%20%E2%80%9CVirtual%20Machine%E2%80%9D.%3C%2FLI%3E%0A%3CLI%3ENavigate%20through%20the%20prompts%20and%20pick%20a%20location%20to%20store%20your%20VM.%3C%2FLI%3E%0A%3CLI%3EOnce%20your%20VM%20is%20created%2C%20boot%20up%20the%20VM%20and%20follow%20the%20instructions.%20This%20is%20where%20you%20will%20decide%20your%20VM%20password%2C%20or%20what%20we%20will%20later%20call%2C%20%E2%80%9Cadminpass%E2%80%9D.%3CUL%3E%0A%3CLI%3EThis%20is%20important%20as%20we%20will%20use%20this%20later%2C%20so%20make%20sure%20you%20write%20this%20down.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3ELog%20out%20of%20the%20VM%2C%20and%20navigate%20to%20where%20you%20stored%20your%20VM.%20You%20should%20find%20a%20%E2%80%9CVirtual%20Hard%20Disks%E2%80%9D%20folder.%20Inside%2C%20you%20should%20find%20your%20new%20Server%20Core%20VHDX%20file.%3C%2FLI%3E%0A%3CLI%3ERename%20it%20to%20%E2%80%9CGold.vhdx%E2%80%9D.%3C%2FLI%3E%0A%3CLI%3ECopy%20or%20move%20the%20file%20to%20the%20cluster%20environment%20that%20you%20want%20to%20run%20VMFleet%20in.%3C%2FLI%3E%0A%3CLI%3EDone!%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH2%20id%3D%22toc-hId--1901319304%22%20id%3D%22toc-hId--1901319244%22%3EDeployment%3C%2FH2%3E%0A%3COL%3E%0A%3CLI%3ELet%E2%80%99s%20begin%20deploying%20VMFleet.%20First%2C%20we%20need%20to%20install%20the%20new%20PowerShell%20Module%20from%20the%20PowerShell%20Gallery%20and%20then%20load%20it%20into%20the%20terminal.%20Run%20the%20following%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EInstall-Module%20-Name%20%E2%80%9CVMFleet%E2%80%9D%0AImport-Module%20VMFleet%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ESanity%20Check%3A%3CUL%3E%0A%3CLI%3ERun%20%22%3CSTRONG%3EGet-Module%20VMFleet%22%3C%2FSTRONG%3E%20to%20confirm%20the%20module%20exists.%3C%2FLI%3E%0A%3CLI%3ERun%20%22%3CSTRONG%3EGet-Command%20-Module%20VMFleet%22%3C%2FSTRONG%3E%20to%20obtain%20a%20list%20of%20commands%20included%20in%20the%20module.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B2.%20We%20will%20now%20set%20up%20the%20directory%20structure%20within%20the%20%E2%80%9CCollect%E2%80%9D%20CSV%20that%20we%20created%20earlier.%20Run%20%22%3CSTRONG%3EInstall-Fleet%3C%2FSTRONG%3E%22%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EThis%20creates%20the%20necessary%20VMFleet%20directories%20which%20include%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B3.%26nbsp%3BWe%20will%20now%20create%20our%20%E2%80%9Cfleet%E2%80%9D%20of%20VMs%20by%20running%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3ENew-Fleet%20-basevhd%20%3CPATH%20to%3D%22%22%20vhdx%3D%22%22%3E%20-adminpass%20%5BENTER_ADMINPASS%5D%20-connectuser%20%5BENTER_NODE_USER%5D%20-connectpass%20%5BENTER_NODE_PASS%5D%3C%2FPATH%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CUL%3E%0A%3CLI%3E%22adminpass%22%20is%20the%20administrator%20password%20for%20the%20Server%20Core%20Image.%20This%20is%20the%20password%20you%20set%20on%20your%20Virtual%20Machine%20earlier.%3C%2FLI%3E%0A%3CLI%3E%22connectuser%22%20is%20a%20domain%20account%20with%20access%20to%20the%20cluster.%3C%2FLI%3E%0A%3CLI%3E%22connectpass%20%22%20is%20the%20password%20for%20the%20above%20domain%20account.%3C%2FLI%3E%0A%3CLI%3E%22vms%22%20is%20the%20number%20of%20VM's%20to%20create%20per%20node.%3CUL%3E%0A%3CLI%3EPlease%20do%20%3CSTRONG%3Enot%3C%2FSTRONG%3E%20provide%20this%20parameter%2C%20we%20will%20use%20our%20default%20subscription%20ratio%20of%201%3A1.%20Number%20of%20VMs%20%3D%20Number%20of%20physical%20cores.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B4.%26nbsp%3BMeasure-FleetCoreWorkload%20also%20collects%20diagnostic%20data%20(Get-SDDCDiagnosticInfo).%20Therefore%2C%20before%20running%20the%20command%2C%20we%20must%20also%20install%20the%20NuGet%20Package%20if%20you%20have%20not%20previously%20done%20so.%20In%20doing%20so%2C%20we%20also%20need%20to%20temporairly%20set%20the%20PSGallery%20as%20a%20trusted%20repository%20source%20(%3CSTRONG%3ENote%3C%2FSTRONG%3E%3A%20This%20will%20temporarily%20relax%20the%20security%20boundary).%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3E%24repo%20%3D%20Get-PSRepository%20-Name%20PSGallery%0Aif%20(%24null%20-eq%20%24repo)%20%7B%20Write-Host%20%22The%20PSGallery%20is%20not%20configured%20on%20this%20system%2C%20please%20address%20this%20before%20continuing%22%20%7D%0Aelse%20%7B%0A%20%20%20%20if%20(%24repo.InstallationPolicy%20-ne%20'Trusted')%20%7B%0A%20%20%20%20%20%20%20%20Write-Host%20%22Setting%20the%20PSGallery%20repository%20to%20Trusted%2C%20original%20InstallationPolicy%3A%20%24(%24repo.InstallationPolicy)%22%0A%20%20%20%20%20%20%20%20Set-PSRepository%20-Name%20PSGallery%20-InstallationPolicy%20Trusted%0A%20%20%20%20%7D%20%0A%0A%20%20%20%20%23%23%23%20Installing%20the%20pre-requisite%20modules%0A%0A%20%20%20%20Install-PackageProvider%20NuGet%20-Force%0A%20%20%20%20Install-Module%20-Name%20PrivateCloud.DiagnosticInfo%20-Force%0A%20%20%20%20Install-Module%20-Name%20MSFT.Network.Diag%20-Force%0A%0A%20%20%20%20if%20(%24repo.InstallationPolicy%20-ne%20'Trusted')%20%7B%0A%20%20%20%20%20%20%20%20Write-Host%20%22Resetting%20the%20PSGallery%20repository%20to%20%24(%24repo.InstallationPolicy)%22%0A%20%20%20%20%20%20%20%20Set-PSRepository%20-Name%20PSGallery%20-InstallationPolicy%20%24repo.InstallationPolicy%0A%20%20%20%20%7D%20%0A%7D%20%20%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CH2%20id%3D%22toc-hId-586193529%22%20id%3D%22toc-hId-586193589%22%3ERun%20Measure-FleetCoreWorkload!%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B5.%26nbsp%3BWe%20can%20now%20run%20Measure-FleetCoreWorkload.%20Running%20the%20command%20below%20will%20automatically%20run%20all%204%20workloads%20(General%2C%20Peak%2C%20VDI%2C%20SQL)%20and%20place%20the%20individual%20outputs%20in%20the%20result%20directory.%3CSTRONG%3E%20IMPORTANT%3A%20If%20you%20plan%20on%20running%20another%20test%2C%20please%20clear%20the%20result%20directory.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EMeasure-FleetCoreWorkload%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B6.%26nbsp%3BCongratulations!%20You%E2%80%99re%20done!%20All%20you%20need%20to%20do%20is%20wait%20for%20the%20test%20to%20complete.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSTRONG%3ENote%3C%2FSTRONG%3E%3A%20If%20you%20ever%20run%20into%20an%20error%20and%20need%20to%20rerun%20Measure-FleetCoreWorkload%2C%20don%E2%80%99t%20be%20afraid%20to%20do%20so!%20It%20is%20smart%20enough%20to%20pick%20up%20from%20where%20it%20last%20stopped%20and%20continue%20the%20test%20without%20starting%20from%20scratch.%3C%2FLI%3E%0A%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2824778%22%20slang%3D%22en-US%22%3E%3CP%3ECurious%20about%20deploying%20VMFleet%3F%20Join%20me%20today%20to%20go%20through%20a%20quick%20start%20guide!%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2824778%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Stack%20HCI%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Oct 07 2021 04:05 PM
Updated by: