Best Practices for Shared Virtual Machines
I was working with a shared VPC the other day and I thought I'd share some of my thoughts on how to make them a little easier to work with.
Turn off the Shutdown Event Tracker
The Shutdown Event Tracker is a feature in Windows Server that prompts the user to explain why they are shutting down or restarting the server. While this is a useful feature for production servers, it's just annoying for shared virtual machines. If you're not sure what I'm talking about, here's a screen shot of the dialog displayed by the Shutdown Event Tracker:
To prevent Windows Server from display this dialog when someone shuts down the virtual machine, follow the steps below:
Run the Group Policy Object Editor (gpedit.msc)
Navigate to the Local Computer Policy > Computer Configuration > Administrative Templates > System node in the tree control on the left and double click the "Display Shutdown Event Tracker" item on the right.
Click the "Disabled" radio button to disable the Shutdown Event Tracker.
Turn on Automatic Logon
Keeping track of logon credentials for shared virtual machines is cumbersome. You generally end up creating a text file with the credentials and placing that text file in the directory with the virtual machines files and hope that they stay together as a set. The easier way to do it is to enable automatic logon in the virtual machine.
Run the Registry Editor (regedt32.exe).
Locate the following key in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinlogonDouble-click the DefaultUserName entry, type your user name, and then click OK.
Double-click the DefaultPassword entry, type your password, and then click OK. NOTE: If the DefaultPassword value does not exist, it must be added. To add the value, follow these steps:
- On the Edit menu, click New, and then point to String Value.
- Type DefaultPassword, and then press ENTER.
- Double-click DefaultPassword.
- In the Edit String dialog, type your password and then click OK.
NOTE: If no DefaultPassword string is specified, Windows automatically changes the value of the AutoAdminLogon key from 1 (true) to 0 (false), disabling the AutoAdminLogon feature.
On the Edit menu, click New, and then point to String Value.
Type AutoAdminLogon, and then press ENTER.
Double-click AutoAdminLogon.
In the Edit String dialog box, type 1 and then click OK.
Quit the Registry Editor.
Note: To bypass the AutoAdminLogon process and to log on as a different user, hold down the SHIFT key after you log off or after Windows restarts.
Additional Software
Consider installing some additional software for to make the virtual machine more convenient to use.
- BgInfo. How many times have you walked up to a system in your office and needed to click through several diagnostic windows to remind yourself of important aspects of its configuration, such as its name, IP address, or operating system version If you manage multiple computers you probably need BGInfo. It automatically displays relevant information about a Windows computer on the desktop's background, such as the computer name, IP address, service pack version, and more. You can edit any field as well as the font and background colors, and can place it in your startup folder so that it runs every boot, or even configure it to display as the background for the logon screen.
If you have any other suggestions on how to make shared VPCs easier to work with. I'd love to hear them!
Comments
- Anonymous
October 03, 2008
Apropos of sharing virtual machines: Visual Studio's IDE does not work well at all on a shared machine. In fact, there are glitches when you have windows open as yourself and as Administrator in the same workspace on a UAC system. If you run into a bored SDET with a Visual Studio IDE brief you might drop a suggestion about this.