Windows Server 2012 Beta Essentials Post 3: The Client View

In two previous posts, I talked about the installation process for Windows Essentials Server 2012 Beta and some of the configuration process. In this post, I am going to show the same lab environment with configuring a pair of clients, a Windows 7 client and a Windows Server 2008 R2 server.

The Windows 7 Client

I started with the Windows 7 Client. When I set up the server, it configured a local IIS installation with three web sites:

image

The default, primary web site includes a virtual directory for connecting to the server, like the earlier product incarnations. I was able to connect to it from the Windows 7 client:

image

I clicked the Download link, and that gave me an EXE to run. Notice underneath the very large Windows link is a much smaller Mac link. I don’t have the ability to test this now (primarily because I can’t easily run an OS X VM), but at some point I hope to be at the office where a Mac Mini sits somewhat abandoned.

Moving on, I received the expected UAC prompt:

image

Notice it shows as “Downloaded from the Internet”. Out of curiosity, I clicked No, then enabled Intranet settings as I had be prompted to by Internet Explorer:

image

Then, I emptied the IE cache (to make sure the client really re-downloaded the connector), then clicked the Download link again. This time, UAC shows it as a local file:

image

I admit I had never tried this before, so I didn’t really know what to expect; this is somewhat interesting I think. Continuing, the Connector searched for the server:

image

The Getting Started wizard came up at that point:

image

In this case the client was fully patched with all optionally offered components from Windows Update, so the client had everything the Connector wanted:

image

That said, notice the Connector is going to install the recent .NET Framework 4.5, which in fact wasn’t even RTM’d until just a couple of weeks ago. Continuing:

image

While that ran, I went ahead and started the server also, just to keep things moving. I had not done much on the server, so it still had the Internet Explorer Enhanced Security Configuration enabled, causing a warning when connecting to the Connect virtual directory:

image

That gave an interesting prompt in the Connect site:

image

“How do I…” is a link, although that’s not at all clear from the page. Someone went a little overboard on the CSS. Because of IE ESC, and because the Download link uses JavaScript to invoke the download action, it didn’t work. This struck me as silly, even stupid. There’s no excuse for using ASP.NET to make this simple web site doing a simple act. But because it is, I was faced with the choice of turning off IE ESC or adding the site as a Trusted site. I did the latter, although in real life I think I’ve disabled the IE ESC on almost every, if not every, server I’ve ever had to do anything on. I know that would work, but the page tells me to do it a certain way, so I did. When I refreshed, the warning went away, and the download and run worked:

image

Same process, just without the client Aero/desktop experience UI touches.

At this point the client was ready for me, so I left the server going for the time being and went back to the client:

image

I put in my account credentials for an administrator and was told, basically, “don’t do that!”:

image

So I said Yes, and used a standard user account:

It would have been nice if the user login dialog made it clear that they would recommend a standard user account, perhaps saying something like “we recommend you do not use an administrator account for connecting…” but at least in this release it doesn’t.

At this point, I hit an error, and retrying didn’t help:

image

So I decided I’d let the client go for now, and switch back to the server, where I saw something very interesting:

image

So this was a surprising thing to see – server against server isn’t officially supported, but you can try it. Well, this is all about experimentation and learning, so of course I said “Continue anywhere”. At that point, I was told that I might need to have some server components added, which might require a reboot. I didn’t screen capture that because, well, I clicked “Next” like everyone normally does, so you don’t get to see that dialog here. But would I lie to you about what it said?

So that left the server doing the prerequisite work, so it was a chance to check the client out again. I put on my “normal person” hat again, and rebooted the client, because when in doubt, reboot, right? So I did that, and checked the server in the meantime to see that two automatic services had stopped – Software Protection and Remote Registry. I started them both and went back to the client. I logged back in to the client and restarted the Connector installation. The installation moved past the prerequisite check much quicker this time because there was no work for it to do, and then asked for credentials again. This time, there was a much longer wait, but again, the client couldn’t connect to the server. The troubleshooting link wanted to go online, which didn’t help me any as I had no Internet access. But looking at the server again, the Remote Registry service had stopped again! Software Protection had also, but I didn’t really care about that one. Remote Registry is a much bigger deal – lots of different weird remote connection scenarios fail without it. But still no dice.

So now, I had to figure out what happened there. I was able to ping the server by name through IPv6 but not IPv4, so I added the server as an IPv4 host to the local client HOSTS file. I have to do this with Windows Home Server, so I thought it might help here:

image

And that’s why I figured out that DHCP actually wasn’t working in the lab, so I had no IPv4 address. What an idiot I was! Well, that was easy to fix – I just gave the client an IPv4 address and ta da, it worked. So then I commented out the HOSTS entry as I shouldn’t have needed it, and ran the Connector yet again. I should point out how interesting it was that IPv6 automatic addressing worked completely to access the server at this point including accessing IIS, downloading the Connector installer, and doing the initial steps to here, all of which shows that IPv6 pretty much “just works” for a lot of stuff in this scenario, but not everything.

This time, things made it slightly further:

image

So I checked the date/time information and it was fine. But the server showed something more interesting:

image

Active Directory Certificate Services denied request 7 because The revocation function was unable to check revocation because the revocation server was offline. 0x80092013 (-2146885613). The request was for CN=MIKEBAZ-PC. Additional information: Error Constructing or Publishing Certificate  Resubmitted by BLOGDEMO\BLOGDEMOSERVER$.

OK, well, let’s bounce Certificate Services. It is common for a VM save/restore cycle to break CS revocation checks, actually, and restarting AD CS solves it, so I did that.

And look, finally, more progress!

image

What was really going on here, although it wasn’t completely telling me, was that it was migrating local user profiles for domain user use, much like a tool like Quest Migration Manager’s VMover tool would do. I chose the simplest option of setting up for myself and letting it migrate. Note that I had placed the Connector installer on the desktop at this point, so that would be a way to see if the Desktop migrated correctly. At that point, it was time to reboot:

image

After the reboot, there was an automatic login, then a prompt for the computer’s description:

image

This is not that different than the previous product releases. This is also true of the backup wake prompt:

image

I was then asked about the CEIP:

image

The user profile was migrated:

image

There was a quick “configuring the computer” step I didn’t get a picture of, then a download of the full Connector software:

image

The computer was then “connected” to the server:

image

In the previous Windows Home Server releases this was a relatively light operation but in this case, it was a domain join operation. It then finalized:

image

And told me it was done:

image

I chose not to run the Dashboard at this time. I was logged off as promised, so I logged in with my domain credentials – noticing the machine was indeed now configured to log in to the domain as would be expected:

image

The login worked, and my Desktop came back correctly, with the new look of the Launchpad showing up:

image

The three complaints were about lacking virus and spyware protection and not having Windows Update configured, all of which is accurate:

image

But one interesting thing in the viewer that I didn’t expect was this:

image

This computer is not connected to the server.

This was a little odd. I clicked Shared Folders in the Connector, and I could connect fine:

image

So I don’t know what was up with “not connected” message. I’m thinking it’s a beta bug but I don’t know that for sure.

For now, that’s far enough – I’ll come back to it later in the post, but I want to get back to the server and finish it. When I went back, it was waiting for login credentials, which I gave it just like on the client machine. I then had to restart the server:

image

So I restarted, and again I got the screen for profile configuration:

image

Notice this time I did not get the “I do not need to migrate..” checkbox. I don’t know if that is because there was only the local Administrator on the server or because it was a server OS – there’s likely a good investigation point there – but in any event I chose just the one account again. The remaining steps were exactly the same as on the client, as you would expect.

That said, something odd next happened. Because the migrated account was Administrator, I couldn’t log in with it, because by default that account is disabled in the domain. It seems there’s a small edge case gap here; the Connector should probably warn about this edge case.

Anyway, the server was joined to the domain when it came up. So let’s look now at backing up a machine. I brought up the Dashboard, and was prompted for credentials:

image

Why was I prompted for credentials when I’m logged in to a domain account in the domain for the Essentials server? Well, after I entered credentials, I was told I wasn’t an administrator… so that’s why, it wanted administrative credentials. It didn’t say explicitly that’s what it wanted, but of course it makes perfect sense.

I closed the Dashboard because I just wanted to see it came up. What was not available though was Launchpad. It wasn’t in the Start Menu at all:

image

The executable was there, it just didn’t launch:

image

I tried Windows 7 Compatibility Mode but no go. So there’s an issue there – can’t run the Launchpad on a server. Doing it is not supported, so it’s not 100% surprising, but in a small business environment I can see it being a nice thing to have.

After seeing that, I launched the Dashboard again, to see if I could manually launch a backup, but I couldn’t, so I’m going to have to let it run long enough at some point to hit the scheduled window and see the backup work.

However, I could go back to the client, and try to back that up, and I did:that just to see that it worked, and it did. No screen shots here as it’s the same as it was before, so nothing remotely interesting here. Just enough to say that it works like it did and that’s that.

A coworker (hi, DNC) had asked me about backing up a server that was in another domain or a workgroup, but I haven’t run this test because he actually found this:

http://tinkertry.com/windows-server-2012-essentials-fine-with-pcs-in-domain-or-workgroup/

And that answers the question, for the odd edge cases where it matters, so that’s good. In real life (not lab or enthusiast environments) I would think this would only matter for integrating a new server for media/backup into an existing full environment, but even that is a bit of an edge case IMHO.

So at this point, I’ve covered all of the basic stuff except media and remote access. Unfortunately, I don’t know if I will have time to revisit this piece, but I will certainly try.

Thanks for reading!

Michael C. Bazarewsky
Principal Consultant, Server and Security

Lync-to-Phone for Office 365, First Look

We were recently asked to pilot Lync-to-Phone in Office 365, which is going through a soft launch in the US. It’s not a secret or anything – you can find it at http://pinpoint.microsoft.com/en-us/applications/jajah-voice-for-office-365-12884930736 as a public offering. But, it’s being kept off the radar somewhat as the service ramps up. Because we are a major Office 365 partner, we were asked by Microsoft to go ahead and try it, so we are. This blog post is about our ramp-up experience.

I started with the single provider available, JAJAH, which is from a Spanish telephone company. That got me to here:

clip_image001

clip_image002

I accidentally picked the wrong plan, but I was able to close, sign in, and was prompted to reselect my plan and move forward.

clip_image003

clip_image004

Or at least I tried to move forward:
Something went wrong

Did a customer support call – took six tries (I am not exaggerating) for them to get my e-mail address right, even with phonetic spelling, which was a rough start, but after about three minutes they had it. Their answer? “Try a different browser with cleared cookies and browser history and try again.” Well, I had been using Firefox because IE 10 RP wasn’t making it past the first screen, but I went over to an IE10 Porn Mode In Private session and tried again. Yet again, I could not take any button presses to register, and they had set their site to not allow compatibility mode. So, I used F12 to force the browser to IE10 Compatibility Mode:

Compatibility Mode

And then tried again to log in. This time, the sign-in button worked, but the login failed. Great. So I tried to register again from the beginning. That time it said I was already registered. More great… So I did a “forgot password” on the sign-in page (even though I know I had it right because I had signed in with Firefox using the same password pasted from the same entry in my password management application). This caused a generated password to be sent by e-mail, in theory at least.

I never got the e-mail, and the original login still worked in Firefox. So then it’s a question of what browser I’m supposed to use. Firefox doesn’t work, IE 10 doesn’t work… so now I needed to install another browser. I guess it’s time to install Chrome… so 20 minutes lost…

Nope… no luck there either. Of course doing anything in Chrome that’s not on a Google site or using WebKit custom proprietary stuff is a coin toss but still, WTF? Then I remembered that I could look up the password that continued to work in Firefox by looking at its stored password list… and it wasn’t the password I set; it was truncated. No idea what was up there – a bug in the registration process I guess… only the first ten characters were taken. Now that I knew that, I could try to sign in using IE again (again using F12 to set compatibility mode)… and that failed again.

So I went back to Chrome again… logged in successfully. And that failed to add the location again. So now I’m back to calling customer service again.

This time, they got my e-mail on only the second try, without use of a phonetic alphabet.. Oops, no, third try… that failed again, so we went to phone number. That seemed to work – I was put on hold again while they looked at the account. It might be part of this goes back to bailing out partway through as described above, but decent QA should have caught this. This offering has been in development for months – some basic testing would have been useful I think… anyway, that led to a 24-48 hour delay while the case was escalated to an engineer… so now we’re in a holding pattern…

… insert multiple days of hold music …

OK, so it was some kind of error on the JAJAH side, but it’s been resolved. How do I know? Because “Yahoo! Voice by JAJAH Customer Service” wrote me and told me it was.  (Aside: I am forced to assume that this is key insider trading information about Microsoft buying Yahoo! now that Jerry Yang turned down a jillion dollars to get the company worth the $3.12 it’s worth today [a steal at half the price!].) So let’s go back in, remembering that Internet Explorer 10 doesn’t work. I went to the site again, sign in again, and again re-select my calling plan and initial account information. This time, adding a location works:

Adding a Location

I just did one location for now – it will make sense to add others later but this is good enough to get started. Clicking Continuegets me to phone line selection:

clip_image009

So more “good” news here – there’s only two area codes available for all of Ohio (luckily the one we probably want – 216 – is here), and there’s at least one grammar error (“request addition phone numbers“) on the page. Okay, so let’s take 216 and see what we get:

Line quantity

We get forty-nine lines available. I don’t know if that’s meant to be for 216 or for our account alone. For testing I’m going to take two but I definitely don’t like such a small number showing. You can actually add numbers to multiple locations as part of the order all at once, which is nice – each time you “ADD TO ORDER” it shows up on the right-hand order summary:

Order summary

Moving on, it’s payment time!

Payment Info

The complaints about blank fields weren’t there when I started, it’s an artifact of my forgetting to screenshot before entering something. So no bug there. I put in my work-issued credit card that I’ve already had cleared to use for this, and get a confirmation:

Almost there!

Still not sure about the $13.99 to $18.99 range here, but after all this, if I didn’t Submit then that would be silly, right? So time to click. And …. It failed again:

Another error? Inconceivable!

Great, another call to customer service so I can spend twenty minutes spelling out my e-mail address… this time I told them to use cell number to look it up, and they fail, so we spend more time with going through my e-mail address, reading it multiple times, and convincing them it’s not a browser issue (everything with them seems to start with assuming you don’t know how to use a web browser), and then finally opening another escalation, which means another 24-48 hours. I wish I was kidding.

Okay, so about 36 hours later, it was “fixed,” so time to try again. I again had to walk through the whole process. This time the final screen showed different results, which suggested it was going to work:

Final screen again

And yay, it did:

It's alive!

I also received a line confirmation e-mail:
Confirmation e-mail

So time to activate! This one at least didn’t reference Yahoo! in the Fromaddress, so there’s that. Moving on, it’s activation time:

Activation

So time to activate my line and assign it to me, starting with the first of the two Activate links (nice use of a little DHTML here):

Activation details

I put in my e-mail address, left the location alone for now, and entered my name, then hit Save. This changed the icon in the front to indicate the line was active:

Activated!

I also received a confirmation e-mail on my location change with some slightly off sentence structure:

Location confirmation

Now I had to assign it to myself. There are instructions on the JAJAH site so they must work, right? I started signing in to the Office 365 Portal (I have administrative access). I located my User information, went to Details, and uh oh, we’re syncing our user information, so my office number wasn’t able to be changed. So the instructions are wrong in our case and lots of other cases. That’s fine, I can go to our on-premises Active Directory and set the number, then wait, which is what I did.

The office phone number replicated, so now it was time to set the provider in Lync Online. I went to the Admin Portal and selected Lync, Manageto get to the Lync Online Control Panel. I located my user account on the Users tab, and clicked my name. And then I… did nothing, because our Office 365 plan is E1 and you must have Lync Plan 3 to do Lync to Phone. So I enabled the 30-day trial of Lync Online (Plan 3) and tried again. Provisioning the plan required a very short wait (under one minute), then I was able to go into Licenses and assign myself one of the trial licenses. Then, I went back into the Lync Online Control Panel, and went into my user properties. This happened:

Unknown application error

Yay! Yet again a step breaking. This is getting fun.

So I waited about 21 hours and tried again, and this looks better:

Selecting a provider for the user

OK, so what difference did this make? Well, the Lync 2013 Preview Release client has all kinds of weird bugs, some of which I think impact this work, so I’m going to do it in Lync 2010. First noticeable change is that I have PBX functions showing in the client now:

PBX Functions

The location I was forced to add and had so much trouble with before didn’t show up anywhere, but whatever. It would be wrong as I’m typing this anyway as I’m in the United Club in Seattle, which is very far away from the location they have on file.

So I attempted to place a call, and it was successful! But could I receive a call?

Hellllooooo?

Yes, yes I could. This is exciting, we have phone calls! So of course I could leave an Exchange voice mail, right? Well, no, actually, I just get a busy signal when I decline. So that is awful. Time for more delay as I wait on an SR with Microsoft. But that’s going to take some time, and I think it’s too much time at this point, so I’m posting, and I’ll do another post when it’s resolved.

Michael C. Bazarewsky
Principal Consultant, Server and Security

Windows Server 2012 Beta Essentials Post 2

[Also see PART 1, PART 3]

In my previous post, I explained the installation process I went through to test Windows Server 2012 Beta (Release Candidate it calls itself) Essentials, as well as some of the reasoning behind the installation. In this post, I’m going to take you through the resulting server a bit. In a later post I’ll take you through the client view.

As a warning, this is yet another very long post. So buckle up, recline your seat, and get your snack box ready.

First things first. Between that post and this one, I had shut down the server, so this was a chance to see the boot experience. Remember that the server did NOT configure itself as a DHCP server, so when it came up it picked up an IP address from the network, which in this case was a new network from last time. That’s a fairly unusual situation – in real life that’s not going to happen very often but it will occasionally. For example, when a consumer-grade router is replaced, especially with one from a different vendor, it’s likely to have a different IP configuration for the LAN, so devices are going to change around a bit. Luckily, the server seemed to handle that okay, for now.

However, since I’m talking about IP addressing, after logging in, let’s look at the IP configuration:

IPConfig - Local DNS

Notice that DNS is set to point at itself, and the primary DNS suffix is now “BLOGDEMO.local“. This is reasonable – the server became a domain controller as part of the installation, and set its DNS name to be the same as the NetBIOS name that I gave it plus “.local“. That is a common-enough configuration and is a fair default. Like most DCs it is a DNS server, and that DNS server has the normal DNS records for a DC:

DNS zone blogdemo.local

So all of this is what I would expect to see. What I did not expect is what I did not see – it occurred to me at this point that Server Manager did not come up as it would normally on a Server 2012 machine. So that’s interesting – but then what should I use? Well, the Dashboard of course, conceptually carried forward from the WHS and EBS product predecessors. One interesting point to make before I continue is that Windows Home Server 2011/Essentials Business Server 2011 Dashboard add-ins are supposed to work on the new product. I have not had time to test this yet, partially because I don’t have too many add-ins on my home server (I know, weak sauce). That said, I’ll just repeat the Microsoft statement and go on.

How do I get to the Dashboard? Well, there’s a desktop shortcut right under the Recycle Bin on an otherwise clean desktop, and it’s pinned to the task bar as the first icon followed by PowerShell and Windows Explorer:

Dashboard on Desktop Pinned Dashboard

Fun fact: Microsoft won’t let a server product ship without PowerShell support. Old-timers will remember that there was a time that WMI support was a tollgate… so just like how it used to be that knowing VBScript and WMI was what separated the senior administrators from the junior administrators, now PowerShell does, although of course there are plenty of products (I’m looking at you, Exchange and Lync) where there’s a lot that can only be done through PowerShell, and not through the GUI at all, so it’s almost a “separate the junior administrators from the out of a job administrators” thing to now PowerShell now…

But enough about that. Back to the issue at hand. Let’s launch that Dashboard bad boy and see what we get.

We get, first, a generic server splash screen – slightly disappointing, but it fits with the new Microsoft model of “there’s only one product with variations” theme instead of “there’s dozens of SKUs, good luck! [muhahahahahahaha]”:It's Windows Server 2012!

Approximately 90 minutes later (ha ha, I kid!) I was presented with the new Metro Dashboard:

Metro Dashboard

Uh oh, there’s a scary icon in the corner with a “2”. I bet there’s two alerts! Let’s see:
Server Alerts

Well now that looks familiar! One of the scary alerts is “you must activate,” which is true.. so let’s click the task link and see how that goes:

Windows Activation Screen

Activating...

Uh oh:

image

Say what?!? Maybe DNS is broken:

DNS Failure

Yup. I wonder if DNS was configured to use the OLD DNS entries it picked up from DHCP when I first set it up as forwarders:

DNS Forwarders

<p class="commercial">Yes, I really did guess that right away. I’m that good. For the record so is the rest of Advanced Infrastructure at BA so feel free to hire us to help with your server needs.</p>

Interestingly the server should have realized that we can’t get to the forwarders and still worked, but it didn’t. Anyway, I removed those forwarders so that changing IPs wouldn’t burn me moving forward, but now, it’s time for me to get ready for my flight to Seattle. So I’m going to ignore that issue and move on for now. I’ll come back to it later, I promise.

Da plane boss!  Da plane! OK, I’m back, this time on the flight. United Channel 9 was keeping my ears occupied so you know I’m telling the truth. So let’s pick up where we were. First I need to make sure we have an IP address, so I set up a router VM and a private LAN for the lab. The details aren’t important, I just mention it to make it clear that this will stabilize the network configuration for the duration and to point out that private network support is one of the (few) areas that VMware currently does better than Hyper-V (one of the few as of Hyper-V 3.0). Now back to the regularly scheduled server investigation.

Twenty-two paragraphs of useless noise ago, I had the alert screen up. So let’s see what else we have on the list:

  1. Backups are not set up yet on the server. That’s true.
  2. Server folders are on the system drive. Also true, mainly because that’s the only drive. Guess I should fix that.
  3. Multiple services aren’t running – hmm, might be timing and network.
  4. Microsoft Update is not enabled. True.

So I re-evaluated the alerts, mainly so I could see if the services were up by now. There’s a refresh button on the top right of the list area that re-evaluates the alerts, just like the previous release. The services still weren’t up, so I clicked “Try to repair the issue” and it seemed happy. A quick check of services.msc confirmed all Automatic and Automatic (Delayed) services were now running, so we’re good there.

Next was to add drives to fix the backup and server folder location complaints. So, I figured, two drives, one for the server folders, one for the backups. So I shut down the VM (Windows+C, Power, Shut Down or Control-Alt-End, Power, Shut Down), added a SCSI controller, and added two drives. I brought the server up – hey, this is great, it’s a chance to see how the server responds to new storage, and that’s with an information alert (again, like earlier versions):

Unformatted hard drives are connected!

So it’s time to “Format and configure the hard drive“:

Choose one of the hard drives

Notice the server already had the drivers for the Hyper-V Synthetic SCSI card, which it should. So that worked right.

I picked the first drive, and decided it would be the backup drive. In real life you’re more likely going to have an external drive or small drive array for this so you can easily take it with you.

Configure hard drive usage

This brings up a dialog yet again familiar as Server Backup tries to get the lay of the land:

Loading data

Then it’s time to configure backup:

Getting Started

Select the Backup Destination

An odd dialog considering the disk is empty and it knows its empty:

Format warning

Label the destination drives

Specify the backup schedule

Select which items to back up

Confirm the backup settings

Setting up Server Backup

Success!

I could then click the same Alert Viewer link to configure the other drive:

Choose one of the hard drives
Format it Formatting... Success again!

OK, so now it’s time to use that new drive. I picked the alert complaining about having server folders on the system drive:
More alerts

No nice link to solve the problem there (why not?) so it’s time to manually go to the right screen, starting by closing the Alert Viewer.

Now I have a choice – I can continue the setup given in the start page for the Dashboard or do the storage. Because I’m going down a road I’ll keep going down it and switch to Storage:

image

Time to move each folder in turn:

Move the folder

Move a Folder

Calculating...

Choose a new location

Moving the folder

Moving the folder

Again, success!

OK, now it’s moved, but we need to make sure it’s backed up from the new location. Luckily the wizard prompts me to remember that. I actually waited until I had moved all of them and then just set it up at this page after the last one as otherwise I’m just repeating myself.

Server Backup Getting Started

Configuration options

Select Destination

<exact same screens for labeling the drive and scheduling backups>

Note Users came up selected as it was the last one moved, but I could select the previously moved ones, which is what I wanted to do and did:

Selecting folders to back up

Confirming backup settings

<same setup and confirmation screens as before>

More success!  It's going to go to my head!

Green is good! But if you pay attention when doing this you’ll see that just like in the previous release, the checkmark shows up as soon as you hit the Open button. This wizard doesn’t care if you actually set up backup, just that you acknowledged it’s existence. It’s like a small child with a short memory.

So let’s see the Alert Viewer now:

Only two more alerts to go!

That’s the best I could do without an Internet connection I thought, so I went back to the Home view in the Dashboard and saw what remained to check off:

Remaining tasks

Out of curiosity I checked the Microsoft Update setting – in the past you had to go to a web site to turn this on, but let’s see if that’s changed:

Microsoft Update view

Microsoft Update Dialog

YAY!  Thanks, whatever PM made this decision – the web site redirect out and back thing always struck me as at best a hack, so I’m glad that’s fixed.

Next is to add some users:

Adding users...

A user account

Oh, there’s those goofy checkmarks that I hated before. Yes, they look like the three entries towards the bottom are checked, but they aren’t – they turn green when on. This has always struck me as supremely confusing for some reason. Maybe it’s just me.

Anyway, what if I am a lazy administrator who hates security and just wants things to be easy for users?  Well, there’s a link there to “Change the password policy“:

Password policy

For now I left this alone and cancelled out of there.

I did the rest of the dialog – notice the default username was first name followed by last name and the green checkmarks I mentioned before:

Finishing adding a user

Yes I’m an administrator. I’ll make a peon in a moment.

Next are two screens confirming that as an administrator I am a god [muhahaha] or at least a demigod:

Shared folder access Anywhere access

After a brief creation screen I failed to screenshot (it’s not that exciting, it looks like all of the other progress dialogs, I promise), I have a confirmation that I have an account:

Success!

There’s a link I could use in case I forgot the password I just set, which is actually in a way nice, but I couldn’t use it as it requires an online connection to go to a help web site:

Online help link

Since I was still on the plane I let this go. Moving on…

I next added a standard user:

Standard User

Now I could set security for shared folders since standard user accounts are not automatically able to get to everything – the default was Read only but I changed it as Jarrod is my boss and I didn’t want to get fired. Making him a standard user is pushing my luck as it is 😉

Shared folder access

I will also allow Anywhere Access (note the VPN option – that’s new for a WHS replacement but not for an EBS replacement):

Anywhere Access

So enough of that, let’s go through the next step, adding more Server Folders. I’m going to add Audiobooks because I have that on WHS today at home:

Add server folders Name and description Level of access

The progress dialog and completion dialog (prompting for Server Backup) are exactly the same as moving a folder, which is somewhat reasonable. I won’t show them here as this post is already very long and it’s not new information.

At this point, I’m back off the plane. This post is taking many days to create! Anyway, that means for Anywhere Access I can try to get it to happen.

So next is what is now called Anywhere Access. It was hinted at before when setting up a user:

Set up Anywhere Access Set up Anywhere Access welcome

In my case I skipped the automatic router setup but a home or small business user will likely be able to use UPnP here. I suspect it works as well as WHS 2011 which means it works as well as your router does with handling UPnP:

Getting started

So now it’s time for the domain name. In WHS 2011 you have “yourchoice.homeserver.com” automatically provided as a dynamic DNS service. Can I do that now?  Let’s see:

I want to set up a new domain name Searching for domain name providers

Then I selected a name from Microsoft, which is how the previous release worked if you chose to use it:
What kind of domain name?

I am then asked for a Windows Live account (uh oh – out of date name!) to associate with the domain name:
Live Account

This failed with a fairly useless error message.  So I’m skipping it for now. In fact I’m going to skip the e-mail configuration and media server configuration for now as well, because there’s way too much here already, and without an Internet connection those items don’t make sense. I won’t forget about them forever, I promise!  Another post will come with that in it, likely after we look (finally) at the view from a client and another server.

Michael C. Bazarewsky
Principal Consultant, Server and Security

Windows Server 2012 Beta Essentials Install Walkthrough

[Also see PART 2, PART 3]

I have been a fan of Windows Home Server since the 1.0 beta days, using it at home in a production fashion. I stuck with the platform into the Vail days (Windows Home Server 2011), even with the removal of Drive Extender, because the media components and remote access capabilities are very nice to have, although not ideal.

Here Lies Windows Home Server (courtesy Ars Technica)Last week, however, as part of a major alignment of server SKUs, Microsoft announced that Windows Home Server is now dead-end, as are both Small Business Server SKUs.

The replacement, such as it is, is Windows Server 2012 Beta Essentials. I say it that way because there’s a lot of stuff not there, especially if you are an SBS person. However, for BA’s customers, this is not an issue – the move to Office 365 is happening so rapidly that this won’t be an issue.

In any event, because I am a happy WHS user, I wanted to see what the replacement would be like. There’s an excellent series by Terry Walsh at wegotserved that makes a good case that you can use the Windows 8 client to fill the need, and ArsTechnica made a similar point in their “death of WHS” post (where I got the tombstone picture above). But I want to see what the “official” replacement looks like, so I decided to spin up Hyper-V on my Windows 8 Release Preview machine and play a little.

To start, you’re going to want a VM with at least 2 GB of memory and 160 GB of hard drive space. You also need to have a NIC, either legacy or Hyper-V synthetic, that has a working network connection. The official specs are on the download page and at least at some level, they aren’t lying. I didn’t do that, so let’s see what goes wrong before showing it work correctly so you can learn from my mistake.

I initially configured a VM with dynamic memory from 512 MB to 2 GB, an 80 GB hard drive, and no network connection. Let’s see what happened.

I started by booting off the DVD, which works automatically because I don’t have another OS so the standard DVD boot sector that Microsoft uses doesn’t ask if I want to boot of the DVD; it assumes I do, and it’s right.

Before the next screen there is a very quick loading screen, which is fast enough on my VM that I couldn’t get a screenshot – but it is a little different than the Windows 7 version of the same thing, so someone spent a little time on that at least. There are I’m sure other changes that are not as visible.

Moving on:

Initial Splash Screen

I included the Hyper-V chrome in the screenshot just to show that was really what I was using. You won’t really see it much from now on.

I next got the standard first Windows Server 2012 installation screen. I left the defaults as they are right for me.

Initial Setup Options

Is it just me, or is the lining up of the Windows Server 2012 banner with the drop-downs both right and wrong? It looks silly to not be centered but then it would look wrong relative to the dropdown placement. Don’t know if there’s a “right” answer here. Anyway, I next get the Install now and Repair your computer options. So far, if you’ve installed Vista, Server 2008, or later, nothing particularly odd here.

Install now

I then clicked the Install now button – yay! But no:

Oops, out of memory

I got this error:

Windows cannot open the required file D:\Sources\install.wim. Make sure all files required for installation are available, and restart the installation. Error code: 0x800705AA

What does this mean? Well, after some Bing searches I find that it is telling me that Setup is out of memory. It appears dynamic memory support is not in WinPE. Learn something new every day. It’s an edge case so I can’t be annoyed about it. We’ll just change the memory to be fixed at 2 GB and move on.

So I reset the VM, this time getting the standard boot sector prompt for booting from the DVD that we’ve all come to know and love since Windows NT 4.0:

Press any key to boot from CD or DVD.

I pressed a key and went back through setup again. This time I got a successful “Setup is starting“:

Setup is starting

And then get asked for the product key. The public download page has the shared key for all beta installs (it’s the same TechNet gives me – I checked).

There is a weird bug exposed if you try to copy and paste the key from the web page – somehow Setup gets confused about the dashes and ends up losing text box available length, so you can’t actually put the whole key in. If that happens you need to reboot and go through it again. So to save you the trouble, here’s the key without dashes, which you can copy and paste into the VM: M4YNKGV7CRGPDCP4KKJX2YPP2

Enter a product key

Next up is the license agreement. As I always say, I just accepted it, ignoring the “first born son” part because they almost never enforce that provision:

License Agreement

Oh, which type of installation? Well, since the hard drive is empty, this is seems very stupid. There’s only one right option – the second “Custom: Install Windows only (advanced)” option. Why isn’t Setup smart enough to see that no attached hard drive have anything on them so there’s nothing to Upgrade? Well, actually, there’s a good reason, as we’ll see. Anyway, I chose the desired option of Custom.

Which type of installation?

Where do I want to install Windows? On the single empty hard drive of course. This is why Upgrade makes sense on the previous screen, though – if I needed to load a storage driver to see my Windows installation, this is where I’d do it. So Setup has no way of knowing at the previous screen if there is an OS somewhere it just can’t see yet. Tricky tricky…

Where do you want to install Windows?

Then comes the setup status that is also essentially unchanged since Vista / Server 2008.

Installing Windows 1Installing Windows 2 Installing Windows 3 Installing Windows 4 Need to reboot

The first boot process does its stuff…

Preparing Getting devices ready Getting system ready Finalizing your settings

Then I was logged in automatically as Administrator:

Login

And finally the installation “continues”…

Installation continues

But uh oh, again not following directions burned me:

Some issue were found (sic)

Yes, this says 90 GB, when the requirements say 160 GB. Whatever. And yes, there is a grammar issue – “Some issue were found” indeed. I am very sad this screen was ever public which such an obvious issue. Some SDET or something somewhere needs to be slapped.

So I went through it all again, this time using a larger hard drive (120 GB). Once I made it past this part, I finally got to something fun.. Or not. Remember when I said I didn’t have a network connection?

Cannot find a network connection

Oops! Just to make sure that my Hyper-V synthetic card is visible to the OS, I used the old Shift-F10 standby to get a Command Prompt, then ran ipconfig to see the disconnected card:

ipconfig

So now it’s a question of connecting the card, running another ipconfig to make sure I now have an IP address, and hitting the Restart button. The OS went through a standard reboot, and an again automatically logged in (hey, it recovered!) with setup. Finally I seemed to be getting somewhere:

Verify the date and time settings

Screen clipping taken: 7/13/2012 10:34 AM

The time zone was Pacific Time by default (of course) so I hit “Change system date and time settings” and the standard dialog we all know and love (?) came up:

Date and Time Settings

I selected “Change time zone“, set the time zone appropriately, then pressed “OK“, “OK“, and then “Next“.

I now got a very interesting screen – “Clean install” or “Server migration“. In this case it’s clean but it’s clear that if you were moving from SBS you’d want to do a migration:

Installation mode

I may go back later and do a migration but at this point I wanted to see something – anything – installed so I did a clean installation. I next had identification information requested:

Identification information

Note that when I put in a company name a sane domain name was suggested. Also note that I was giving a NetBIOS domain name, not a DNS domain name, which is interesting. The server name was NOT set sanely, which is also interesting and a bit of a letdown after seeing a sane domain name selected.

Just for kicks I clicked the “What should I know before I personalize my server?” link and got a nice long page telling me that domain names can only be 15 simple characters etc. etc. which is right for a NetBIOS domain name:

What should I know before I personalize my server?

Also note the odd UI issue of black text on the dark title bar making the title unreadable. Again I expected better for the first public release. Small but obvious UI issues like this one and the grammar issue above significantly undermine confidence in the QA process and thus the product as a whole. Anyway, moving on… The next question is for the name of an administrator account. Of course I tried Administrator but that would be too easy – the default Administrator (SID 500) account is disabled automatically after installation (that information is in the help if you click “How do I choose this information?” although the help doesn’t explicitly say something like “Administrator is reserved and cannot be used.“) If you try to use it Setup yells at you:

Administrator account

So I picked something different:

AdminDude

Now it’s time for the peon… I mean standard user account:

Standard user account

Hey, it’s update configuration time! I used the recommended settings because I’m a good little admin:

Keep your server up-to-date automatically

Also note the bottom point – the feedback features are turned on by default in the beta just like the other 2012/Windows 8 beta releases. After that, it’s back to hurry up and wait:

Updating and preparing your server

Let me say at this point I would find the experience much more pleasant if the initial setup dialogs checked things like memory, network, hard drive space, and so on, and asked me the other questions, before they do. That would let the installer answer everything, click a button, and walk away, knowing it will all work. I was just installing Ubuntu the other day and was very annoyed that it kept stopping at seemingly random (of course not really) times to ask for yet more information and thought, “glad I don’t have to deal with that with a Windows Server”… surprise!.

After a while and at least one reboot (I admit I was not watching 100%), I started to log in again and this time, it was as my new administrator account in my new domain:

Login as new domain admin

And it’s ALIVE:

Server is now ready to be used

At this point, it’s time to connect a client, so I just spin up… oh… well, I have a Windows XP VM handy… oh, that’s no good according to the specs, and that one feels like a hard stop, so at this point I created a Windows 7 VM. It’s easy enough to do and I won’t bother going through details here as that’s not the point of this already very long post.

It was about this time however I realized that the server might be doing DHCP (uh oh!) so I checked… and it isn’t, which is actually the correct behavior. I don’t want it to, so yay for that. I suspect no one would want it to by default since you have working Internet somehow, presumably with a router handing out DHCP.

I think this is far enough for a single post. I’ll do later posts on the client connectivity and the dashboard experience very soon.

Michael C. Bazarewsky
Principal Consultant, Server and Security

Random Thoughts from TechEd NA 2012

I attended TechEd NA this year, making this the seventh year in a row I attended.  This year, I was a paid attendee, rather than working the Hands-On Lab area, which meant I was able to interact with more booths and see more sessions than usual.  My various unstructured thoughts follow in the hope you will find them useful.

  • Products Featured.  This show was all about two things:
    • 2012 releases – Windows 8, Windows Server 2012, System Center 2012, Visual Studio 2012, and SQL Server 2012
    • “The Cloud” – Office 365, cloud-based management including Windows Intune, and Windows Azure including the new Virtual Machine offerings.  In fact, the custom hotel room keys this year put The Cloud very clearly front and center:
      69e41244-7ea4-46c9-894f-4589fe5e37a0
    • Not really talked about much:
      • Windows Phone (although there was a large show floor presence, there was no track and only a few sessions; expect a lot more next year when Windows Phone 8 is released)
      • Windows 7/Windows Server 2008 R2 (some sessions but not a big push)
      • SharePoint 2010/Exchange 2010/Lync 2010 (sessions but not a big push; expect more next year for the new releases)
      • Office 2010 (again expect more next year when Office 2012 is the hot product)
  • Specific session notes for the ones I attended in person… because a lot of what falls under my “official” subject area was not new material for me (when you work for Bennett Adelson you’re required to be ahead of the curve in your area!) I went a bit out of scope for some of the sessions…
    • AAP313 | Scrum Under a Waterfall (Benjamin Day) – A good discussion of how to do agile (or should I say “Agile” – big “A” – since it was Scrum-focused) in an environment where old school waterfall planning is required.
    • AAP401 | Real World Developer Testing with Visual Studio 2012 (David Starr, Peter Provost) – Ultimately I had mixed feelings about this session. I was not convinced the idea of “submit your problems and we’ll solve them” really worked as only a few problems were gotten to, and my real-world question of “how do you expect developers who can’t afford Visual Studio Ultimate to do these things” wasn’t answered. Yes, it was snarky, but it is a real-life problem faced by many. Further, a lot of time was spent on “that’s the wrong way” coding.
    • DEV370 | Nokia with Windows Phone: Learning How to Tile (David Middleton, David Mason, Kalle Lehtinen) – Ultimately very disappointing as the practical content was virtually zero in my opinion. If this was “DEV170” that would have been okay…
    • VIR317 | Lessons from the Field: 22 VDI and RDS Mistakes You’ll Want to Avoid (Greg Shields) – A good, honest session about real-life implementation of VDI and RDS on Windows Server 2008 R2 and how changes/improvements in Windows Server 2012 help.  Highly recommended if you’re looking at these technologies or have already implemented them.
    • WCL290 | Microsoft Application Virtualization 5.0: Introduction (Andy Cerat, Matthijs Gates) – A very nice intro to App-V 5.0 (part of the upcoming MDOP release) showing some of the great changes and improvements. No more Q: drive? Apps can work with each other (think: Visio available from Word)? Updated, cleaner UI? Check, check, and check!
    • WSV325 | DNSSEC Deployment with Windows Server 2012 (Rob Kuehfus) – Presented by a member of the Wireless Networking and Services team and the owner of the DNS Server offering in Windows Server 2012, this is a nice overview of how DNSSEC works in general and how to use it in Windows Server 2012 (hint: it’s very easy), including practical guidance on the steps to implement in order. Highly recommended if secure DNS is important to you or if you work in an environment where it is mandatory (e. g. US Federal Government).
    • WSV331 | What’s New with Internet Information Services (IIS) 8: Open Web Platform for Cloud (Won Yoo) – A solid presentation on new expansion and control capabilities in IIS 8 including mention of features that have been or will be back-ported to IIS 7.5. Nice demos. Some amazing performance improvements demonstrated – for one case, the first GET on IIS 7.5 with SSL demo took 10.9 seconds and over 500 MB of RAM, while the same page first GET on IIS 8 with the new central file-based certificate store capability took 0.14 seconds (under 1/6 of a second is not a typo) with 44 KB of RAM (again KB not MB is not a typo) – and that was with with 20x as many instances of the site running under IIS 8!
    • WSV332 | What’s New with Internet Information Services (IIS) 8: Performance, Scalability, and Security (Robert McMurray) – A nice companion to the previous session.  Includes discussion of new dynamic security features in the web and FTP (yes, FTP!) service. Also discusses changes in warm-up functionality that can make it possible to show users a “I’m warming up, be with you soon” message while waiting for the ASP.NET hamsters to spin up.
  • Product/Exhibitor Booths – note that the “Attendee” badge gets you treated “seriously” – many exhibitors and Microsoft staff ignore a “Staff” badge holder or are even borderline hostile even at silly things like book signings (I won’t name names but I will say that it takes zero day-s for this to happen) so it’s nice to be treated appropriately for once… 
    • I visited the Windows Phone area to find out what was up with the Windows Phone Summit in San Francisco this week. They all made it sound like a press-only event, despite earlier talk of a two day developer event. The whole thing felt like a bit of a CF to be honest. At least the announcements – which world + dog expect to be all around Windows Phone 8 – will be streamed.
    • I visited the Office 365 area to discuss an issue a customer was having with their proof of concept where Lync Online refused to federate with anyone, even after everything was clearly configured right. It turned out to be some kind of Microsoft-side provisioning screw-up, although the Office 365 booth was not helpful figuring that out.
    • I visited the Windows 8 “Access Everywhere” booth to ask, essentially, “WTF is with Consumer Preview being Professional instead of Enterprise? You know we don’t get DirectAccess with that, right?” The answer was essentially:
      • “yes, we know it sucks, everyone is yelling at us [field people]”
      • “we hope to have some kind of resolution soon, maybe even in the next week, or at least an official acknowledgement that there will be no resolution”
      • “no one seems to know why that was the decision made by the client team”
      • “only TAP people have Enterprise right now.”
        So a major ball drop there.
    • I visited the System Center Enterprise Protection booth to ask, “why does SCEP turn off Security Center on Windows 8 every time the machine boots?” The answer was essentially “it won’t install on Windows 8 prior to CTP2 [note: that is wrong… speaking from office experience here], so do CTP2 and see what happens.” because going from CTP2 to the final Beta or RTM is painful we’re just leaving SCEP off Windows 8 machines right now and using the built-in Windows Defender instead, which gets us the same protection but loses us the management/reporting functionality.
  • Certification!  There were multiple free exams this year – specifically two Private Cloud exams and three beta exams (Windows Server 2012, Windows 8, and Developing with HTML5/CSS3).
    • The Private Cloud exams (70-246 and 70-247) felt tough but fair to me. That said, there were MANY 70-246 failures… so be warned. You really need to have worked with System Center 2012 as a suite and know how the pieces work together and individually to pass these!
    • The Installing and Configuring Windows Server 2012 exam had a nice mix of old and new. You will need to have worked with the product at least a bit, or have been exposed to it a lot without touching it, to have any chance of this one.
    • The Configuring Windows 8 exam also had a nice mix of old and new, and just like the server exam, you will need to have worked with the product at least a bit, or have been exposed to it a lot without touching it, to have any chance of this one.
    • The Programming in HTML5 with JavaScript and CSS3 exam had almost nothing Microsoft-specific on it, and did an okay job of covering the field, although I was surprised on some of what I was NOT tested on (although it’s a beta and I’m sure has a large pool so others may be different!). Of course I can’t tell you more details – test NDA and all 🙂

I am sure I am leaving many things out, but I think this is a reasonably-complete high-level brain dump. Please feel free to comment with thoughts or questions!

— Michael C. Bazarewsky
Principal Consultant, Windows Server and Security

Using UDP-SIP with Exchange UM and Lync 2010

Attachment: https://bennettadelson.wordpress.com/2012/06/04/using-udp-sip-with-exchange-um-and-lync-2010/kamailio-cfg/ (remember to change extension)

Attachment: asterisk.tar.gz (remember to change extension)

I am working on and off with a client that is deploying Exchange 2010 Unified Messaging and Lync 2010 in their environment. They want to use Exchange UM with a hosted SIP-based VoIP system from a provider that I will refer to as “PhoneCo” for the sake of discussion. Furthermore, they want their Lync environment to work with the Exchange voicemail, and by the way, think it would be nice if they could experiment with Enterprise Voice functionality. Luckily, PhoneCo offers SIP trunks, and will trunk from the hosted VoIP environment to Exchange UM. So all is good, right?

The Problem Statement

Ha ha, of course I am joking. Because although Microsoft talks SIP, and PhoneCo talks SIP, we hit upon a long-standing issue. Microsoft refuses to support UDP SIP (they have their reasons, I won’t debate the point here) while PhoneCo refuses to support TCP SIP. Thus, we have an impasse.

Solution Overview

The official, standard answer to this is to use a Session Border Controller (SBC), which is essentially a SIP middleman box that can do UDP on one end and TCP on the other. A typical SBC also includes firewalling intelligence to prevent denial-of-service and other such nasty behavior. As a result, they generally start at thousands and quickly get into tens of thousands of dollars. In this customer’s case, the SIP trunk is going to be over a private MPLS connection directly between the hosted PBX and the on-premises Microsoft tools, so the customer didn’t want to pay for a lot of security they didn’t need just to deal with this issue.

The customer found a commercial product named Brekeke SIP Server that appears to be $500 to start. This is nice in that (1) it is commercial and (2) it can run on Windows, although it is Java-based so it’s a little messy and gives you one more thing to deal with patching every day or two.

We wanted to see if there was an open-source way to solve this problem. We found a way, and this post documented what we came up with. I have replicated the scenario in a lab, and have since actually simplified things a bit. I have also corrected something we had done to work around an Asterisk “bug” (in quotes because the bug states it’s not really an Asterisk bug) that came up while we were simulating the PhoneCo setup.

So first, here’s the list of VMs that are in the UC Lab:

Hostname IP Description
dc.uclab.local 172.30.1.10 Domain Controller
exchange.uclab.local 172.30.1.12 Exchange 2010
freepbx.uclab.local 172.30.1.11 PhoneCo stand-in
lync.uclab.local 172.30.1.13 Lync 2010
siprouter.uclab.local 172.30.1.14 SIP middleman
tmg.uclab.local 172.30.1.1 TMG 2010
internalclient.uclab.local 172.30.1.100 Test Lync/SIP client

The PhoneCo stand-in is a FreePBX installation using the FreePBX Linux distribution. I am not going to go into details on installing that into a VM because there are plenty of guides on getting that to work. For the purposes of this post I’m going to pretend Asterisk can’t do TCP SIP because that’s what we are looking at with PhoneCo. This also means ignoring all the online info about getting Asterisk to talk to Lync and Exchange using TCP SIP. (Note: Some of these guides assuming port 5065 for talking to Exchange, which is a partial solution. I’ll get into why that’s wrong later on.)

The SIP middleman – SIP router – is a Linux-based CentOS machine running the Kamailio open-source SIP router package. Kamailio is a mature, solid package that is quite amazing in some of what it can do, but I’m ignoring about 99% of it, I think. We may end up needing some of the NAT support eventually at the client, which I’m not getting into here and don’t need for the lab, but otherwise a lot of functionality is actually not in play here.

Preparing the CentOS Machine

So let’s get to it.

  1. I began with a basic minimal CentOS 6.2 installation. Note that I’ve had repeated issues with the Hyper-V Integration Components on this OS so far, so I didn’t bother with them – for a lab it’s not critical. For production you’d care a lot more – the customer uses VMware so this particular issue did not come up.
  2. Next, I logged in as root via SSH (PuTTY is your friend here) and accepted the key when prompted:
    image
    image
  3. I ran yum updateto get all of the current updates for the OS, and rebooted to get the updated kernel loaded.
  4. Using vi, I created /etc/yum.repos.d/kamailio.repowith:
    [kamailio]
    name=Kamailio
    baseurl=http://download.opensuse.org/repositories/home:/kamailio:/telephony/CentOS_CentOS-6/
    enabled=1
    gpgcheck=0

    This looks like this:

    clip_image001

  5. I confirmed that the new repository was visible with yum repolist:clip_image002
  6. I then confirmed that there was a package I could install in that repository with yum list kamailio:
    clip_image003
  7. After confirming the package, I installed it with yum install kamailio:
    clip_image004

    clip_image005
  8. So now I need to configure the beast. Kamailio comes with a very long sample configuration file. Most of it is noise for my use. I tried to trim it down as safely as possible, as well as better fit what I wanted. So using the following commands I saved the shipped file:
    cd /etc/kamailio
    mv kamailio.cfg kamailio.cfg.original
    vi /etc/kamailio.cfg

    And then made mine, which I will explain later after finishing the build instructions:

    #!KAMAILIO
    
    # Remote Hosts
    #!subst "/SIP_UDP_HOST/172.30.1.11/"
    #!subst "/EXCHANGE_UM/172.30.1.12/"
    #!subst "/LYNC_MEDIATION/172.30.1.13/"
    
    listen=172.30.1.14:5060
    listen=172.30.1.14:5065
    listen=172.30.1.14:5067
    
    ####### Global Parameters #########
    
    memdbg=5
    memlog=5
    
    debug=2
    
    log_facility=LOG_LOCAL0
    
    fork=yes
    children=4
    
    disable_tcp=no
    
    auto_aliases=no
    
    /* uncomment and configure the following line if you want Kamailio to
       bind on a specific interface/port/proto (default bind on all available) */
    #listen=udp:10.0.0.10:5060
    
    # life time of TCP connection when there is no traffic
    # - a bit higher than registration expires to cope with UA behind NAT
    tcp_connection_lifetime=3605
    
    ####### Modules Section ########
    
    mpath="/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/"
    
    loadmodule "kex.so"
    loadmodule "tm.so"
    loadmodule "tmx.so"
    loadmodule "sl.so"
    loadmodule "pv.so"
    loadmodule "maxfwd.so"
    loadmodule "usrloc.so"
    loadmodule "textops.so"
    loadmodule "siputils.so"
    loadmodule "xlog.so"
    loadmodule "sanity.so"
    loadmodule "ctl.so"
    loadmodule "cfg_rpc.so"
    loadmodule "mi_rpc.so"
    
    # ----- tm params -----
    # auto-discard branches from previous serial forking leg
    modparam("tm", "failure_reply_mode", 3)
    # default retransmission timeout: 30sec
    modparam("tm", "fr_timer", 30000)
    # default invite retransmission timeout after 1xx: 120sec
    modparam("tm", "fr_inv_timer", 120000)
    
    server_header="Server: PhoneCo Intransigence Coping Solution (PICS) 2.0";
    
    ####### Routing Logic ########
    route {
            if(is_method("OPTIONS")) {
                    xlog("L_INFO","OPTIONS from $si");
                    sl_send_reply("200", "Yes, Microsoft, I am alive");
                    exit();
            }
    
            xlog("L_INFO", "*** M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci");
    
            # Route Exchange extensions
            if((to_uri=~"sip:5992") || (to_uri=~"sip:5999")) {
                    xlog("L_NOTICE", "EXCHANGE UM call, $proto port $op, $ru, $fU");
                    t_on_reply("1");
    
                    # https://issues.asterisk.org/jira/browse/ASTERISK-16862
                    # http://imaucblog.com/archive/2009/10/03/part-1-how-to-integrate-exchange-2010-or-2007-with-trixbox-2-8/
                    replace("Diversion: <sip:5999@SIP_UDP_HOST>;reason=unconditional","MCB-Stripped-Header: Diversion");
    
                    switch($op) {
                            case 5060:
                                    xlog("L_NOTICE", "Redirecting to TCP 5060");
                                    t_relay_to("tcp:EXCHANGE_UM:5060");
                                    exit();
                                    break;
                            case 5065:
                                    xlog("L_NOTICE", "Redirecting to TCP 5065");
                                    t_relay_to("tcp:EXCHANGE_UM:5065");
                                    exit();
                                    break;
                            case 5067:
                                    xlog("L_NOTICE", "Redirecting to TCP 5067");
                                    t_relay_to("tcp:EXCHANGE_UM:5067");
                                    exit();
                                    break;
                    }
            }
    
            # Route Lync extensions
            if(to_uri=~"sip:5...") {
                    replace("To: <sip:", "To: <sip:+");
                    xlog("L_NOTICE", "LYNC call to $tu");
                    t_relay_to("tcp:LYNC_MEDIATION:5068");
                    exit();
            }
    
            # Route the rest to Asterisk
            xlog("L_NOTICE", "Asterisk call to $tu");
            forward_udp("SIP_UDP_HOST", 5060);
    }
    
    onreply_route[1] {
            xlog("L_NOTICE", "Handling reply from Exchange relay, status $rs");
            switch($rs) {
                    case 302:
                            xlog("L_NOTICE", "Saw 302 Redirect response, checking details...");
                            if(search(";transport=Tcp")) {
                                    xlog("L_NOTICE", "Saw TCP redirection, changing redirection to UDP");
                                    replace(";transport=Tcp", ";transport=Udp");
                            } else {
                                    xlog("L_NOTICE", "302 was not matched (!)");
                            }
                            exit();
                            break;
                    case 100:
                            xlog("L_NOTICE", "Saw 100, leaving alone...");
                            exit();
                            break;
            }
    
    }

     

  9. I stared the daemon (read: service) with /etc/rc.d/init.d/kamailio start and confirmed that it started  with /etc/rc.d/init.d/kamailio status:clip_image001
  10. I confirmed it was listening (netstat –an | grep 506):clip_image002
  11. I then opened up the firewall to allow those ports in (okay, thats a lie – I floundered a bit before remembering I had to do this) by editing /etc/sysconfig/iptables and adding after the --dport 22line:
    		-A INPUT -p tcp -m state --state NEW -m tcp --dport 5060 -j ACCEPT
    		-A INPUT -p tcp -m state --state NEW -m tcp --dport 5065 -j ACCEPT
    		-A INPUT -p tcp -m state --state NEW -m tcp --dport 5067 -j ACCEPT
    		-A INPUT -p udp -m state --state NEW -m udp --dport 5060 -j ACCEPT
    		-A INPUT -p udp -m state --state NEW -m udp --dport 5065 -j ACCEPT
    		-A INPUT -p udp -m state --state NEW -m udp --dport 5067 -j ACCEPT

    This looks like this when it’s done:
    image

  12. I then made this kick in by restarting the firewall with /etc/rc.d/init.d/iptables restart.
  13. I next added system logger support for the configured log source by editing /etc/rsyslog.confand adding:
    local0.*                                                 /var/log/kamailio.log

    image

  14. I then made this kick in by reloading the logger configuration with /etc/rc.d/init.d/syslog reload.
    image
  15. I don’t want this log to grow uncontrollably so I configured the logrotate daemon to make a new log every day and save seven of them by creating /etc/logrotate.d/kamailiowith:
    /var/log/kamailio.log {
    	rotate 7
    	missingok
    	daily
    }

    image

Preparing Exchange 2010 and Lync 2010

This is normal Exchange and Lync SIP configuration so I’m not going to get into great detail here. The following are the key points:

  • Make sure Lync has a TCP listener on port 5068 on the mediation server of your choice. There’s no high availability here so pick one and go. As quick hints of where this is done in Topology Builder:
    clip_image001[7]
    clip_image002[8]
    After publishing and running Bootstrapper (Lync Setup) on the Mediation Server as instructed by Topology Builder I ran into (what I consider to be) a bug in Lync shown via the event log – there were LS Mediation Server messages 25075 and 25031 indicating no TCP port is enabled, then that the TCP port was requested but ignored. Restarting the Mediation Server service sorted it out. The Kamailio log will show this working (e. g. tail /var/log/kamailio.log):
    image
  • For Exchange, make sure you have TCP enabled on the UM server (requires a service restart to kick in) and that you have an appropriate IP gateway and unsecured telephone extension dial plan configured against that gateway:
    clip_image001[9]
    clip_image002[10]

And that’s it!

So What Does the Configuration Mean?

OK, so what the heck does the configuration I gave you above mean?  Let’s go through it:

#!KAMAILIO

This is a signature for the configuration file.

# Remote Hosts

#!subst "/SIP_UDP_HOST/172.30.1.11/"
#!subst "/EXCHANGE_UM/172.30.1.12/"
#!subst "/LYNC_MEDIATION/172.30.1.13/" 

listen=172.30.1.14:5060
listen=172.30.1.14:5065
listen=172.30.1.14:5067

This is the super important customization part. The three subst lines replace all references to those text strings with the appropriate IP addresses, while the listen lines allow the router to accept traffic on its IP on three ports – 5060, 5065, and 5067. The latter two are because Exchange – for reasons known to Microsoft but not me – takes UM connections on port 5060 but then redirects them to 5065 or 5067. Remember how above I said that some sites use 5065 and that’s wrong?  That’s because they are assuming all redirects are to 5065, but Exchange might want 5067.

Anyway, the next lines are some configuration stuff that is from the default that I left alone mainly because either the settings were fine (e. g. the syslog facility used) or because I didn’t know the implications in changing them (e. g. the children process count); there’s also the enabling of TCP (normally disabled):

####### Global Parameters ######### 
memdbg=5

memlog=5 
debug=2
log_facility=LOG_LOCAL0 
fork=yes

children=4 
disable_tcp=no 
auto_aliases=no 

# life time of TCP connection when there is no traffic
# - a bit higher than registration expires to cope with UA behind NAT
tcp_connection_lifetime=3605

Next are the modules that I am loading. I know I need some of these for sure – there are others I don’t know about so I left well-enough alone and kept them there:

####### Modules Section ######## 
mpath="/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/" 
loadmodule "kex.so"
loadmodule "tm.so"
loadmodule "tmx.so"
loadmodule "sl.so"
loadmodule "pv.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "textops.so"
loadmodule "siputils.so"
loadmodule "xlog.so"
loadmodule "sanity.so"
loadmodule "ctl.so"
loadmodule "cfg_rpc.so"
loadmodule "mi_rpc.so" 

# ----- tm params -----
# auto-discard branches from previous serial forking leg
modparam("tm", "failure_reply_mode", 3)
# default retransmission timeout: 30sec
modparam("tm", "fr_timer", 30000)
# default invite retransmission timeout after 1xx: 120sec
modparam("tm", "fr_inv_timer", 120000)

The next line sets a server header seen in the SIP headers. It is a fun way to point out that PhoneCo was annoying me as well as to hide the actual software being used:

server_header="Server: PhoneCo Intransigence Coping Solution (PICS) 2.0"

Now comes the real meat. It starts the routing logic for incoming SIP calls looking for the OPTIONS call that Lync and Exchange make every nanosecond (approximately) to check to see if their SIP peers are alive. Hence the status text – the code is all that really matters:

####### Routing Logic ########

route {
        if(is_method("OPTIONS")) {
                xlog("L_INFO","OPTIONS from $si");
                sl_send_reply("200", "Yes, Microsoft, I am alive");
                exit();
        }

The next line just acts as a debugging log showing what came in:

        xlog("L_INFO", "*** M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci");

The dollar-sign pseudo-variables are documented here, should you care: http://www.kamailio.org/wiki/cookbooks/3.2.x/pseudovariables

Anyway, moving on, we have the Exchange routing. Looking at this now, I probably want the two extensions (one for the auto-attendant and one for subscriber access) to be substituted variables, but that will be 2.1 I guess:

# Route Exchange extensions
        if((to_uri=~"sip:5992") || (to_uri=~"sip:5999")) {
                xlog("L_NOTICE", "EXCHANGE UM call, $proto port $op, $ru, $fU");
                t_on_reply("1");

This basically says “if a SIP call is made to extension 5992 or extension 5999, then do this…” and starts by indicating that we are going to do a transactional SIP redirect that, when we see a reply, should go to reply handler “1“, which will come later. After that, we have:

        # https://issues.asterisk.org/jira/browse/ASTERISK-16862
        # http://imaucblog.com/archive/2009/10/03/part-1-how-to-integrate-exchange-2010-or-2007-with-trixbox-2-8/
        replace("Diversion: <sip:5999@SIP_UDP_HOST>;reason=unconditional","MCB-Stripped-Header: Diversion");

Why is this here? Basically, Asterisk does something we don’t want it to do on the Exchange redirect – adds an extra SIP Diversion header – and we want that extra header to go away. I need to replace it with something though, so I just made up a vendor header and used that. This is safe as SIP agents – like HTTP server and clients – ignore headers that they don’t know. Next, we take the UDP session and do a transactional redirect to TCP:

        switch($op) {
                case 5060:
                        xlog("L_NOTICE", "Redirecting to TCP 5060");
                        t_relay_to("tcp:EXCHANGE_UM:5060");
                        exit();
                        break;
                case 5065:
                        xlog("L_NOTICE", "Redirecting to TCP 5065");
                        t_relay_to("tcp:EXCHANGE_UM:5065");
                        exit();
                        break;
                case 5067:
                        xlog("L_NOTICE", "Redirecting to TCP 5067");
                        t_relay_to("tcp:EXCHANGE_UM:5067");
                        exit();
                        break;
                }
        }

I couldn’t come up with a “smart” way to do this better; this is a little wordy but it is clear what is happening. I next route the Lync calls (adding the E.164 “+” sign along the way) based on extension pattern (all other 5xxx extensions besides the two special case ones above), with all others going to the Asterisk side:

        # Route Lync extensions
        if(to_uri=~"sip:5...") {
                replace("To: <sip:", "To: <sip:+");
                xlog("L_NOTICE", "LYNC call to $tu");
                t_relay_to("tcp:LYNC_MEDIATION:5068");
                exit();
        }

        # Route the rest to Asterisk
        xlog("L_NOTICE", "Asterisk call to $tu");
        forward_udp("SIP_UDP_HOST", 5060);
}

Notice that I do forward_udpinstead of t_relay_to because I don’t care about maintaining transactional state in the case of going back to Asterisk, so there’s no reason to waste resources on it. I just tell Kamailio to throw it over the wall and forget about it.

Finally, I handle the reply from Exchange. This is why I made the Exchange piece transactional:

onreply_route[1] {
        xlog("L_NOTICE", "Handling reply from Exchange relay, status $rs");
        switch($rs) {
                case 302:
                        xlog("L_NOTICE", "Saw 302 Redirect response, checking details...");
                        if(search(";transport=Tcp")) {
                                xlog("L_NOTICE", "Saw TCP redirection, changing redirection to UDP");
                                replace(";transport=Tcp", ";transport=Udp");
                        } else {
                                xlog("L_NOTICE", "302 was not matched (!)");
                        }
                        exit();
                        break;
                case 100:
                        xlog("L_NOTICE", "Saw 100, leaving alone...");
                        exit();
                        break;
        }

Notice if I get a redirect from Exchange (which I will for port 5060) I change that from a Tcp redirect to a Udp redirect, then send it on its way.

So, this is what is in the lab right now. I think this works – until PhoneCo gets the line in place we won’t know 100% but I think this is close if it isn’t completely right. We’ll see.

Hope this helps you in your integration scenarios!

— Michael C. Bazarewsky
Principal Consultant, Windows Server and Security

Exchange 2010 RTM Setup Fails with Event ID 1002

While working through an Exchange 2010 RTM installation (to be updated to SP2 of course when the time came) at a customer site, we ran into an error that at first had us baffled:

Exchange Server component Mailbox Role failed.
Error: Error:
The following error was generated when “$error.Clear();
$name = [Microsoft.Exchange.Management.RecipientTasks.EnableMailbox]::DiscoveryMailboxUniqueName;
$dispname = [Microsoft.Exchange.Management.RecipientTasks.EnableMailbox]::DiscoveryMailboxDisplayName;
$dismbx = get-mailbox -Filter {name -eq $name} -IgnoreDefaultScope -resultSize 1;
if( $dismbx -ne $null)
{
$srvname = $dismbx.ServerName;
if( $dismbx.Database -ne $null -and $RoleFqdnOrName -like “$srvname.*” )
{
Write-ExchangeSetupLog -info “Setup DiscoverySearchMailbox Permission.”;
$mountedMdb = get-mailboxdatabase $dismbx.Database -status | where { $_.Mounted -eq $true };
if( $mountedMdb -eq $null )
{
Write-ExchangeSetupLog -info “Mounting database before stamp DiscoverySearchMailbox Permission…”;
mount-database $dismbx.Database;
}

              $mountedMdb = get-mailboxdatabase $dismbx.Database -status | where { $_.Mounted -eq $true };
if( $mountedMdb -ne $null )
{
$dmRoleGroupGuid = [Microsoft.Exchange.Data.Directory.Management.RoleGroup]::DiscoveryManagementWkGuid;
$dmRoleGroup = Get-RoleGroup -Identity $dmRoleGroupGuid -DomainController $RoleDomainController -ErrorAction:SilentlyContinue;
if( $dmRoleGroup -ne $null )
{
Add-MailboxPermission $dismbx -User $dmRoleGroup.Identity -AccessRights FullAccess -DomainController $RoleDomainController -WarningAction SilentlyContinue;
}
}
}
}
” was run: “Couldn’t resolve the user or group “domain.local/Microsoft Exchange Security Groups/Discovery Management.” If the user or group is a foreign forest principal, you must have either a two-way trust or an outgoing trust.”.

Couldn’t resolve the user or group “domain.local/Microsoft Exchange Security Groups/Discovery Management.” If the user or group is a foreign forest principal, you must have either a two-way trust or an outgoing trust.

The trust relationship between the primary domain and the trusted domain failed.

The bolded portion was the key, although we (okay, I – MCB) completely misread it.  We took this to mean that it was an issue with the member server trust, but that of course is a completely different error:

The trust relationship between this workstation and the primary domain failed.

We (okay, I – TB) finally figured out what was up – the customer had two broken domains trusts in the environment.  When asked, the customer said, “oh, yeah, I think we know about that, they are before anyone’s time and we were afraid to touch them.”  That of course was not a helpful answer, but they were onboard with whacking the trusts since they didn’t work anyway.

One of the things that caused us pain here is that there are substantial number of web pages and forum posts about this particular error, but they all relate to SP installation on an existing installation.  They go through recreating system mailboxes and all kinds of other hoops, but that was in our case the completely wrong thing to do.

Once we removed the bad trusts, the installation worked.  Yay.  It’s a case perhaps of “RTFEM.”  There’s a good question here of exactly why Exchange Setup cares here – it knows enough information to find the group in question without going through trusts, but it insists on doing so anyway.  One could even go so far as to this being a bug, although without knowing the team’s reasoning it’s difficult to jump to that conclusion.

In any event, hopefully this post helps other people out.

– Tom Bridge and Michael C. Bazarewsky
”Exchange Rock Stars” (Tom made us say that)