server2016完美添加virtio驱动

server2016
1,查看:
dism /get-wiminfo /wimfile:C:\install.wim
dism /get-wiminfo /wimfile:C:/boot.wim
2,
挂载install.wim映像第2个索引标准版带GUI,添加驱动
dism /mount-wim /wimfile:C:\install.wim /index:2 /mountdir:C:\mnt
安装进度条约2分钟
dism /image:C:\mnt /add-driver /driver:C:\virtio\NetKVM\2k16\amd64\netkvm.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioscsi\2k16\amd64\vioscsi.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\viostor\2k16\amd64\viostor.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\viorng\2k16\amd64\viorng.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioserial\2k16\amd64\vioser.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\Balloon\2k16\amd64\balloon.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qxldod\2k16\amd64\qxldod.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\pvpanic\2k16\amd64\pvpanic.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qemupciserial\2k16\amd64\qemupciserial.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qemufwcfg\2k16\amd64\qemufwcfg.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioinput\2k16\amd64\vioinput.inf /forceunsigned
获取已经添加好的驱动
dism /image:C:\mnt /get-drivers
成功后卸载并保存
dism /unmount-wim /mountdir:C:\mnt /commit
进度条约2分钟
查看boot.wim
dism /get-wiminfo /wimfile:C:/boot.wim
挂载1
dism /mount-wim /wimfile:c:\boot.wim /index:1 /mountdir:C:\mnt
dism /image:C:\mnt /add-driver /driver:C:\virtio\NetKVM\2k16\amd64\netkvm.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioscsi\2k16\amd64\vioscsi.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\viostor\2k16\amd64\viostor.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\viorng\2k16\amd64\viorng.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioserial\2k16\amd64\vioser.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\Balloon\2k16\amd64\balloon.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qxldod\2k16\amd64\qxldod.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\pvpanic\2k16\amd64\pvpanic.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qemupciserial\2k16\amd64\qemupciserial.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qemufwcfg\2k16\amd64\qemufwcfg.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioinput\2k16\amd64\vioinput.inf /forceunsigned
卸载和保存1
dism /image:C:\mnt /get-drivers
dism /unmount-wim /mountdir:C:\mnt /commit
挂载1
dism /mount-wim /wimfile::\boot.wim /index:2 /mountdir:C:\mnt
dism /image:C:\mnt /add-driver /driver:C:\virtio\NetKVM\2k16\amd64\netkvm.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioscsi\2k16\amd64\vioscsi.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\viostor\2k16\amd64\viostor.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\viorng\2k16\amd64\viorng.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioserial\2k16\amd64\vioser.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\Balloon\2k16\amd64\balloon.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qxldod\2k16\amd64\qxldod.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\pvpanic\2k16\amd64\pvpanic.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qemupciserial\2k16\amd64\qemupciserial.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\qemufwcfg\2k16\amd64\qemufwcfg.inf /forceunsigned
dism /image:C:\mnt /add-driver /driver:C:\virtio\vioinput\2k16\amd64\vioinput.inf /forceunsigned
卸载和保存2
dism /image:C:\mnt /get-drivers #获取添加的驱动信息
dism /unmount-wim /mountdir:C:\mnt /commit #卸载

封装新的 ISO 镜像
  1. 使用 UltraISO 打开原 Windows ISO 安装盘镜像。
   注意,这里可就不能使用压缩软件了,否则会丢失 ISO 的引导数据。
  2. 在 sources 文件夹下,删除boot.wim与install.wim。
  3. 将添加好驱动的boot.wim与install.wim拖到 sources 下。
  4. 点击【文件】→【另存为】,保存出一个新 ISO 镜像即可。