Uninstall-VirtioGpu.cmd corrupts Windows VM and workaround to install 3D driver
- Dominant language
- Swift
- Stars
- 35.5k
- Forks
- 1.8k
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 7
Description
**Describe the issue**
UTM 5.04 includes the experimental 3D driver for Windows. As suggested by the developer, the old Virtio driver must be uninstalled with the 'Uninstall-VirtioGpu.cmd' script before installing the 3D driver that comes with the latest Guest tools.
When I follow these instructions, my Windows 11 ARM 25H2 (Build 26200.9168) does not restart anymore (hangs forever at 'Start boot option' and Windows repair option displays 'Your device ran into a problem and couldn't be repaired'
**Configuration**
* UTM Version: 5.04
* macOS Version: macOS Tahoe 26.6.1
* Mac Chip (Intel, M1, ...): AppleSilicon M1 Pro
**Workaround**
After some testing, I found a solution that works flawlessly for me and my configuration. Maybe it helps others as well if they have a similar issue.
The VM is using the following display HW: virtio-ramfb-gl (GPU Supported)
1. Connect latest UTM Guest Tools provided with UTM 5.04 (includes CMD script at CD root)
2. Run utm-guest-tools.exe
3. Enable 'Experimental 3d acceleration' option in installer
4. During replacement of the GPU driver, the VM will freeze. Wait for 1 minute and then force-stop the VM
5. Restart VM
6. Open Powershell in Admin mode and paste the following script:
```
Get-PnpDevice -Class Display |
ForEach-Object {
$version = Get-PnpDeviceProperty -InstanceId $_.InstanceId `
-KeyName DEVPKEY_Device_DriverVersion `
-ErrorAction SilentlyContinue
[pscustomobject]@{
Device = $_.FriendlyName
Status = $_.Status
Version = $version.Data
}
}
```
7. The output should display that the 3D controller has been activated
```
Device Status Version
------ ------ -------
Red Hat VirtIO GPU 3D controller OK 100.6.101.58000
```
8. Now check which packages remain on your system:
```
Get-WindowsDriver -Online |
Where-Object {
(Split-Path $_.OriginalFileName -Leaf) -in
'viogpudo.inf', 'viogpu3d.inf'
} |
Format-Table Driver, OriginalFileName, Version
```
9. On my device, I got the following output, but the oemxx.inf numbering may be different on your system:
```
Driver OriginalFileName Version
------ ---------------- -------
oem16.inf C:\Windows\System32\DriverStore\FileRepository\viogpudo.inf_arm64_39d291482f9a7cde\viogpudo.inf 22.7.38.43
oem3.inf C:\Windows\System32\DriverStore\FileRepository\viogpu3d.inf_arm64_684978a6cba58fe6\viogpu3d.inf 100.6.101.58000
```
10. Note the oemxx.inf name for the package containing the old viogpudo.inf driver package
11. Remove the old package with the following command:
`pnputil /delete-driver oem16.inf (use oemxx.inf that correponds to viogpudo.inf)`
12. Re-enumerate the packages afterwards:
```
Get-WindowsDriver -Online |
Where-Object {
(Split-Path $_.OriginalFileName -Leaf) -in
'viogpudo.inf', 'viogpu3d.inf'
} |
Format-Table Driver, OriginalFileName, Version
```
13. Only the 3D driver package should remain on your system.
14. Restart your Windows from inside the OS
15. Re-install the UTM Tools (0.1.272) with enabled '3D experimental acceleration' provided with 5.04. They should install without any hang or whatever :-)
Contributor guide
Research direction
Start with the Uninstall-VirtioGpu.cmd script in the UTM Guest Tools 5.04 package and reproduce the failure on the reported Windows 11 ARM configuration using virtio-ramfb-gl. Check how viogpudo.inf and viogpu3d.inf are handled during driver replacement, then verify that installation completes, the VM restarts, and only the 3D driver package remains.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100