By default, VMware will not migrate machines with vGPU using DRS.
Starting with vSphere 8.0 U2, DRS can estimate the Stun Time for a given vGPU VM configuration. When the DRS Cluster Advanced Options are set, and the Estimated VM Devices Stun Time for a VM is lower than the VM Devices vMotion Stun Time limit, DRS will automate VM migrations.
1) To enable DRS migration, go to the DRS configuration > Advanced configuration.
Create a new record PassthroughDrsAutomation and set a value 1.
Additional Info
If you wish to be careful about affecting users, you can adjust the max stun time migration rule.
Create an additional record VmDevicesStunTimeTolerated, and then set the max seconds as the value (Default is 100).
Expected Stun Times for vMotion of vGPU VM's:
Used vGPU | VM Stun Time (sec) |
1 | 2 |
2 | 4 |
4 | 6 |
8 | 12 |
16 | 22 |
32 | 39 |
Estimated Worst-Care Stun Times (sec):
vGPU Memory | VM Memory 4GB | VM Memory 8GB | VM Memory 16GB | VM Memory 32GB |
1GB | 5 | 6 | 8 | 12 |
2GB | 7 | 9 | 11 | 15 |
4GB | 13 | 14 | 16 | 21 |
8GB | 24 | 25 | 28 | 32 |
16GB | 47 | 48 | 50 | 54 |
32GB | 91 | 92 | 95 | 99 |
These are only estimates when migrating a single VM with 10Gbps vMotion throughput.