Using Sysprep Instead of QuickPrep with VMware View Desktop Pools

Sometimes you need Sysprep instead of QuickPrep when creating a VMware View linked-clone desktop pool, usually because legacy software requires a unique local security identifier (SID) on every desktop. I was recently asked about it because an older antivirus product needed unique SIDs to centrally manage its in-OS agents.

The two customization methods are compared in the View Administration Guide (pages 95–96), and VMware KB 2003797 sums up the differences:

QuickPrep vs. Sysprep

FunctionQuickPrepSysprep
Removing local accountsNoYes
Changing Security Identifiers (SID)NoYes
Removing parent from domainNoYes
Changing computer nameYesYes
Joining the new instance to the domainYesYes
Generating new SIDNoYes
Language, regional settings, date, and time customizationNoYes
Number of reboots01 (seal & mini-setup)
Requires configuration file and SysprepNoYes

High-Level Steps

  1. Copy the Sysprep files to the vCenter Server. This is only needed for Windows XP; Windows 7 includes Sysprep. Details are in VMware KB 1005593.
  2. Create a guest customization specification in vCenter.
  3. Add a desktop pool that uses Sysprep with that customization specification.

Create a Guest Customization Specification

In vCenter, open Home → Customization Specification Manager, click New, and enter a name on the Properties page. Do not use a custom Sysprep answer file.

Customization specification Properties page in vCenter

Continue to the Computer Name page and set it to use the virtual machine name. Then enter your license key, administrator password, time zone, and so on until you reach the Network page.

Leave the network at the default Typical settings so the desktops use DHCP.

Network page set to typical settings (DHCP)

Leave the Workgroup or Domain page at its default. Anything entered here is ignored; the VM joins the domain using the guest customization settings in the View pool instead.

Workgroup or Domain page left at default

On the final Operating System Options page, make sure Generate New Security ID (SID) is checked. Unique SIDs are the whole reason we’re using Sysprep. Then finish the wizard.

Generate New Security ID (SID) option checked

Add the Desktop Pool

In View Manager, add a desktop pool as usual. The only difference from QuickPrep is on the final Guest Customization page:

  • Select the Domain. This list (usually just one entry) comes from the domains you defined for View Composer when you configured vCenter in View Administrator. It controls which domain the linked clones join and which credentials are used.
  • Select the Active Directory container as normal.
  • Choose Use a customization specification (Sysprep) and select the spec you created.
View pool Guest Customization page using a Sysprep customization specification

Finish the wizard and the pool will deploy. Provisioning is a bit slower than with QuickPrep because each linked clone needs an extra reboot.

What Happens When View Customizes with Sysprep

  1. Once the linked clone disks are created, View Manager puts the VM into the Customizing state.
  2. View Manager calls the vCenter API customizeVM_Task to apply the customization specification.
  3. View Manager powers on the linked clone.
  4. Inside the guest, the View Composer Agent sees it’s starting for the first time and calls NetJoinDomain with the machine password cached on the internal disk.
  5. The machine is now joined to the domain.
  6. Sysprep runs inside the guest.
  7. The View Composer Agent waits for Sysprep to finish, then tells the View Agent customization is complete, and the View Agent notifies the View Manager server.
  8. View Manager powers off the clone and snapshots it in its customized state, which becomes the refresh point.
  9. View Manager marks the linked clone Provisioned. When powered on, it moves to Available.

How to Recover a Windows Server 2003 Software RAID Mirror After Losing the Primary Drive

If you’ve lost the primary drive in a Windows Server 2003 software RAID mirror, on purpose or not, you can get the server booting again from the Recovery Console.

Steps

  1. Boot from the Windows Server 2003 installation disc.
  2. Press R to start the Recovery Console.
  3. Select your Windows installation and enter the Administrator password.
  4. Check the disk, then rebuild the boot configuration:
chkdsk /p
bootcfg /rebuild

Reboot, and Windows should start from the remaining mirror drive. You can then replace the failed disk and re-add the mirror in Disk Management.

After a P2V Conversion: Fix the Windows HAL and Clean Up Old Hardware in VMware

After converting a physical Windows server to a VMware virtual machine (P2V), there’s some cleanup to do, especially if you went from a multi-processor system to a single vCPU. Here’s my checklist.

1. Switch the HAL from Multi-Processor to Uni-Processor

If you change from a multi-processor to a uni-processor system, you have to change the Windows HAL manually after the conversion.

  1. Let the VM boot and discover its new hardware, then open Device Manager.
  2. Expand Computer, right-click the processor entry, and choose Update Driver.
  3. Choose Install from a specific location, then Don’t search. I will choose the driver to install.
  4. Select Show all compatible hardware and pick the right one. For example, going from dual CPU to single CPU, choose ACPI Uniprocessor PC instead of ACPI Multiprocessor PC.
  5. Reboot.

To check which HAL is in use, right-click C:\Windows\System32\hal.dll, open the Version tab, and look at Internal Name: halmacpi.dll means multi-processor ACPI and halacpi.dll means uni-processor ACPI.

2. Remove Non-Present (Ghost) Hardware

Open a Command Prompt and run:

SET DEVMGR_SHOW_NONPRESENT_DEVICES=1
DEVMGMT.MSC

In Device Manager, choose View → Show hidden devices and delete any old, grayed-out hardware.

3. Remove Vendor-Specific Software and Drivers

  • Uninstall hardware vendor tools in Add/Remove Programs. On an HP server, for example, remove the HP management agents, survey utility, array configuration utility, and version control agent.
  • Make sure the NIC isn’t using vendor-specific drivers or software, such as NIC teaming.
  • Review Services and disable anything tied to the old hardware vendor.

How to Mount a Samba (CIFS) Share with a Username and Password in Linux

Many Samba shares on Linux, and shares on Windows Vista and Windows 7, require a username and password before they’ll let you in. Those credentials are set on the server:

  • Windows Vista/7: the login username and password of the share owner on that machine.
  • Linux Samba: any member of the server’s Samba user database who is allowed by the share’s definition.

Mount the Share with Credentials

Instead of the guest option, pass username= and password=:

mount -t cifs -o username=server_user,password=secret //192.168.44.100/share /path_to/mount

To mount it at boot, or to fix write permissions for non-root users, see fixing CIFS mount permissions with file_mode and dir_mode.

How to Manage and Delete Wireless Network Profiles in Windows 8.1

My tablet kept having trouble connecting to different wireless networks that used the same SSID. The fix was managing the saved Wi-Fi profiles directly. Here’s how to view, change, and delete wireless network profiles in Windows 8.1 and Windows RT 8.1.

Change a Wireless Profile in PC Settings

  1. Swipe in from the right edge of the screen (or point to the upper-right corner with a mouse), tap Settings, then Change PC settings.
  2. Go to Network → Connections and choose the connection you want to change.
  3. Make your changes on the page that appears.

Manage Wi-Fi Profiles with netsh

Some tasks, like deleting a profile, have to be done from the Command Prompt. Search for “Command Prompt” from the Start screen, open it, and use these commands:

Show all wireless profiles on the PC:

netsh wlan show profiles

Delete a profile:

netsh wlan delete profile name="ProfileName"

Show a saved Wi-Fi password (security key):

netsh wlan show profile name="ProfileName" key=clear

Stop automatically connecting to a network that’s out of range:

netsh wlan set profileparameter name="ProfileName" connectionmode=manual

To move a network up the priority list, connect to it and choose Connect automatically; it goes to the top. To stop auto-connecting to a network that’s in range, select it in the network list and click Disconnect.

How Windows Chooses Which Network to Use

Windows usually prefers connections in this order: Ethernet, then Wi-Fi, then mobile broadband. Each new Wi-Fi network you join is added to the list, and if you connect to a second Wi-Fi network while the first is in range, Windows will prefer the second one from then on.

Mobile broadband is treated differently because it’s usually metered. If you manually connect to mobile broadband while Wi-Fi is in range, it’s preferred only for that session. To make your PC prefer mobile broadband over a Wi-Fi network, select that Wi-Fi network and click Disconnect, and Windows won’t connect to it automatically.

How to Re-register a Windows Client or Server in WSUS

When a Windows client or server stops reporting to WSUS (Windows Server Update Services), you can usually force it to re-register with a few commands. Run them on the affected machine from an elevated Command Prompt.

Steps to Re-register with WSUS

1. Refresh Group Policy so the machine picks up the WSUS server settings:

gpupdate /force

2. Trigger update detection:

wuauclt /detectnow

3. If it still doesn’t appear, reset the authorization cookie and detect again:

wuauclt.exe /resetauthorization /detectnow

Tip: Check Event Viewer on the client to confirm the re-registration went through.