Wednesday, April 21, 2010

Hyper-V MAC conflicts

So here's an interesting one I came across recently;

When you run (in this case) HP Teaming on your NICs with Hyper-V on Server 2008 R2 you will get the following error... a lot.

Port {Teaming NIC GUID} was prevented from using MAC address {MAC of a VM} because it is pinned to port {GUID of VMs NIC}.

The real symptom is erratic pings and/or connectivity to your VMs. It will show mostly as 1 or 2 dropped packets every now and then.

Reason is, after 2008 R2 the networking in Hyper-V was secured to prevent MAC spoofing (A huge vulnerability up to this point). Problem is, the HP Teaming NIC want to effectively spoof all the MACs behind it, so it can control the load balancing etc... tsk tsk, what to do, what to do...

Solution is simple, thankfully there's a real easy tick box to turn that shiz off;
(This is from within System Centre Virtual Machine Manager, but same setting is there in Hyper-V Manager)



















Hopefully this saves someone some pain.

EDIT: Please post your mileage on this one if you do come across it. Not 100% sure that it's the final answer in my particular problem. I may be looking at deciding NIC teaming (With HP at least) is not workable.

As it turns out this didn't solve our particular problem at all.
In our case the error being reported around the MAC addresses jump between ports was symptomatic of a loop in the network (Split Horizon)
Hyper-V switching seems to be very sensitive to this and there was no other evidence of this on the network, however when the offending device (Cisco Airport) was removed the problem vanished immediately.

A great success! So if you see this MAC address changing very often then check your network for loops (via segment isolation)


Thursday, March 18, 2010

My 2008 Logs are tooo big

Maintenance plans not working? Running out of disk space?
Clean out those log files.

USE SharePoint_Config
GO
ALTER DATABASE SharePoint_Config
SET RECOVERY SIMPLE;
GO
DBCC SHRINKFILE (SharePoint_Config_Log, truncateonly)
GO
ALTER DATABASE SharePoint_Config
SET RECOVERY FULL;
GO

Wednesday, March 17, 2010

App-V 4.6 and Office 2010

Cross Post from MS for easy reference;

Install;
XPSEP XP and Server 2003 32 bit
dotnetfx3setup
Windows Search 4.0
C:\Documents and Settings\Administrator.SEQUENSER\Desktop>msiexec /i OffVirt.msi
PROFESSIONALPLUS=1

Install App-v 32 bit sequencer RC (2)

Begin sequencing
Start Office 2010 beta installation, use the following folder;
Q:\mo2k1b32.004\Microsoft Office

Open Excel,OneNote, PowerPoint, Wor. Set to note download any updates

reg add "HKCR\CLSID\{9203C2CB-1DC1-482d-967E-597AFF270F0D}\TreatAs"
reg delete "HKCR\CLSID\{9203C2CB-1DC1-482d-967E-597AFF270F0D}\TreatAs" /va /f
reg add "HKCR\CLSID\{BDEADEF5-C265-11D0-BCED-00A0C90AB50F}\TreatAs"
reg delete "HKCR\CLSID\{BDEADEF5-C265-11D0-BCED-00A0C90AB50F}\TreatAs" /va /f

Copy everything from c:\program files\common files\microsoft shared\filters to another folder and then back


reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Search\Preferences" /v "{4154494E-BFF9-01B8-00AA-0037D96E0000}" /t REG_DWORD /d "1" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Search\Preferences" /v "{C0A19454-7F29-1B10-A587-08002B2A2517}" /t REG_DWORD /d "1" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Search\Preferences" /v "{70fab278-f7af-cd11-9bc8-00aa002fc45a}" /t REG_DWORD /d "1" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Search\Preferences" /v "{c34f5c97-eb05-bb4b-b199-2a7570ec7cf9}" /t REG_DWORD /d "1" /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\Windows Search\Preferences" /v "{0077B49E-E474-CE11-8C5E-00AA004254E2}" /t REG_DWORD /d "1" /f

Versionnumber for all office-applications:14.0.4514.004

Add the following applications;
Simple MAPI Proxy Server
%commonprogramfiles%\microsoft shared\virtualization handler\MapiServer.exe

Virtual SharePoint proxy
%commonprogramfiles%\microsoft shared\virtualization handler\VirtualSearchHost.exe

Virtual OWSSupp Manager
%commonprogramfiles%\microsoft shared\virtualization handler\VirtualOWSSuppManager.exe

Mail Control Panel
%windir%\system32\Control.exe” “%SFT_MNT%\mo2k1b32.004\Office14\mlcfg32.cpl


Edit the following registry-keys and change the value to:
%SFT_MNT%\mo2k1b32.004\VFS\CSIDL_PROGRAM_FILES\Microsoft Office\Office14\OWSSUPP.DLL
HKEY_CLASSES_ROOT\CLSID\{3FD37ABB-F90A-4DE5-AA38-179629E64C2F}\InprocServer32\(Default)
b. HKEY_CLASSES_ROOT\CLSID\{62B4D041-4667-40B6-BB50-4BC0A5043A73}\InprocServer32\(Default)
c. HKEY_CLASSES_ROOT\CLSID\{9203C2CB-1DC1-482D-967E-597AFF270F0D}\InprocServer32\(Default)
d. HKEY_CLASSES_ROOT\CLSID\{BDEADEF5-C265-11D0-BCED-00A0C90AB50F}\InprocServer32\(Default)


In the sequencer, add the following element to each OSD, and type “TRUE” in the Element Text: SOFTPKG -> IMPLEMENTATION -> VIRTUALENV -> POLICIES -> LOCAL_INTERACTION_ALLOWED.


Save Package

The adding of the proxies I usually did when editing the detected programs.

/Znack
----
msiexec /i OffVirt.msi ADDDEFAULT=Click2runOneNoteProxy,Click2runOutlookProxies,Click2runWDSProxy,Click2runOWSSuppProxies PACKAGEGUID={EF2D625D-2BD3-4226-A480-CFE325BBDCDE} PACKAGEVERSION=14.0.4514.1004 OUTLOOKNAME=”Microsoft Outlook 2010 (Beta)” ONENOTENAME=”Microsoft OneNote 2010 (Beta)” MAPISERVER=”Simple Mapi Proxy Server” VIRTUALSEARCHHOST=”Virtual Search Host” MLCFG32CPL=”Mail Control Panel” OWSSUPPServer=”Virtual OWSSupp Manager”

Windows Installer doesn't recognize ”. Replace ” with " on the command line

------

http://www.softgridblog.com/

-----

presales guff type stuff:
http://windowsteamblog.com/blogs/springboard/archive/2010/02/22/app-v-4-6-release-q-amp-a.aspx

-------------

Sequencing best practise: http://technet.microsoft.com/en-us/library/dd351420.aspx

http://support.microsoft.com/Default.aspx?kbid=980861

-----------

Also this is now released with new software, and instructions available. (22 April 2010)

Tuesday, March 2, 2010

Symantec Endpoint Protection Manager (SEPM) def update issue

So you've installed the latest sepm and all went well until you realize your defninitions are dated 2009. easy fix, run liveupdate in the manager console... Wait, what, they're up-to-date!?

Guess something is stuck then, hey :)

step 1: make sure you are on the Internet, can get to the liveupdate servers: http://definitions.symantec.com/defs/{updatefile}.exe OR FTP://FTP.symantec.com/public/blahblah
step 2: run luall.exe location in c:\program files\symantec\liveupdate and see if it downloads anything (prob not)
step FIX: I'll cross post later but

http://service1.symantec.com/support/ent-security.NSF/docid/2008041516215948

seems to give it a proper cleanout of the old defs and you can expand the process to do all your definitions with a little care

good luck with sep, here's hoping the next version is better ;-)

Friday, February 5, 2010

Masterbrowser script

"
Dim WshShell, FileSystem, RegularExpression, PFound1, Dummy, TheNVFile, TheLine, ThePattern1, ThePattern2
Dim Flag, SysName, NBTable, ThePattern3, PFound2, ThePattern4, WrkGrp, TheText, ThePattern, Match
Dim Matches, TheMatch, NBCommand, TheNBTFile
Const ForReading = 1
Set WshShell = WScript.CreateObject("WScript.Shell")
Set FileSystem = CreateObject("Scripting.FileSystemObject")
Set RegularExpression = New RegExp
Dummy = WshShell.Popup ("Finding Master Browser. Please Wait...",1,"Find Master Browser Utility",64)
WshShell.Run "Cmd.exe /c Net View > C:\Temp\NetViewList.txt", 2,True
Set TheNVFile = FileSystem.OpenTextFile("C:\Temp\NetViewList.txt", ForReading, True)
Do While TheNVFile.AtEndOfStream <> True
TheLine = TheNVFile.ReadLine
ThePattern1 = "\\"
PFound1 = FindPattern(TheLine, ThePattern1)
If PFound1 Then
ThePattern2 = "\\\\\w*"
Flag = "1"
SysName = GetPattern(TheLine, ThePattern2, Flag )
NBTable = GetNBTable(SysName)
ThePattern3 = "MSBROWSE"
PFound2 = FindPattern(NBTable, ThePattern3)
If PFound2 Then
ThePattern4 = "\w* \w* <1E>"
Flag = "2"
WrkGrp = GetPattern(NBTable, ThePattern4, Flag)
Exit Do
End If
End If
Loop
If PFound2 Then
Dummy = MsgBox("The computer acting as the Master Browser" & vbCrLf &_
" for the workgroup " & WrkGrp & vbCrLf &_
" is " & SysName, 4160, "Find Master Browser Utility")
Else
Dummy = MsgBox("No Master Browser found at this time. " & vbCrLf &_
"Chances are that an election is in progress.", 4144, "Find Master Browser Tool")
End If
TheNVFile.Close
FileSystem.DeleteFile("C:\Temp\NetViewList.txt")
Wscript.Quit
Function FindPattern(TheText, ThePattern)
RegularExpression.Pattern = ThePattern
If RegularExpression.Test(TheText) Then
FindPattern = "True"
Else
FindPattern = "False"
End If
End Function
Function GetPattern(TheText, ThePattern, Flag)
RegularExpression.Pattern = ThePattern
Set Matches = RegularExpression.Execute(TheText)
For Each Match in Matches
TheMatch = Match.Value
If Flag = "1" Then TheMatch = Mid(TheMatch, 3)
If Flag = "2" Then TheMatch = Left(TheMatch, 15)
Next
GetPattern = TheMatch
End Function
Function GetNBTable(SysName)
NBCommand = "nbtstat -a " & SysName
WshShell.Run "Cmd.exe /c " & NBCommand &" > C:\Temp\NBTList.txt", 2,True
Set TheNBTFile = FileSystem.OpenTextFile("C:\Temp\NBTList.txt", ForReading, True)
GetNBTable = TheNBTFile.ReadAll
TheNBTFile.Close
FileSystem.DeleteFile("C:\Temp\NBTList.txt")
End Function
"