New SCSI controller causes Windows to prompt for a reboot after installing the device

Troubleshooting

  • KB #: 36402
  • Last Updated: October 20, 2015

Issue

(Applies to Version 2.6 and later) New SCSI controller causes Windows to prompt for a reboot after installing the device.

Procedure

When powering on a machine after changing to a new host, you are immediately presented with a dialog box saying:

"You must restart your computer to apply these changes"

Summary: If the following applies to you, you need to edit the OS layer to record the specific SCSI controller information for your system.

When Windows detects a new piece of hardware (like a CPU, motherboard or SCSI controller), the first time you login after the change, you will see a popup that says "You must restart your computer to apply these changes". That's normal Windows functionality.

In a Unidesk environment, we go to some length to keep that from happening. We record the CPU and motherboard (ACPI_HAL) device information faithfully during creation. However, the SCSI controllers are not always present at desktop creation. We add them as needed to support the number of layers assigned to a desktop. The 13th layer assigned to a desktop will become the first target on the second controller, so a desktop created with 12 or fewer layers will only be created with one SCSI controller. When you add the 13th layer later, we add a second controller. To prevent Windows from prompting for a restart, we try to pre-populate the registry with what we think the SCSI controllers are going to look like when Windows starts.

The first thing you must do when you get that prompt is capture C:\Windows\inf\setupapi.dev.log. Jump to the bottom of the file, search backwards for the word "reboot", and see what the failing devices are.

If they look like disks being detected, then it's a SCSI controller issue.

>>> [Device Install (Hardware initiated) - scsi\disk&ven_vmware&prod_virtual_disk\5&174a0eaf&0&000100]
>>> Section start 2014/01/15 14:38:58.312
...
! dvi: Query-removal during install of 'SCSI\DISK&VEN_VMWARE&PROD_VIRTUAL_DISK\5&174A0EAF&0&000100' was vetoed by 'STORAGE\Volume\{8599b8f8-7e1c-11e3-acaf-806e6f6e6963}#0000000000000200' (veto type 6: PNP_VetoDevice).
! dvi: Device required reboot: Query remove failed (install) 0x17: CR_REMOVE_VETOED.

When Unidesk pre-populates the controller information, we have to predict a number of values collectively called the magic number. We often are correct, but there are circumstances where we consistently are wrong. For those, we need to just record, in the OS layer or an application layer, the controller information that VMware will use, and we will use that for all desktops.

You must be at Unidesk 2.6 or later.

You can configure the SCSI controllers in either an OS revision or a application layer. The producer is the same for both as the changes involve the install machine that is being used for the update. For the purpose of these instructions we will talk about making a new OS revision since that will be the most common use case.

  1. In the UDMC in the OS layers tab, select the OS you want to update and "Add Version" following all of the normal steps.
  2. Wait for the install machine to indicate that it is up and running and you are ready to edit the revision.
  3. Using vSphere edit the settings on the IM desktop machine.
  4. Note the type of "Network adapter". Remove the board (you will put it back in later).
  5. Add a hard disk (Create new, Disk Size of 1 MB, Virtual Device Node of SCSI (1:0)
    Add a hard disk (Create new, Disk Size of 1 MB, Virtual Device Node of SCSI (2:0)
    Add a hard disk (Create new, Disk Size of 1 MB, Virtual Device Node of SCSI (3:0)

    NOTE: If using the vSphere web client. You need to first add new SCSI controllers before the new disk will let you select nodes 1:0, 2:0, and 3:0. I am unsure if you even still need to add the new disks at this point but it doesn't hurt to still do so.
  6. Click OK to complete the edit. You should see vSphere update the desktop settings. Wait for that to complete.
  7. We have seen times where Windows and VMWare have not updated the information or places the information in the wrong location within the registry, so the IM is required to be shutdown at this time. Do NOT simply reboot, the IM must be completely powered off and then restarted.
  8. Log into the IM using an administrator account.
  9. Open a command window selecting "Run as administrator". Navigate to c:\Program Files\Unidesk\Uniservice. Issue the command: "uniservice -s".
  10. Verify that the settings have been added to the registry by doing a regedit. Navigate to HKLM\System\CurrentControlSet\Services\Uniservice\SCSIControllers:

    Verify that the UINumber for controller 0 is set to A0.
    Verify that the UINumber for controller 1 is set to C0.
    Verify that the UINumber for controller 2 is set to E0.
    Verify that the UINumber for controller 3 is set to 100.
  11. Go back to vSphere and edit the settings of the IM desktop again. Add the network board back by selecting the "Ethernet Adapter", setting the Adapter Type to the type that you removed, and make sure that you select the correct network. Click to remove the three small disks that were added, and select that you want to remove them from virtual machine and delete them from disk. Click to remove the SCSI controllers as well.
  12. Click the OK to complete the edit. You should see vSphere update the desktop settings. Wait for that to complete.
  13. We have seen times where Windows and VMWare have not updated the information or places the information in the wrong location within the registry, so the IM is required to be shutdown at this time. Do NOT simply reboot, the IM must be completely powered off and then restarted.
  14. Finalize the OS revision.

You are now ready to deploy the revision to the desktops. The registry will be pre-populated with the magic number information collected from the Install Machine, rather than with Unidesk's best guess.