Friday, November 30, 2007

Windows Policies and Settings for Virtual Machines

Here are a few useful configuration settings for Windows when installing as virtual machines (VMWare, Virtual PC, Virtual Server, etc.) Some of these settings are inappropriate for production systems; I'll try to clarify in those cases.

Clear Pagefile on Shutdown


This will help reduce the VM's disk space demands. Although many VM hosts may take of this directly, to make sure it's cleared out set the following Group Policy Object (GPO)



Local Computer Policy\Computer Configuration\Windows Settings\Security
Settings\Local Policies\Security Options\Shutdown: Clear virtual memory
pagefile

Allow Shutdown Prior to Logon (Non-Production)


It's valuable for personnel who can't log on to a VM (no access, forgot password, etc.) to be able to shutdown the OS w/o logging in. Enable the following GPO:


Local Computer Policy\Computer Configuration\Windows Settings\Security
Settings\Local Policies\Security Options\Shutdown: Allow system to be shutdown without having to log on

Allow Power Users to Shutdown the OS (Non-Production)


Add the local Power Users group to the following GPO:


Local Computer Policy\Computer Configuration\Windows Settings\Security
Settings\Local Policies\User Rights Assignment\Shutdown the system

Monday, November 26, 2007

Visual Studio 2008 Unattended Setup Fails on Longhorn

Problem: Visual Studio 2008 unattended setup from DVD fails on Windows Server 2008 (Longhorn) RC0
Root Cause: Unattended setup is not supported from DVD
Work-Around: Run unattended setup from a network share.

We had the bright idea for unattended Visual Studio 2008 setup. The theory was that we would create the unattend file using setup's CreateUnattend switch, copy it to the DVD and update autorun to trigger the unattended installation. All our devs would need to do is load the DVD, go get a cup of coffee and voilĂ ! VS 2008 would be ready for action.

Unfortunately, it didn't work as expected. After several attempts with minor changes (full path, quoted path, etc.), I finally dug into the log files (in \Users\AppData\Local on Longhorn). Setup creates at least 3 log files in this folder - dd_depcheck_VS_PRO_90.txt, dd_error_vs_procore_90.txt and dd_install_vs_procore_90.txt. The error file was sufficiently helpful. The first 2 lines show:


[11/26/07,15:45:23] vs70uimgr: [2] Admin deployment is not allowed from a
CD/DVD.

[11/26/07,15:45:23] setup.exe: [0] InitializeUIManager(), Start
failure

That's pretty clear and straight-forward.