Add VirtIO driver to Windows system (add driver to Windows ISO installation image)

888u

Last update at :2024-05-18,Edit by888u

Why do you need to add drivers to the ISO image? Instead of installing the driver after entering the system? Everything is forced by the situation. If you are also a person who likes to toss, then this will also be one of the useful solutions. Recently, when I was researching and deploying OpenStack for my company, when I was making the initial image (that is, using ISO for a new installation), I found that the driver that comes with Windows does not support the KVM hard disk controller, so the hard disk cannot be found and cannot be installed. So, The solution is to integrate the VirtIO driver into the Windows ISO installation image. Following this idea, I tried the WDS solution that I am familiar with (a Windows deployment solution that supports importing drivers into WIM and exporting WIM), and found that the VirtIO driver is unsigned and cannot use the WDS integrated driver... (Microsoft requires The X64 driver must be signed before it can be used. "Force disable driver signature" is only for the system and has no effect on the WDS service.) So, I came up with another solution, using Microsoft's WAIK toolkit to unpack WIM and force the driver... (supports importing unsigned drivers)


Here, I only introduce how to add the VirtIO driver to the Windows ISO image in the X64 system environment. If you want to add other drivers, or in the X86 (32-bit) system environment, please draw inferences by yourself after studying this note. (It’s not difficult ←_← This note only applies to Windows Vista and above, Windows Server 2008 and above system ISO images. Don't come to me and ask me questions as soon as you have a problem. Please carefully check every step of your operation first! Please don't comment, just send me an email.

Some things you need to download and prepare

Windows Microsoft original ISO image can be downloaded here→msdn.itellyou.cn UltraISO is a very easy-to-use ISO image software. It is a paid software and very cheap. Please decide by yourself whether to buy the genuine version or use a pirated version. 【Chinese official website】 Windows AIK toolkit [Microsoft official website download< /a>】【Baidu Netdisk (f8dd)] (first Execute dism in cmd. If the prompt is not an internal or external command, download the tool package again. If there are other prompts, it means that the system has its own tool, and there is no need to download and install it.) VirtIO driver A Windows driver for the virtual hardware used by QEMU-KVM. 【External network download 】【Baidu Netdisk (fkkb)]

Install the WAIK toolkit

1. First verify whether the system comes with a toolkit. The full (original) version of Windows 10 has integrated tools. First execute dism in cmd. If the prompt is not an internal or external command, install it again. Otherwise, skip this part and go directly to the part below to prepare the WIM image file. 2. Use UltraISO to mount the WindowsAIK ISO image to the virtual optical drive. (Or use any compression software on your computer to decompress the entire ISO image) 3. Run wAIKAMD64 installation toolkit

Prepare WIM image file

1. Use UltraISO to mount the Windows ISO image to the virtual optical drive. (Or use any compression software on your computer to open the ISO image) 2. Copy (or use compression software to extract) the boot.wim and install.wim files in the sources folder. boot.wim is the installation environment that is booted into. If it lacks a driver, it will prompt that the hard disk cannot be found and the driver needs to be loaded when selecting the installation partition step. install.wim is the system image, and the final installed system files are all in it. It adds drivers, so you don’t have to manually install the drivers after installing the system. Adding the driver at once can save a lot of time and energy for batch installation projects with the same hardware environment

Add driver

1. Create a new folder mnt on the D drive (or other location). 2. Use UltraISO to mount the VirtIO driver ISO image to the virtual optical drive. Here we generally only need 3 drivers: . You can also directly use any compression software on your computer to directly extract these three folders. Then go into the directory and take a look, and determine the driver path based on the system version information in your ISO image. For example, if my ISO is WindowsServer2012R2 64-bit, then the driver is under the directory 2k12r2\amd64\. 3. Run cmd or PowerShell as an administrator, and enter the directory where Dism is located in the Windows AIK toolkit. Mine is C:\Program Files\Windows AIK\Tools\amd64\Servicing (if the system already comes with the dism tool, then No need to enter any directory) 4. View wim image information:

dism /get-wiminfo /wimfile:D:\install.wim

The information listed is all system versions contained in this ISO image. The "index" is the version number we will use below. 5. Mount wim image:

dism /mount-wim /wimfile:D:\install.wim /index:1 /mountdir:D:\mnt

The "index" here is the index number seen in the previous step. 6. After mounting is complete, add the driver:

dism /image:D:\mnt /add-driver /driver:F:\viostor\2k12R2\amd64\viostor.inf /forceunsigned

Two or more other drivers execute this command to add drivers. The driver is assigned to the inf configuration file. The last /forceunsigned parameter is only used when it is determined to be an unsigned driver. Microsoft certified and signed drivers do not need to add this parameter. VirtIO's X64 drivers are almost always unsigned. 7. After adding the driver, check the driver status:

dism /image:D:\mnt /get-drivers

8. After confirming that the driver has been added, uninstall and save the wim image:

dism /unmount-wim /mountdir:D:\mnt /commit

9. Repeat steps 4~8 to add a driver to boot.wim. For multiple system versions in install.wim, you can selectively add drivers. But it is recommended to add the driver for all versions in boot.wim.

Package new ISO image

1. Use UltraISO to open the original Windows ISO installation disk image. Note that compression software cannot be used here, otherwise the ISO boot data will be lost. 2. In the sources folder, delete boot.wim and install.wim. 3. Drag the boot.wim and install.wim with the added driver to sources. 4. Click [File] → [Save As] to save a new ISO image.

Recommended site searches: Hong Kong server purchase, Hong Kong vps, free virtual host, Beijing virtual host rental, windows host, Hong Kong vps, free mainland China space, private server rental, how to register a company domain name, how to register a domain name,

Add VirtIO driver to Windows system (add driver to Windows ISO installation image)

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码