Skip to content

Instantly share code, notes, and snippets.

@rahulmr
Last active November 15, 2015 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rahulmr/8747b89469bd51722e40 to your computer and use it in GitHub Desktop.
Save rahulmr/8747b89469bd51722e40 to your computer and use it in GitHub Desktop.
Slipstream virtio win drivers in Windows 8.1 Pro ISO

Adding instructions for Windows 10 Ent version.

Slipstream of particular version can be done only using the same version of Windows. Say Windows 8.1 for Slip Streaming Windows 8.1 and so this applies to Windows 10 as well.

dism /Mount-Wim /WimFile:c:\iso\ms-iso\sources\install.wim /index:1 /MountDir:c:\iso\ms-mount  
dism /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\Balloon\w8.1\amd64 /recurse  
dism /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\NetKVM\w8.1\amd64 /recurse  

dism /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\pvpanic\w8.1\amd64 /recurse

dism /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\qemupciserial /recurse

dism /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\qxldod\w8.1\amd64 /recurse

dism /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\viorng\w8.1\amd64 /recurse

dism /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\vioscsi\w8.1\amd64 /recurse

dism /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\vioserial\w8.1\amd64 /recurse

dism /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\viostor\w8.1\amd64 /recurse




dism /Unmount-Wim /MountDir:c:\iso\ms-mount /commit
DISM /Commit-Wim /MountDir:c:\iso\ms-mount


dism /Mount-Wim /WimFile:c:\iso\ms-iso\sources\boot.wim /index:1 /MountDir:c:\iso\ms-boot
copy virtio
dism /Unmount-Wim /MountDir:c:\iso\ms-boot /commit


c:\iso\virtio-iso\Balloon\w8.1\amd64

Final Commands - with logs in other file

DISM /Mount-Wim /WimFile:c:\iso\ms-iso\sources\install.wim /index:1 /MountDir:c:\iso\ms-mount  
DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\Balloon\w8.1\amd64 /recurse  
DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\NetKVM\w8.1\amd64 /recurse  
DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\pvpanic\w8.1\amd64 /recurse
DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\qemupciserial /recurse
DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\qxldod\w8.1\amd64 /recurse
DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\viorng\w8.1\amd64 /recurse
DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\vioscsi\w8.1\amd64 /recurse
DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\vioserial\w8.1\amd64 /recurse
DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\viostor\w8.1\amd64 /recurse
DISM /Unmount-Wim /MountDir:c:\iso\ms-mount /commit


DISM /Mount-Wim /WimFile:c:\iso\ms-iso\sources\boot.wim /index:1 /MountDir:c:\iso\ms-boot
DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\Balloon\w8.1\amd64 /recurse  
DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\NetKVM\w8.1\amd64 /recurse  
DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\pvpanic\w8.1\amd64 /recurse
DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\qemupciserial /recurse
DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\qxldod\w8.1\amd64 /recurse
DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\viorng\w8.1\amd64 /recurse
DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\vioscsi\w8.1\amd64 /recurse
DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\vioserial\w8.1\amd64 /recurse
DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\viostor\w8.1\amd64 /recurse
DISM /Unmount-Wim /MountDir:c:\iso\ms-boot /commit

Create folders

c:\iso
c:\iso\ms-iso
c:\iso\ms-mount 
c:\iso\virtio-iso

Go ahead and put the windows and virtio iso images in c:\iso.

Using ImgBurn or the tool of your choice, extract the contents of the windows install iso to c:\iso\ms-iso.

Extract the contents of the virtio iso into c:\iso\virtio-iso. Alternatively, you could just mount the iso and reference the appropriate path when you reach step #5.

Next, we’ll use dism to mount the wim image. Run this from an elevated command prompt:

DISM /Mount-Wim /WimFile:c:\iso\ms-iso\sources\install.wim /index:1 /MountDir:c:\iso\ms-mount

C:\iso>dism /Mount-Wim /WimFile:c:\iso\ms-iso\sources\install.wim /index:1 /MountDir:c:\iso\ms-mount

Deployment Image Servicing and Management tool Version: 6.1.7600.16385

Mounting image [==========================100.0%==========================] The operation completed successfully.

Time to insert the drivers.

dism /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\WIN8\AMD64 /recurse

If all went well, 5 of 5 drivers will have successfully ‘installed’. Now we seal the deal:

dism /Unmount-Wim /MountDir:c:\iso\ms-mount /commit

Now we have to run through the same process but this time we’re updating boot.wim so that we can see the virtual drive during the install process.

dism /Mount-Wim /WimFile:c:\iso\ms-iso\sources\boot.wim /index:1 /mountdir:c:\iso\ms-mount dism /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\WIN8\AMD64 /recurse dism /Unmount-Wim /MountDir:c:\iso\ms-mount /commit

Now all that’s left is to glue the iso back together. In ImgBurn this accomplished by:

A. Mode -> Build

B. In the ‘Source’ section, click the ‘Browse for a folder’ icon. Select c:\iso\ms-iso.

C. In the ‘Destination’ section, click the ‘Browse for a file’ icon. Give your iso a name and put it where you’d like.

D. Under the Options tab on the right, set ‘File System’ to ‘UDF’ and ensure that ‘Recurse Subdirectories’ is checked.

E. Under the Labels tab, set an appropriate label (eg., ‘win2012-virtio’) in the UDF field.

F. Under the Advanced -> Bootable Disc tab:

I. Check the ‘Make Image Bootable’ checkbox

II. Emulation Type: None (Custom)

III. Boot Image: c:\iso\ms-iso\boot\etfsboot.com

IV. Platform ID: 80×86

V. Developer ID: Microsoft Corporation

VI. Load Segment: 07C0

VII. Sectors to Load: 8 (for Vista and earlier, this would be 4)

VIII. Patch Information Table: Unchecked

G. Finally, click the ‘Build Image’ button on the bottom left.

Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Windows\system32>cd \iso
C:\iso>dir
Volume in drive C has no label.
Volume Serial Number is E077-8B51
Directory of C:\iso
26/08/2015 10:28 <DIR> .
26/08/2015 10:28 <DIR> ..
26/08/2015 10:22 <DIR> ms-boot
26/08/2015 10:30 <DIR> ms-iso
26/08/2015 10:22 <DIR> ms-mount
26/08/2015 10:23 <DIR> virtio-iso
26/08/2015 10:28 4,096 win10boot.bif
26/08/2015 08:56 3,715,997,696 win10entx64.iso
2 File(s) 3,716,001,792 bytes
6 Dir(s) 50,425,643,008 bytes free
C:\iso>DISM /Mount-Wim /WimFile:c:\iso\ms-iso\sources\install.wim /index:1 /MountDir:c:\iso\ms-mount
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Mounting image
[==========================100.0%==========================]
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\viostor\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\viostor\w8.1\amd64\viostor.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\Balloon\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\Balloon\w8.1\amd64\balloon.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\NetKVM\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\NetKVM\w8.1\amd64\netkvm.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\pvpanic\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\pvpanic\w8.1\amd64\pvpanic.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\qemupciserial /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\qemupciserial\qemupciserial.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\qxldod\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\qxldod\w8.1\amd64\qxldod.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\viorng\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\viorng\w8.1\amd64\viorng.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\vioscsi\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\vioscsi\w8.1\amd64\vioscsi.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-mount /Add-Driver /Driver:c:\iso\virtio-iso\vioserial\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\vioserial\w8.1\amd64\vioser.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Unmount-Wim /MountDir:c:\iso\ms-mount /commit
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image File : c:\iso\ms-iso\sources\install.wim
Image Index : 1
Saving image
[==========================100.0%==========================]
Unmounting image
[==========================100.0%==========================]
Error: 0xc1420117
The directory could not be completely unmounted. This is usually due to applications that still have files opened within the mount directory. Close these files and unmount again to complete the unmount process.
The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
C:\iso>DISM /Unmount-Wim /MountDir:c:\iso\ms-mount /discard
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image File : c:\iso\ms-iso\sources\install.wim
Image Index : 1
Unmounting image
[==========================100.0%==========================]
The operation completed successfully.
C:\iso>DISM /Mount-Wim /WimFile:c:\iso\ms-iso\sources\boot.wim /index:1 /MountDir:c:\iso\ms-boot
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Mounting image
[==========================100.0%==========================]
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\Balloon\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\Balloon\w8.1\amd64\balloon.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\NetKVM\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\NetKVM\w8.1\amd64\netkvm.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\pvpanic\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\pvpanic\w8.1\amd64\pvpanic.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\qemupciserial /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\qemupciserial\qemupciserial.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\qxldod\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\qxldod\w8.1\amd64\qxldod.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\viorng\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\viorng\w8.1\amd64\viorng.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\vioscsi\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\vioscsi\w8.1\amd64\vioscsi.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\vioserial\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\vioserial\w8.1\amd64\vioser.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>DISM /Image:c:\iso\ms-boot /Add-Driver /Driver:c:\iso\virtio-iso\viostor\w8.1\amd64 /recurse
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image Version: 10.0.10240.16384
Searching for driver packages to install...
Found 1 driver package(s) to install.
Installing 1 of 1 - c:\iso\virtio-iso\viostor\w8.1\amd64\viostor.inf: The driver package was successfully installed.
The operation completed successfully.
C:\iso>
C:\iso>DISM /Unmount-Wim /MountDir:c:\iso\ms-boot /commit
Deployment Image Servicing and Management tool
Version: 10.0.10240.16384
Image File : c:\iso\ms-iso\sources\boot.wim
Image Index : 1
Saving image
[==========================100.0%==========================]
Unmounting image
[==========================100.0%==========================]
The operation completed successfully.
C:\iso>
@rahulmr
Copy link
Author

rahulmr commented Aug 25, 2015

Dism /Export-Image /SourceImageFile:c:\temp\install.wim /SourceIndex:1 /DestinationImageFile:c:\temp\install.esd /Compress:recovery /CheckIntegrity

@rahulmr
Copy link
Author

rahulmr commented Aug 26, 2015

http://www.sevenforums.com/tutorials/15162-wim-file-extract-modify.html

RO - imagex /mount f:\install.wim 2 d:\mount
RW - imagex /mountrw f:\install.wim 2 d:\mount

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment