Thursday, December 9, 2010

Bad NIC Strikes Again!

I have a pretty complex lab setup in order to be able to model different scenarios. The lab consists of 3 host computers each running Hyper-V. Each host have 3 - 5 NIC cards; management, VM Network, iSCSI, Live Migration, and Heartbeat NICs.

In order to allow the VM's to communicate with each other on their own each host is connected to a switch for the VM Network. Well, I have been fighting to setup my domain controllers for the last two days. 1 DC is on host A and the 2nd is on Host B. I was getting some weird timeout issues when trying to join the domain and dcpromo the 2nd DC on host B. I disabled firewalls, change policies, and even rebuild the VM's. Same issue.

So, I decided to run a few pings while I was doing a promo. From a VM on host B, I ran pings to VM's on Host A, Host B, and Host C. I saw request time outs to both VM's on Host A that I was pinging.

I switched my VMNet to a different NIC on Host A and the problems gone... Looks like I need to buy a new NIC. Now that I go back and look at the logs on Host A, I see errors in the logs


Log Name: System
Source: VMSMP
Date: 12/9/2010 12:19:57 PM
Event ID: 24
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Computer: HOSTA
Description:
NIC '/DEVICE/{E7692807-E1EA-4792-8E72-184C01BDCF7E}' is no longer operational, status = 2.





Realtek NIC, you are being replaced ...

UPDATE: When I actually opened the box to look at the NIC, its a Netgear GA311... I have one of these installed in each box. No I wonder if just this one if bad, or if there maybe some issue with this card and Hyper-V Virtual Switches.

Move that mouse. Keeping the screen saver from turning off

So you have two computers, lets say a desktop and a laptop. You are primarily working on the desktop computer, but your using the laptop for viewing a webpage or a dashboard. You turn away from your laptop for 10 minutes or more and when you come back to it, the screen is black and lock. You have to turn and type your password in again and get the screen back up. Its very time consuming...

I use a tool from lifehacker.com that allows me to set the mouse to move on its own.

http://lifehacker.com/software/exclusive-lifehacker-download/automate-timed-mouse-clicks-with-clickwhen-260445.php

Wednesday, September 22, 2010

Windows Activiation Event IDs

When troubleshooting a windows activation issue the other day, I came up with a list of event ID's for the application log that gives a good picture of whats going on

1025, 4103, 8200, 4101, 1008, 4105, 1016, 12306,4104,8196,1007,1004,1013,1011

Monday, September 6, 2010

A little ADD anyone?

I have a class assignment to read an article "Is Google Making Us Stupid?". I found it quite intriguing and and it follows a lot along the same lines as another book that I am in the process of reading, "CrazyBusy. Strategies for coping with a world gone ADD".

The thing that I notice about this article the most were the references to other reading material that I want to check out, so I decided to make a list.

The article is available here:
http://www.theatlantic.com/magazine/archive/2008/07/is-google-making-us-stupid/6868/

My List of books to read from the article:
Computer Power and Human Reason: From Judgment to Calculation
Technics and Civilization
Proust and the Squid: The Story and Science of the Reading Brain
Phaedrus

Wednesday, August 18, 2010

Clean the string

Function CleanTheString(theString)
'Remove all non Alpha numeric characters from a string. This will include spaces. If you want to keep a character, add it to the strAlphaNumeric string below
'msgbox thestring
strAlphaNumeric = "-#.'()/,_; :0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" 'Used to check for numeric characters.
For I = 1 To Len(theString)
strChar = Mid(theString, I, 1)
If InStr(strAlphaNumeric, strChar) Then
CleanedString = CleanedString & strChar
End If
Next
'msgbox cleanedstring
CleanTheString = CleanedString
End Function

PowerShell Open File Dialog and SaveFile Dialog

Function Get-OpenFile($initialDirectory)
{
[System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") |
Out-Null

$OpenFileDialog = New-Object System.Windows.Forms.OpenFileDialog
$OpenFileDialog.initialDirectory = $initialDirectory
$OpenFileDialog.filter = "All files (*.*)| *.*"
$OpenFileDialog.ShowDialog() | Out-Null
$OpenFileDialog.filename
}



Function Get-SaveFile($initialDirectory)
{
[System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") |
Out-Null

$SaveFileDialog = New-Object System.Windows.Forms.SaveFileDialog
$SaveFileDialog.initialDirectory = $initialDirectory
$SaveFileDialog.filter = "All files (*.*)| *.*"
$SaveFileDialog.ShowDialog() | Out-Null
$SaveFileDialog.filename
}


# open dialog box to select the .nessuss file.
$InputFile = Get-OpenFile
$OutputFile = Get-SaveFile


#$Contents = [io.file]::ReadAllText($inputfile)
#$Contents = [io.file]::ReadAllText('C:\tools\wd\nessus\data\data.xml')
#$Global:OutFile = [System.IO.StreamWriter] "c:\tools\wd\nessus\outfile.csv"

$InputFile
$OutputFile

Tuesday, June 29, 2010

PowerShell - For Each Line in File

get-content D:\Scripts\file.txt | ForEach-Object {do stuff $_}

$_ is the variable for the current line in the file.

Show Removed, Old Hardware in Device Manger - Error Settings IP Orphaned NIC

http://support.microsoft.com/kb/269155


SYMPTOMS
When you trying to set the IP address on a network adapter, you may receive the following error message:
The IP address XXX.XXX.XXX.XXX you have entered for this network adapter is already assigned to another adapter Name of adapter. Name of adapter is hidden from the network and Dial-up Connections folder because it is not physically in the computer or is a legacy adapter that is not working. If the same address is assigned to both adapters and they become active, only one of them will use this address. This may result in incorrect system configuration. Do you want to enter a different IP address for this adapter in the list of IP addresses in the advanced dialog box?

Where XXX.XXX.XXX.XXX is the IP address that you are trying to set and Name of adapter is the name of the network adapter that is present in the registry but hidden in Device Manager.

If you click Yes, you see the TCP/IP properties where you can change the IP address to something different for the currently showing network adapter in Device Manager. If you click No, the IP address is assigned to the network adapter. Note that if you click No, the selected network adapter in Device Manager and the ghosted network adapter have the same IP address. In most cases, this does not cause any problems because the driver is disabled.

Note On a computer that is running Windows Server 2008, you receive the folloiwng error message:
Cannot rename this connection. A connection with the name you specified already exists. Specify a different name.
Back to the top

CAUSE
A network adapter with the same IP address is in the registry but is hidden in Device Manager. This can occur when you move a network card from one PCI slot to another PCI slot.


RESOLUTION
To resolve this problem, uninstall the ghosted network adapter from the registry using one of the following methods:
Method 1

  1. Click Start, click Run, type cmd.exe, and then press ENTER.
  2. Type set devmgr_show_nonpresent_devices=1, and then press ENTER.
  3. Type Start DEVMGMT.MSC, and then press ENTER.
  4. Click View, and then click Show Hidden Devices.
  5. Expand the Network Adapters tree.
  6. Right-click the dimmed network adapter, and then click Uninstall.

Friday, June 11, 2010

Choose One Path

I recently discovered that I feel its impossible to be both management and technical at the same time. Trying to do so can make you go crazy.

Monday, April 26, 2010

Hyper-V Cluster Networking

There are a few lessons that I have learned while dealing with Hyper-V Clustering. I am gonna focus primarily on networking at the moment.

Most of the documents that I have found out there detail how to create the cluster, how to create an external network etc...

I tried many times, I would get the cluster up, get a network created, but then I could not migration (live or quick) the virtual machines ... Maybe this is covered in the documentation, but I did not read far enough or got too anxious (would not be the first time).

Its possible also that being someone who deals with Hyper-V on a standalone basis quiet frequently I did not see it. The key to making this work, its adjusting the settings to the virtual machine in the Failover Cluster Management console, not in the Hyper-V manager console. Also, watch out for the DVD-Drive mapped to the physical DVD.

If you don't configure the network settings of the client in the failover cluster manager, the migration will fail or you'll get something like invalid configuration in the network settings ...

Tuesday, March 23, 2010

New Server 2008 R2 Core Configuration Guide

A little late on this one, but since its a new blog...

http://blogs.technet.com/server_core/archive/2009/05/18/new-server-core-step-by-step-guide.aspx

Network Bindings on Server Core 2008

Working with Server Core, you often need to adjust parameters that there is no UI for. For Instance, removing network bindings for a connected NIC.

There is a tool on MSDN that is very handy for this

http://code.msdn.microsoft.com/nvspbind


Reference:
http://blogs.technet.com/server_core/archive/2010/01/27/network-binding-management.aspx

Wednesday, March 17, 2010

In the beginning...

Man created 0's and 1's...

...And now all we have the time and capacity to do is hack and flail our way through. Along the way, we might actually fix a problem before it happens. Many IT folks these days are referred to as firefighters, we attack what ever problem or issue that seems to be in the limelight that day, hour, minute.

The thing is, none of us really have the time to figure out how to do things the "right way". We get to wrapped up in the meetings that the actual work does not get accomplished. It seems like management has forgotten that you can do you quality work 30 minutes at a time. You need continuous blocks of uninterrupted time to focus on the task. Some of which may involve research, development, testing, and documenting.

I spend most of my time each time during one of two things .... Hacking and Flailing my way through IT, or Yak Shaving.

I started this blog to document my adventures in IT, from dealing with other IT staff, solving complex problems, sharing ideas, talking about non-IT stuff, and sometimes, just venting.

I hope you enjoy my ramblings
Regards,
Chief Hack and Flail