Install Linux VM Additions for Virtual Server 2005

Its been a while since Linux VM Additions have been released, but there still is no good writup on how to install them. This is how I do it on a Red Hat install. (I used CentOS 5.2)

Download Virtual Machine Additions for Linux from Microsoft.

Install the msi file and it will add the iso that you need to Virtual Server 2005’s UI.

Mount the iso via the web UI.

Log into the Virtual Machine.

At a Terminal Type:
yum update kernel*
shutdown -r now

After a reboot open the terminal again.

yum install kernel-devel gcc

mkdir /media/cdrom
mount /dev/cdrom /media/cdrom
mkdir /usr/src/vmadd
cp /media/cdrom/*.* /usr/src/vmadd
umount /dev/cdrom

cd /usr/src/vmadd
rpm -ivh vmadd-kernel-module-RHEL-2.0-1.i386.rpm
tail -100 /var/log/vmadd-kernel-module.log | more # Verify the main install didn’t error.

rpm -ivh vmadd-heartbeat-2.0-1.i386.rpm
rpm -ivh vmadd-shutdown-2.0-1.i386.rpm
rpm -ivh vmadd-timesync-2.0-1.i386.rpm

/etc/init.d/vmadd start
/etc/init.d/vmadd-heartbeat start
/etc/init.d/vmadd-timesync start
/etc/init.d/vmadd-shutdown start

shutdown -r now

*NOTE
If you ever need to uninstall the additions, uninstall in this order:

rpm -e vmadd-heartbeat
rpm -e vmadd-shutdown
rpm -e vmadd-timesync
rpm -e vmadd-kernel-module-RHEL


EDIT
Once after a large amount of yum updates, the additions broke. To fix the problem, I uninstalled the additions, changed back to my src directory and reinstalled with the same commands. It fixed everything.

Posted in linux, Virtual Machines | Comments Off on Install Linux VM Additions for Virtual Server 2005

Find Mac From IP

Today I wrote a little script that will find the MAC address of a given IP that is on the same LAN.

The script pings the IP, then it checks the ARP cache to find the MAC. Pretty simple, yet very useful.

Download FindMacFromIP.vbs

Usage: cscript findmacfromip.vbs ‘IP Address’

Posted in troubleshooting, windows | Comments Off on Find Mac From IP

Schedule Outlook appointment in X number of days

In Outlook it is easy to find out what is X number of days away.

Open Outlook and flip to the calendar page. Click the New Appointment button. In the date field, type 60d (replace the 60 with the number of days in advance).

Posted in outlook | Comments Off on Schedule Outlook appointment in X number of days

Use Windows Server 2008 R2 as a desktop OS

I am very happy with Window 7. I enjoy the OS quite a bit. The only problem that I have is, there is very poor virtual machine support. Other people may disagree with me here, but I don’t like Windows Virtual PC.

I have been using Microsoft’s Virtual PC 2007 for years. I like the product, it is easy to use and it is compatible with Microsoft’s Virtual Server 2005 (which I use extensively). The new product however, is very difficult to configure, is much more difficult to import existing machines into Virtual Server 2005, and does not have 64 bit virtual machine support.

The lack of 64 bit VMs is the largest flaw of the product. Microsoft claims that VM support in Windows 7 is for compatibility with older software and that is why it doesn’t need to be 64 bit. I think that it is stupid that my OS, and CPU are 64 bit, but Microsoft will not let me use those features when working with virtual machines. The worst part about it is that Windows Server 2008 R2 is 64 bit ONLY. The new OS that Microsoft wants us to work with will not run as a VM on their desktop software.

The way around this flaw in Microsoft’s technology that I use is by running Windows Server 2008 R2 on my desktop. Here is how I do it:

1: Enable Hardware Virtualization

This part is very important. My goal is to be able to run 64 bit virtual machines. To do this, I plan on installing Hyper-V. A prerequisite to Hyper-V is Hardware Virtualization, thus we need to enable it first.

You can enable Hardware Virtualization in the BIOS. It is different in every BIOS, but it is usually under the CPU Options.

2: Install Server 2008 R2

Install Windows just like you normally would. (For me this means install windows to at least an 80 GB partition. I like to keep all my data on a different partition to 80GB is enough for me.)

3: Enable Autologon, Disable Shutdown Event Tracker, and change password requirements

At my home, I like my computer to autologon. I am the only one that uses it, so selecting a user and entering a password is a waste of time. Also I don’t want to have to enter a reason I shut down my computer every night when I go to bed.

Change Password Requirements

Click Start(now the Windows logo in the bottom left corner)->Administrative Tools->Local Security Policy. Expand Account Policies and click Password Policy. I like to change history to 0, Min and Max age to 0, length to 3, and complexity to Disabled.

Autologon

Open a command prompt and type control userpasswords2. This will open a dialog allowing you to enable autologon. Uncheck the box that says ‘Users must enter a user name and password to use this computer’ and click OK. Enter your username and password and click OK again.

Shutdown Event Tracker

Click Start and type mmc. Click File->Add/Remove Snap-in…, add the Group Policy Object Editor snap-in, select the Local Computer and click OK twice. Now expand Local Computer Policy->Computer Configuration->Administrative Templates. Click on System and browse to ‘Display Shutdown Event Tracker’. Set it to Disabled.

4: Update all your drivers

I know that the new Windows Update will try to find the best drivers for you, but since this is the server OS, it will not find you the best Audio or video drivers, so you should update these on your own. (I would never trust Windows Update to install any drivers unless I absolutely had too. I trust a vender’s website much more than Microsoft.)

If you cannot find Server 2008 R2 drivers, try Windows 7 X64 drivers, then Server 2008 x64 drivers, then Windows Vista x64 drivers. You should be able to find something that works.

5: Install important Roles (Hyper-V, File Services)

After I do my driver install, I install all of the Windows Roles that I fell I will need. I install two roles, Hyper-V and File Services. Hyper-V allows you to work with Virtual Machines and File Services adds Windows Search.

Open Server Manager -> Roles. Click Add Roles, Next, Check the boxes next to File Services and Hyper-V. On the Select Role Services Screen for File Services add the Windows Search Service. Click Next and Finish. The computer will reboot before the roles are finished installing.

6: Add Features

After the Roles comes the Features. I install the Desktop Experience, and Ink Support features so I can enable Aero, and I install the telnet client because I use the telnet client for work.

Open Server Manager -> Features. Click Add Features, Next, Select Desktop Experience, Ink and Handwriting Services->Ink Support, and Telnet Client. Click Next and Finish. Computer may reboot before feature installation completes.

7: Disable IE Enhanced Security

If you plan on browsing the web using IE, you are really going to want to disable the Enhanced Security that comes with the server OS.

Open Server Manager, find the Security Information section and click Configure IE ESC. Set IE ESC to off for Administrators and Users.

8: Enable Aero

Now that we have a working OS, we can work on the eye candy. We need to enable Aero and Windows Audio.

Click Start and type services.msc. Find the Themes Service and the Windows Audio Service and set them to Automatic Start. Reboot. After the reboot, Right click on the desktop and select Personalize. In the center section, select the Windows 7 theme under Aero Themes. Click OK and you now have Audio and Aero.

9: Setup the Wireless LAN Service (If you need wireless)

To make a wireless adapter work in Windows 2008 R2 you need to add a new feature called the Wireless LAN Service.

Open Server Manager -> Features. Click Add Features, Select Wireless LAN Service, Click Next and Install.

 

That is how I install and configure Windows Server 2008 R2 as a desktop OS.

 

Here is how to install the Zune Software on Windows Server 2008 R2.

EDIT: I have done some googleing and have found a couple new changes that you might like to try.

vijaysk adds:

1: Processor Scheduling

In the Server OS, background Services are given preference over interactive programs. To fix this, Right Click on My Computer (just Computer now), Select Properties -> Advanced System Settings -> Advanced Tab -> Under Performance Select Settings -> Open the Advanced Tab. Under Processor Scheduling select Programs.

2: Visual Effects

In Server 2008 R2 you will not see any thumbnails by default.

Right Click on My Computer (just Computer now), Select Properties -> Advanced System Settings -> Advanced Tab -> Under Performance Select Settings. Tweak as you see fit.

3: Power Options

Windows Server 2008 R2 by default does nothing to save the earth. You can adjust the power settings by Opening Control Panel -> Hardware and Sound -> Power Options.

John Savill adds how to add Gadgets to Server 2008 R2.

4: Gadgets

To add gadgets to Windows Servero 2008 R2, Copy the ‘Program FilesWindows Sidebar’ folder from a 64 bit version of Windows 7 to the ‘Program Files’ Folder of the Server 2008 R2 install. Copy the shortcut ‘Desktop Gadget Gallery’ from the start menu of any copy of Windows 7 to the Start menu of the Server 2008 R2 install.

From an elevated command prompt run:
Regsvr32 atl.dll
regsvr32 “C:Program FilesWindows Sidebarsbdrop.dll”
regsvr32 “C:Program FilesWindows Sidebarwlsrvc.dll”
“C:Program FilesWindows Sidebarsidebar.exe” /RegServer

Now Copy the following lines into Gadgets.reg and import it into the registry.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSidebar]

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSidebarCompatibility]

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSidebarSettings]
“SidebarDockedPartsOrder”=”0x1,0x2,0x3,0x4

 

Posted in windows, Windows Server 2008 | Comments Off on Use Windows Server 2008 R2 as a desktop OS

Install Zune Software on Windows Server 2008 (R2)

This weekend I reinstalled my desktop at home. I decided to use Windows Server 2008 R2 as the OS. (Click Here to view my guide on installing Windows 2008 as a desktop OS)

One problem I had during the setup is that the Zune Software setup will block the install on a non-approved OS like Windows Server 2008. I played around for a while and found out how to install the software.

  • Download the software.
  • Login to the computer with the local administrator account.
  • From a command line, run zunesetuppkg-x64.exe /x. Then give a location to extract files to. C:/ZuneTemp
  • Browse to the packages folder.
  • Right-Click on Zune-x64.msi and click Install
  • Follow the prompts like a regular install of the software.

I did this install on Windows Server 2008 R2 with the Zune Software version 4.2.202.0

Posted in Windows Server 2008 | 1 Comment

Find Operations Masters in Active Directory

EDIT: I have found a much easier way to list the FSMO Roles holders.
From a command line on any domain controller, Type netdom query FSMO

 

Thanks to Microsoft, I have an easy solution to finding the FSMO Roles holders in a domain.

To output all the FSMO Role holders of a domain:

Download the file dumpfsmos.zip, extract the file, and run dumpfsmos.bat from the command line with a single argument of a domain controller.

dumpfsmos.bat MyDC01

To change any of the Operations Masters Follow these instructions.

Posted in Active Directory, bat, troubleshooting, windows | Comments Off on Find Operations Masters in Active Directory

Change Operations Masters in Active Directory

Each FSMO Role has a different procedure to change the owner:

RID, PDC, and Infrastructure Roles:

From the computer that you want to make the new FSMO Role holder:

  • Open Active Directory Users and Computers MMC
  • Right-Click on the Domain Name
  • Select ‘Operations Masters…’
  • Select the tab that you would like to change
  • Click the ‘Change’ button
  • Verify that you want to change the FSMO Holder by clicking ‘Yes’Domain Naming Role:From the computer that you want to make the new FSMO Role holder:
    • Open Active Directory Domains and Trusts MMC
    • Right-Click on the Domain Name
    • Select ‘Operations Master…’
    • Click the ‘Change’ button
    • Verify that you want to change the FSMO Holder by clicking ‘Yes’Schema Master Role:From the computer that you want to make the new FSMO Role holder:
      • Open the start menu and click ‘Run’
      • Type ‘mmc’ and click ‘OK’
      • Click File -> Add/Remove Snap-in
      • Click ‘Add’, select ‘Active Directory Schema’*, and click ‘Add’
      • Click ‘Close’, then ‘OK’
      • Left-Click, then Right-Click on ‘Active Directory Schema’
      • Select ‘Operations Master…’
      • Click the ‘Change’ button
      • Verify that you want to change the FSMO Holder by clicking ‘Yes’

      * if you do not see ‘Active Directory Schema’ in the list, you need to register schmmgmt.dll. To do this, run regsvr32 schmmgmt.dll at a command line, then re-open the ‘Add/Remove Snap-in’ menu.

      To view what Domain Controller holds which FSMO Roles, see this post.

Posted in Active Directory, troubleshooting, windows | 1 Comment

Use Apache, PHP, and MSSQL on Windows

This is how I made the php_mssql extension work on my Windows/Apache/MSSQL/PHP (WAMP) Server.

Download Apache. (I used the Win32 Binary including OpenSSL 0.9.8m (MSI Installer))

Download PHP. (I used the PHP 5.2.13 zip package)

Download ntwdblib.dll.

 

Run the apache installer, select custom install and change the install path t0 ‘C:/Apache2.2’

Extract the php zip file to ‘C:/PHP’

Open C:/PHP and copy php.ini-recomended to php.ini

Open php.ini and edit the following lines:
Set extension_dir = “C:/PHPext”
Un-comment php_mssql.dll
Set error_log = “C:/Apache2.2/logs/phperr.log”

Open C:/Apache2.2/conf/httpd.conf and edit the following lines:
DirectoryIndex index.php
LoadModule php5_module C:/PHP/php5apache2_2.dll
AddType application/x-httpd-php .php
PHPIniDir “C:/PHP”

Add “C:/PHP” to the PATH Environment variable

Replace the file C:/PHP/ntwdblib.dll with the copy you just downloaded (v2000.80.194.0)

Restart the Apache service

 

You can now use all the mssql functions in your php code without errors

Posted in apache, php, sql, windows | Comments Off on Use Apache, PHP, and MSSQL on Windows

Dell PowerConnect CLI – Change Management IP

I locked myself out of the UI on one of my Dell switches today. I spent 20 minutes looking through Dell manuals until I found the answer.

To change the management IP of a Dell switch:

Console# configure
Console (config)# interface vlan 1
Console (config)# no ip address (Removes the existing IP)
Console (config)# ip address [IP] [subnet mask]
Console (config)# end
Console# copy run start

Posted in cli, dell, PowerConnect | Comments Off on Dell PowerConnect CLI – Change Management IP

Userenv Events 1030 and 1058

I keep getting Userenv errors 1030 and 1058 on one of my domain controllers.

The description of Event ID 1058 says “Windows cannot access the file gpt.ini for GPO CN={31B2F340-016D-11D2-945F-00C04FB984F9}, CN=Policies, CN=System, DC=MyDomain, DC=com. The file must be present at the location <\MyDomain.com sysvol MyDomain.com Policies {31B2F340-016D-11D2-945F-00C04FB984F9} gpt.ini>. (Access is denied. ). Group Policy Processing aborted.”

This problem has plagued me for quite a while. I have checked permissions on the file, the folder and the root drive. Everything looked normal. I couldn’t figure out what to do, so… I decided to do nothing. Everything appeared to be working fine.

A couple months later I decided to cleanup active directory a little bit. I opened the Group Policy manager and deleted all of my unused GPOs. The next day, I noticed that the Userenv errors quit showing up. I was quite happy with myself. My patience (procrastination) paid off.

The next week however I noticed that I was getting the errors in a different environment. I was a little put out. I didn’t want to randomly delete GPOs until the problem went away, so I googled again. I came across a solution. It was so simple, I was angry that I lived with the error for so long. All I had to do was open the security page of all the GPOs and reset the ACL. After 5 minutes I fixed the error and have not seen it since.

 

In conclusion, to fix Userenv Events 1030 and 1058 that are caused by Access Restrictions:

  • Download and install the Group Policy Management Console.
  • Open the Group Policy Management MMC and browse to Forest: -> Domains -> MyDomain.com -> Group Policy Objects.
  • Click on the first object. Open the Delegation Tab.
  • Click on a user and then the Advanced… button in the bottom corner.
  • Uncheck and recheck any check box.
  • Click OK and repeat on every GPO. (This causes the ACL to be rewritten and permission granted the the broken GPO.)
Posted in windows | Comments Off on Userenv Events 1030 and 1058