Windows – Install drivers on Windows Server using dism while online

dismwindowswindows-server-2008windows-server-2012-r2

We're in the process of migrating Windows Server virtual machines between cloud infrastructure. In certain circumstances (HyperV Gen2 UEFI) servers, the system will fail to boot unless we install the storage driver ready for post migration boot up.

While this works when doing it offline using (eg the disk attached to another server and injecting the driver) :

dism /image:C:\ /add-driver /driver:E:\win7\amd64\viostor.inf

To streamline the process we would like to install the driver while the machine is online. Unfortunately dism is requiring the disk to be offline, returning the error "This command can only be used with an offline image".

We have tried pnputil to install the driver but this does not work, we believe this is because pnputil is for plugged in hardware with no driver currently.

Is there a way to install a driver into an online image?

Best Answer

  1. Copy the driver data to the online system
  2. Right Click on the ".INF" file
  3. Select "Install"

enter image description here