1 00:00:00,940 --> 00:00:04,940 Hyper‑V Discrete Device Assignment is a Hyper‑V feature 2 00:00:04,940 --> 00:00:09,030 that allows you to pass an entire PCIe hardware device, 3 00:00:09,030 --> 00:00:15,020 examples would be graphics cards, NVMe storage devices, into the VM. 4 00:00:15,020 --> 00:00:16,540 And when I say pass them in, 5 00:00:16,540 --> 00:00:19,950 we're not talking about simply linking like we did in the 6 00:00:19,950 --> 00:00:23,870 previous module, where the enhanced session configuration allows 7 00:00:23,870 --> 00:00:26,260 the VM to get to the host's hard drive. 8 00:00:26,260 --> 00:00:26,550 No, 9 00:00:26,550 --> 00:00:29,690 this is where you're actually giving a piece of hardware 10 00:00:29,690 --> 00:00:32,360 on the host exclusively to the VM. 11 00:00:32,360 --> 00:00:36,890 We configure this using PowerShell. And we just need to know the very 12 00:00:36,890 --> 00:00:40,550 high‑level bird's eye perspective for our exam success. 13 00:00:40,550 --> 00:00:45,140 Basically, you have to configure the VM to support Discrete Device Assignment, 14 00:00:45,140 --> 00:00:49,560 you'll have to work on the host to dismount the device, and then assign the 15 00:00:49,560 --> 00:00:55,880 device to the guest VM. Hyper‑V central processor unit, or CPU, groups allow 16 00:00:55,880 --> 00:01:01,710 an administrator to get better control over the host CPU and the guest VM 17 00:01:01,710 --> 00:01:07,320 access to host CPU. This is analogous to what we did in the previous module 18 00:01:07,320 --> 00:01:12,430 with dynamic memory and different things you can do like memory weighting to 19 00:01:12,430 --> 00:01:18,090 allocate host RAM to your VMs in the way that you want to or that you need to 20 00:01:18,090 --> 00:01:18,900 for your business. 21 00:01:18,900 --> 00:01:23,160 Well, here we have a similar capability, a Quality of Service capability, for 22 00:01:23,160 --> 00:01:29,700 the host CPU. Now, we need to access an API called the Hyper‑V Host Compute 23 00:01:29,700 --> 00:01:34,930 Service, or HCS, and as of this recording in early 2022, and even with the 24 00:01:34,930 --> 00:01:39,590 latest version of Windows Server, Windows server 2022, we don't have a way of 25 00:01:39,590 --> 00:01:45,620 accessing the HCS outside of a separate executable. Microsoft created an 26 00:01:45,620 --> 00:01:50,930 executable called CPU groups that's essentially an abstraction over the Host 27 00:01:50,930 --> 00:01:52,020 Compute Service. 28 00:01:52,020 --> 00:01:52,410 Again, 29 00:01:52,410 --> 00:01:56,330 we don't need to get deep into the weeds here, you just need to identify the 30 00:01:56,330 --> 00:02:01,040 capability if you're asked about it on exam AZ‑800, and basically what you're 31 00:02:01,040 --> 00:02:08,210 doing is using that CPU group's executable to divide logical VM resource groups 32 00:02:08,210 --> 00:02:13,760 into CPU service tiers. I know that the exam AZ‑800 objectives reference 33 00:02:13,760 --> 00:02:18,610 resource groups. There's not a similar concept to Azure resource groups in 34 00:02:18,610 --> 00:02:22,530 Hyper‑V, so I believe what they're talking about, what Microsoft is talking 35 00:02:22,530 --> 00:02:29,610 about there is strictly CPU groups. So we divide our logical VMs into these CPU 36 00:02:29,610 --> 00:02:35,530 service tiers, where you may have one or more VMs that need more CPU power, 37 00:02:35,530 --> 00:02:40,770 just simple as that, and more reserved CPU power than others, and you may also 38 00:02:40,770 --> 00:02:46,450 want to use CPU groups to constrain CPU on VMs to make sure that they don't go 39 00:02:46,450 --> 00:02:51,030 out of bounds. That make sense? I do have just some example usages. I doubt very 40 00:02:51,030 --> 00:02:55,870 seriously you'd see CPU groups syntax on your exam, so I'm giving you this 41 00:02:55,870 --> 00:03:01,310 basically for color. We could do CpuGroups GetCpuTopology just to see what your 42 00:03:01,310 --> 00:03:03,440 current host topology is. 43 00:03:03,440 --> 00:03:08,400 This example shows us creating a group that includes four logical processors. 44 00:03:08,400 --> 00:03:11,510 In other words, these are processor cores on the machine. 45 00:03:11,510 --> 00:03:16,390 Third example shows us how we can set a CPU cap to 50%. 46 00:03:16,390 --> 00:03:22,010 Now, notice that the range is 0 to 65536, so to do a 50% cap, 47 00:03:22,010 --> 00:03:24,070 you specify half that value. 48 00:03:24,070 --> 00:03:25,870 It's a 16‑bit value. 49 00:03:25,870 --> 00:03:30,030 Now, of course, you're probably thinking, whoa, and yeah, 50 00:03:30,030 --> 00:03:33,040 this is not user friendly in the least. 51 00:03:33,040 --> 00:03:36,360 Check the exercise files if you're thinking of actually implementing 52 00:03:36,360 --> 00:03:39,490 this. It's going to have a little learning curve to it, because it's 53 00:03:39,490 --> 00:03:42,570 about as anti‑intuitive as you can get. 54 00:03:42,570 --> 00:03:47,110 So you create your groups that allocate CPU cores from the host, 55 00:03:47,110 --> 00:03:51,030 you create your group properties that customize the behavior and 56 00:03:51,030 --> 00:03:57,000 the quotas of the groups, and then lastly, you bind VMs to the CPU group.