Adding VirtIO SCSI driver into a busted Windows install

This commit is contained in:
brayden 2024-04-23 23:06:20 +08:00
parent 30e1bff768
commit 84c85187a0
Signed by: brayden
GPG Key ID: D73DC8941D3B65BC
10 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,61 @@
---
title: "Installing VirtIO (or any driver) from Windows Recovery"
date: 2024-04-23T20:52:20.7148891+08:00
draft: false
---
Today I was migrating an older Windows VM running under VMware to Proxmox and
encountered a frustrating sudden roadblock: no PVSCSI drivers! My newer builds
all use VMware PVSCSI, but this VM was an older build still using LSI SAS.
Now staring at the `INACCESSIBLE_BOOT_DEVICE` BSOD, your options are abort or
press ahead. In this article, we charge forward and overcome our lack of
prepardness!
# Enter Windows Recovery
Reset the VM a few times while at the Windows loading screen and it'll dump you
into the recovery environment. From here you can perform an advanced repair and
summon a command prompt.
# Mount an ISO Containing Drivers
In this example, I've neglected to install the VirtIO SCSI driver so I'll mount
the VirtIO ISO for Windows. You can grab it from [here](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso)
![Screenshot of CD-ROM config with VirtIO ISO mounted](/images/virtio-drivers/iso-selection.png)
Switch to your disc in the Command Prompt using its drive letter (usually `D:`)
![Screenshot showing the directory listing of the VirtIO driver disc](/images/virtio-drivers/virtio-contents.png)
# Load the SCSI Driver
Find the driver you wish to load. (`vioscsi.inf` in my case)
![Screenshot showing the folder containing the VirtIO SCSI driver](/images/virtio-drivers/driver-folder.png)
Load the driver by running `drvload vioscsi.inf`
![Screenshot demonstrating drvload](/images/virtio-drivers/drvload.png)
# List Disks
Use `diskpart` to list your disks to confirm they're now visible
![Screenshot of diskpart showing the results of a successful list disk operation](/images/virtio-drivers/diskpart-disks.png)
Use `list volume` to see what drive letter your Windows drive got assigned
![Screenshot of diskpart showing the results of a successful list volume operation](/images/virtio-drivers/diskpart-volumes.png)
My Windows partition was now visible on drive letter `E:`
![Screenshot showing the contents of my Windows partition](/images/virtio-drivers/e-drive.png)
# Add the Driver to Windows
Use `dism` to insert the driver into your Windows install
```
dism /Image:E:\ /Add-Driver:D:\vioscsi\2k19\amd64\vioscsi.inf
```
![Screenshot of dism adding the vioscsi driver to Windows](/images/virtio-drivers/dism.png)
# Success!
Reboot into Windows and enjoy your new SCSI driver.
![Screenshot of device manager showing the VirtIO SCSI controller](/images/virtio-drivers/device-manager.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB