virtio-win

Tools needed for driver build

Building virtio-win drivers (including ARM64) using Visual Studio 2017

[1] install Visual Studio 2017 Community

Download link

Select ‘Desktop development with C++’ Add following ‘Individual components’:

From ‘Compilers, build tools, and runtimes’

From ‘SDK, libraries and frameworks’

Exported config of working VS2017 setup:

{ "version": "1.0", "components": [ "Microsoft.VisualStudio.Workload.NativeDesktop", "microsoft.visualstudio.component.debugger.justintime", "microsoft.visualstudio.component.vc.diagnostictools", "microsoft.visualstudio.component.vc.cmake.project", "microsoft.visualstudio.component.vc.testadapterforboosttest", "microsoft.visualstudio.component.vc.testadapterforgoogletest", "microsoft.visualstudio.component.windows81sdk", "microsoft.visualstudio.componentgroup.nativedesktop.winxp", "microsoft.visualstudio.component.vc.atlmfc", "microsoft.visualstudio.component.windows10sdk", "microsoft.visualstudio.component.vc.atl.arm64.spectre", "microsoft.visualstudio.component.vc.atlmfc.spectre", "microsoft.visualstudio.component.vc.mfc.arm.spectre", "microsoft.visualstudio.component.vc.runtimes.arm.spectre", "microsoft.visualstudio.component.vc.runtimes.arm64.spectre", "microsoft.visualstudio.component.vc.runtimes.x86.x64.spectre", "microsoft.visualstudio.component.vc.atl.arm", "microsoft.visualstudio.component.vc.mfc.arm", "microsoft.visualstudio.component.vc.mfc.arm64" ] }

Note: if you save the above config as “c:\temp\virtio-win-drivers.vsconfig”, you can use this Chocholatey command to setup VS2017 more easily: choco install -y visualstudio2017community --package-parameters "--config c:\temp\virtio-win-drivers.vsconfig"

[2] install WDK 1809

Download link

[3] install WDK for Windows 7 (required to build drivers for legacy OS, i.e. XP, WNET, Vista)

Download link (ISO)

[4] install Microsoft Cryptographic Provider Development Kit (CPDK) (required to build virtio-rng, virtio-crypt drivers)

Download link

[5] install WinFsp 2020 (required both to build and use virtio-fs driver)

Download link

Chocolatey: choco install -y winfsp

[6] install Microsoft redistributables for VS2015, VS2013, VS2010

[7] Register VS2017 once (initially it has 30 days limit)

(Obsolete) Building Windows 8 (Windows 2012) drivers and up

(Obsolete) Building Windows XP, Windows 2003, Windows Vista, Windows 2008, Windows 7 and Windows 2008R2 drivers

How to build?

Known hints / constraints