GPU Partitioning (GPU-P) is a characteristic in Home windows Server 2025 Hyper-V that permits a number of digital machines to share a single bodily GPU by dividing it into remoted fractions. Every VM is allotted a devoted portion of the GPU’s sources (reminiscence, compute, encoders, and many others.) as a substitute of utilizing your entire GPU. That is achieved by way of Single-Root I/O Virtualization (SR-IOV), which offers a hardware-enforced isolation between GPU partitions, making certain every VM can entry solely its assigned GPU fraction with predictable efficiency and safety. In distinction, GPU Passthrough (often known as Discrete System Project, DDA) assigns a complete bodily GPU completely to at least one VM. With DDA, the VM will get full management of the GPU, however no different VMs can use that GPU concurrently. GPU-P’s capacity to time-slice or partition the GPU permits increased utilization and VM density for graphics or compute workloads, whereas DDA provides most efficiency for a single VM at the price of flexibility.
GPU-P is right once you wish to share a GPU amongst a number of VMs, similar to for VDI desktops or AI inference duties that solely want a portion of a GPU’s energy. DDA (passthrough) is most popular when a workload wants the total GPU (e.g. giant mannequin coaching) or when the GPU doesn’t assist partitioning. One other main distinction is mobility: GPU-P helps reside VM mobility and failover clustering, that means a VM utilizing a GPU partition can transfer or restart on one other host with minimal downtime. DDA-backed VMs can not live-migrate. If you could transfer a DDA VM, it have to be powered off after which began on a goal host (in clustering, a DDA VM will likely be restarted on a node with an out there GPU upon failover, since reside migration isn’t supported). Moreover, you can not combine modes on the identical gadget. A bodily GPU will be both partitioned for GPU-P or handed by way of by way of DDA, however not each concurrently.
Supported GPU {Hardware} and Driver Necessities
GPU Partitioning in Home windows Server 2025 is supported on choose GPU {hardware} that gives SR-IOV or comparable virtualization capabilities, together with applicable drivers. Solely particular GPUs assist GPU-P and also you received’t be capable of configure it on a shopper gaming GPU like your RTX 5090.
Along with the GPU itself, sure platform options are required:
- Fashionable CPU with IOMMU: The host processors should assist Intel VT-d or AMD-Vi with DMA remapping (IOMMU). That is essential for mapping gadget reminiscence securely between host and VMs. Older processors missing these enhancements might not absolutely assist reside migration of GPU partitions.
- BIOS Settings: Make sure that in every host’s UEFI/BIOS, Intel VT-d/AMD-Vi and SR-IOV are enabled. These choices could also be underneath virtualization or PCIe settings. With out SR-IOV enabled on the firmware degree, the OS won’t acknowledge the GPU as partitionable (in Home windows Admin Middle it would present standing “Paravirtualization” indicating the motive force is succesful however the platform isn’t).
- Host GPU Drivers: Use vendor-provided drivers that assist GPU virtualization. For NVIDIA, this implies putting in the NVIDIA digital GPU (vGPU) driver on the Home windows Server 2025 host (the motive force bundle that helps GPU-P). Verify the GPU vendor’s documentation for set up for specifics. After putting in, you’ll be able to confirm the GPU’s standing by way of PowerShell or WAC.
- Visitor VM Drivers: The visitor VMs additionally want applicable GPU drivers put in (throughout the VM’s OS) to utilize the digital GPU. As an illustration, if utilizing Home windows 11 or Home windows Server 2025 as a visitor, set up the GPU driver contained in the VM (typically the identical data-center driver or a guest-compatible subset from the vGPU bundle) in order that the GPU is usable for DirectX/OpenGL or CUDA in that VM. Linux visitors (Ubuntu 18.04/20.04/22.04 are supported) likewise want the Linux driver put in. Visitor OS assist for GPU-P in WS2025 covers Home windows 10/11, Home windows Server 2019+, and sure Ubuntu LTS variations.
After {hardware} setup and driver set up, it’s necessary to confirm that the host acknowledges the GPU as “partitionable.” You should use Home windows Admin Middle or PowerShell for this: in WAC’s GPU tab, examine the “Assigned standing” of the GPU it ought to present “Partitioned” if all the pieces is configured accurately (if it exhibits “Prepared for DDA project” then the partitioning driver isn’t lively, and if “Not assignable” then the GPU/driver doesn’t assist both methodology). In PowerShell, you’ll be able to run:
Get-VMHostPartitionableGpu | FL Identify, ValidPartitionCounts, PartitionCount
This can listing every GPU gadget’s identifier and what partition counts it helps. For instance, an NVIDIA A40 may return ValidPartitionCounts : {16, 8, 4, 2 …} indicating the GPU will be cut up into 2, 4, 8, or 16 partitions, and in addition present the present PartitionCount setting (by default it could equal the max or present configured worth). If no GPUs are listed, or the listing is empty, the GPU will not be acknowledged as partitionable (examine drivers/BIOS). If the GPU is listed however ValidPartitionCounts is clean or exhibits solely “1,” then it could not assist SR-IOV and may solely be used by way of DDA.
Enabling and Configuring GPU Partitioning
As soon as the {hardware} and drivers are prepared, enabling GPU Partitioning entails configuring how the GPU will likely be divided and making certain all Hyper-V hosts (particularly in a cluster) have a constant setup.
Every bodily GPU have to be configured with a partition rely (what number of partitions to create on that GPU). You can not outline an arbitrary quantity – it have to be one of many supported counts reported by the {hardware}/driver. The default may be the utmost supported (e.g., 16). To set a particular partition rely, use PowerShell on every host:
- Determine on a partition rely that fits your workloads. Fewer partitions means every VM will get extra GPU sources (extra VRAM and compute per partition), whereas extra partitions means you’ll be able to assign the GPU to extra VMs concurrently (every getting a smaller slice). For AI/ML, you may select a average quantity – e.g. cut up a 24 GB GPU into 4 partitions of ~6 GB every for inference duties.
- Run the Set-VMHostPartitionableGpu cmdlet. Present the GPU’s gadget ID (from the Identify discipline of the sooner Get-VMHostPartitionableGpu output) and the specified -PartitionCount. For instance:
Set-VMHostPartitionableGpu -Identify "" -PartitionCount 4
This could configure the GPU to be divided into 4 partitions. Repeat this for every GPU gadget if the host has a number of GPUs (or specify -Identify accordingly for every). Confirm the setting by operating:
Get-VMHostPartitionableGpu | FL Identify,PartitionCount
It ought to now present the PartitionCount set to your chosen worth (e.g., PartitionCount : 4 for every listed GPU).
In case you are in a clustered setting, apply the identical partition rely on each host within the cluster for all similar GPUs. Consistency is essential: a VM utilizing a “quarter GPU” partition can solely fail over to a different host that additionally has its GPU cut up into quarters. Home windows Admin Middle will truly implement this by warning you if you happen to attempt to set mismatched counts on completely different nodes.
You too can configure the partition rely by way of the WAC GUI. In WAC’s GPU partitions software, choose the GPU (or a set of homogeneous GPUs throughout hosts) and select Configure partition rely. WAC will current a dropdown of legitimate partition counts (as reported by the GPU). Deciding on a quantity will present a tooltip of how a lot VRAM every partition would have (e.g., deciding on 8 partitions on a 16 GB card may present ~2 GB per partition). WAC helps make sure you apply the change to all comparable GPUs within the cluster collectively. After making use of, it can replace the partition rely on every host robotically.
After this step, the bodily GPUs on the host (or cluster) are partitioned into the configured variety of digital GPUs. They’re now able to be assigned to VMs. The host’s perspective will present every partition as a shareable useful resource. (Be aware: You can not assign extra partitions to VMs than the quantity configured)
Assigning GPU Partitions to Digital Machines
With the GPU partitioned on the host degree, the following step is to connect a GPU partition to a VM. That is analogous to plugging a digital GPU gadget into the VM. Every VM can have at most one GPU partition gadget connected, so select the VM that wants GPU acceleration and assign one partition to it. There are two important methods to do that: utilizing PowerShell instructions or utilizing the Home windows Admin Middle UI. Under are the directions for every methodology.
So as to add the GPU Partition to the VM use the Add-VMGpuPartitionAdapter cmdlet to connect a partitioned GPU to the VM. For instance:
Add-VMGpuPartitionAdapter -VMName ""
This can allocate one of many out there GPU partitions on the host to the desired VM. (There is no such thing as a parameter to specify which partition or GPU & Hyper-V will auto-select an out there partition from a suitable GPU. If no partition is free or the host GPUs aren’t partitioned, this cmdlet will return an error)
You possibly can examine that the VM has a GPU partition connected by operating:
Get-VMGpuPartitionAdapter -VMName "" | FL InstancePath,PartitionId
This can present particulars just like the GPU gadget occasion path and a PartitionId for the VM’s GPU gadget. If you happen to see an entry with an occasion path (matching the GPU’s PCI ID) and a PartitionId, the partition is efficiently connected.
Energy on the VM. On boot, the VM’s OS will detect a brand new show adapter. In Home windows visitors, you must see a GPU in System Supervisor (it could seem as a GPU with a particular mannequin, or a digital GPU gadget identify). Set up the suitable GPU driver contained in the VM if not already put in, in order that the VM can absolutely make the most of the GPU (for instance, set up NVIDIA drivers within the visitor to get CUDA, DirectX, and many others. working). As soon as the motive force is lively within the visitor, the VM will be capable of leverage the GPU partition for AI/ML computations or graphics rendering.
Utilizing Home windows Admin Middle:
- Open Home windows Admin Middle and navigate to your Hyper-V cluster or host, then go to the GPUs extension. Guarantee you might have added the GPUs extension v2.8.0 or later to WAC.
- Within the GPU Partitions tab, you’ll see a listing of the bodily GPUs and any current partitions. Click on on “+ Assign partition”. This opens an project wizard.
- Choose the VM: First select the host server the place the goal VM at present resides (WAC will listing all servers within the cluster). Then choose the VM from that host to assign a partition to. (If a VM is greyed out within the listing, it possible already has a GPU partition assigned or is incompatible.)
- Choose Partition Dimension (VRAM): Select the partition dimension from the dropdown. WAC will listing choices that correspond to the partition counts you configured. For instance, if the GPU is cut up into 4, you may see an possibility like “25% of GPU (≈4 GB)” or comparable. Guarantee this matches the partition rely you set. You can not assign extra reminiscence than a partition incorporates.
- Offline Motion (HA possibility): If the VM is clustered and also you need it to be extremely out there, examine the choice for “Configure offline motion to pressure shutdown” (if introduced within the UI).
- Proceed to assign. WAC will robotically: shut down the VM (if it was operating), connect a GPU partition to it, after which energy the VM again on. After a quick second, the VM ought to come on-line with the GPU partition connected. Within the WAC GPU partitions listing, you’ll now see an entry displaying the VM identify underneath the GPU partition it’s utilizing.
At this level, the VM is operating with a digital GPU. You possibly can repeat the method for different VMs, as much as the variety of partitions out there. Every bodily GPU can solely assist a hard and fast variety of lively partitions equal to the PartitionCount set. If you happen to try to assign extra VMs than partitions, the extra VMs won’t get a GPU (or the Add command will fail). Additionally observe {that a} given VM can solely occupy one partition on one GPU – you can not span a single VM throughout a number of GPU partitions or throughout a number of GPUs with GPU-P.
GPU Partitioning in Clustered Environments (Failover Clustering)
One of many main advantages launched with Home windows Server 2025 is that GPU partitions can be utilized in Failover Clustering situations for top availability. This implies you’ll be able to have a Hyper-V cluster the place VMs with digital GPUs are clustered roles, able to shifting between hosts both by way of reside migration (deliberate) or failover (unplanned). To make the most of GPU-P in a cluster, you will need to pay particular consideration to configuration consistency and perceive the present limitations:
- Use Home windows Server 2025 Datacenter: As talked about, clustering options (like failover) for GPU partitions are supported solely on Datacenter version.
- Homogeneous GPU Configuration: All hosts within the cluster ought to have similar GPU {hardware} and partitioning setup. Failover/Dwell Migration with GPU-P does not assist mixing GPU fashions or partition sizes in a GPU-P cluster. Every host ought to have the identical GPU mannequin. The partition rely configured (e.g., 4 or 8 and many others.) have to be the identical on each host. This uniformity ensures {that a} VM anticipating a sure dimension partition will discover an equal on some other node.
Home windows Server 2025 introduces assist for reside migrating VMs which have a GPU partition connected. Nonetheless, there are necessary caveats:
-
- {Hardware} assist: Dwell migration with GPU-P requires that the hosts’ CPUs and chipsets absolutely assist isolating DMA and gadget state. In follow, as famous, you want Intel VT-d or AMD-Vi enabled, and the CPUs ideally supporting “DMA bit monitoring.” If that is in place, Hyper-V will try to reside migrate the VM usually. Throughout such a migration, the GPU’s state will not be seamlessly copied like common reminiscence; as a substitute, Home windows will fallback to a slower migration course of to protect integrity. Particularly, when migrating a VM utilizing GPU-P, Hyper-V robotically makes use of TCP/IP with compression (even if in case you have quicker strategies like RDMA configured). It’s because gadget state switch is extra complicated. The migration will nonetheless succeed, however you might discover increased CPU utilization on the host and an extended migration time than standard.
- Cross-node compatibility: Make sure that the GPU driver variations on all hosts are the identical, and that every host has an out there partition for the VM. If a VM is operating and also you set off a reside migrate, Hyper-V will discover a goal the place the VM can get an similar partition. If none are free, the migration won’t proceed (or the VM might must be restarted elsewhere as a failover).
- Failover (Unplanned Strikes): If a bunch crashes or goes down, a clustered VM with a GPU partition will likely be robotically restarted on one other node, very similar to any HA VM. The important thing distinction is that the VM can not save its state, so it will likely be a chilly begin on the brand new node, attaching to a brand new GPU partition there. When the VM comes up on the brand new node, it can request a GPU partition. Hyper-V will allocate one if out there. If NodeB had no free partition (say all have been assigned to different VMs), the VM may begin however not get a GPU (and sure Home windows would log an error that the digital GPU couldn’t begin). Directors ought to monitor and probably leverage anti-affinity guidelines to keep away from packing too many GPU VMs on one host if full automated failover is required.
To study extra about GPU-P on Home windows Server 2025, seek the advice of the documentation on Be taught: https://study.microsoft.com/en-us/windows-server/virtualization/hyper-v/gpu-partitioning