If you need to load VirtIO block storage driver (aka viostor) in Windows System Restore (aka Windows Recovery Mode) to recover your Windows virtual machine, take the following steps. (Also please read my note below).
- Download virtio-win iso and in your VM settings add it as a CD/DVD drive.
- Boot Windows System Restore and launch the Command Prompt:
wmic logicaldisk get captionto get an idea of what drives are currently available. X: is System Restore itself and the virtio-win iso should be available either as D: or E:
- If you’re using Windows 10 x64, the command to load the storage driver would be:
drvload D:\viostor\w10\amd64\viostor.inf. For other drivers and systems refer to VirtIO documentation.
- Verify there are new drives available by running
wmic logicaldisk get captionagain.
Once you have access to the system drive, you might want to install or update VirtIO storage driver on it. To do so, use the DISM command from this post by Christian Hofstaedtler.
I recommend against using VirtIO storage driver in Windows System Restore for actual system recovery, i.e. for anything other than simply accessing your files. In my experience it simply doesn’t work: whatever option you pick — “Startup Repair” or “Go back to the previous build” — it’d simply display a meaningless error. If you can re-connect the virtual image via SCSI/SATA to your VM that would be a much better choice.
Thank you for this post, needed it on Server 2016. Thanks MS for taking away the “Load drivers” button…