RSS 2.0
 Monday, December 22, 2008

Getting a virtual machine connected to the outside world in Hyper-V is a non-intuitive process. I had to bumble around with it a bit before finding the secret combination that worked well. Before I show you how it’s done (or at least one way of doing it), here are a couple of things to keep in mind:

  • When you add the Hyper-V role to Windows Server 2008, Hyper-V more or less takes over the physical computer and Windows Server 2008 becomes a virtual machine running in a special space called the home partition.
  • Hyper-V uses the concept of virtual networks. It’s as if your computer magically ingested a Netgear network switch, you know, that little blue box with lots of blinking lights on one side and network cable plugs on the other, which you use to create a home computer network. That’s right, the brilliant folks at Microsoft figured out how to suck one of those network switched right into their server operating system (I’m not sure, but I think they’re using Wonkavision technology to do it). Not only is the network switch virtualized, but all the cables to connect to it are virtualized as well. Now that’s handy.
  • Hyper-V implements three types of virtual networks: external, private and internal. An external virtual network gives virtual machines direct access to a physical network adapters on the physical computer. In effect, the virtual network shares the physical network adapter with the parent operating system (the Windows Server 2008 originally installed on the computer). A private network is used to connect two or more virtual machines running on the same physical computer to one another. An internal network is just like a private network, except it includes the parent operating system as well.
  • A virtual machine connects to a virtual network through a Hyper-V network adapter. Yep, you guessed it – a Hyper-V network adapter is virtual as well. Each virtual network adapter can connect to only one virtual network. However, a virtual machine can have multiple virtual network adapters, with each adapter connected to a different virtual network.
  • You can create any number of virtual networks and virtual network adapters in Hyper-V, limited only by how much load the hardware can support.
  • You cannot create an external virtual network that connects to a wireless network adapter. Sorry, the folks who created Hyper-V simply decided not to go there. Fortunately there’s a simple workaround that I’ll show you in this post.

Let’s say you want to configure your virtual machine to automatically use the physical network adapter whenever it’s plugged into a live connection, and also use a wireless connection when the physical network adapter is not plugged in. Here’s how you do it:

Step 1. Setup your Virtual Networks

This procedure assumes that you are running Windows Server 2008 on a computer that supports hardware virtualization, and that you are logged into an account that is a member of the Administrators group.

  • Launch the Hyper-V Manager

Create an Internal virtual network

  • In the Actions menu, click on Virtual Network Manager
  • In the box labeled “What type of virtual network do you want to create?” select Internal. Click the Add button.
  • In the New Virtual Network dialog box, enter the following:
    - Name: Internal Virtual Network (wireless)
    - Connection type: Internal Only
    Click OK

Create an External virtual network

  • Click on Virtual Network Manager
  • In the box labeled “What type of virtual network do you want to create?” select Internal. Click the Add button.
  • In the New Virtual Network dialog box, enter the following:
    - Name: External Virtual Network (wired)
    - Connection type: External
        Select the network adapter you want to use in the drop-down list
    Click OK

    The Virtual Network Manager should look something like this:

    image

Step 2. Setup the Wireless Network Connection for Sharing

This step is the secret ingredient that allows a Hyper-V virtual machine to access a network connection through the physical computer's wireless adapter.

  • Switch over to the parent operating system; i.e., the Windows Server 2008 originally installed on the physical computer.
  • Launch the Network and Sharing Center
  • Click on Manage Network Connections
    Note that there is a new network connection for each of the virtual networks you created in Step 3.

    image
  • Right-click on the Local Area Connection that shows “Internal Virtual Network (wireless)” below its name. Select Rename. Give it the name “Internal Virtual Network Connection”
  • Right-click on the Local Area Connection that shows “External Virtual Network (wired)” below its name. Select Rename. Give it the name “External Virtual Network Connection”
  • Right-click on your Wireless Network Connection and select Properties
  • Click on the Sharing tab
  • Select the checkbox labeled “Allow other network users to connect through this computer’s Internet connection”

    image


  • Click OK
    Your Network Connections list should now look something like this:

    image

Step 3. Connect a Virtual Machine to the Virtual Networks

The procedure can only be performed on a virtual machine that is turned off. Do this for each virtual machine you want to connect to the external world.

  • Switch to the Hyper-V Manager
  • Select the virtual machine you want to configure.
  • Click on the Settings link
  • In the Hardware list, click on Network Adapter
  • In the Network Adapter properties pane, select Internal Virtual Network (wireless). Click the Apply button
  • In the Hardware list, click on Add New Hardware
  • In the Add Hardware properties pane, select Network Adapter, then click the Add button
  • Back in the Hardware List, click on the Network Adapter marked “Not Connected”
  • In the Network Adapter properties pane, select External Virtual Network (wired). Click the Apply button.
    The Hardware list should now contain these two entries:

    image

  • Click OK to complete the configuration.

Step 4. Give it a Whirl

  • Verify that the parent operating system has Internet connectivity
  • Start the virtual machine
  • In the virtual machine, log on, open a web browser and browse to your favorite web site.

Your virtual machine should now have total Internet connectivity!

Monday, December 22, 2008 9:41:28 AM (Pacific Standard Time, UTC-08:00)  #    Comments [3] -
Hyper-V | Martin Danner | Windows Server 2008
 Thursday, December 11, 2008

I finally took the time to put together a chart showing which edition of Visual Studio needs to be installed on the Team Build server to achieve specific features. As you can see, Team Suite has you covered. As for the question of whether or not you need to purchase an additional copy of Visual Studio for this - that question has been answered on Jeff Beehler's blog as well as in the VSTS 2008 Licensing White Paper.

TFBVS

I might also add that Brian Randall mentioned that you can automate the validation of Architect Edition Deployment Diagrams on the Team Build server if you install that edition; but, being that he's the only guy on the planet to probably do that, I didn't think it was worth mentioning.

Thursday, December 11, 2008 8:58:48 AM (Pacific Standard Time, UTC-08:00)  #    Comments [2] -
Richard Hundhausen | Team Foundation Build | Visual Studio 2008
 Monday, December 01, 2008

What?

Increasing Your Agility with Scrum and Visual Studio Team System

When?

12/12/2008
9:00 AM - 12:00 PM

Where?

Microsoft Corporation
401 West Front Street
Suite 400
Boise, ID 83702

Why?

Martin Danner, Richard Hundhausen, and I are teaming up to bring you a 4 hour introduction to Scrum and the supporting capabilities of Team System. This is a free event, open to the public, and is sponsored by Microsoft.

My hope is that we can provide value from 3 different perspectives.

  1. Learn the basics of Scrum
  2. Learn the basics of Team System
  3. Learn how Team System can support Scrum teams

Sign up via the link above. I hope I see you there.

Monday, December 01, 2008 2:55:25 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1] -

 Friday, November 28, 2008

When looking at FinalBuilder and Team Foundation Build side by side, the obvious breakdown in features and advantages looks like this.

  1. Team Foundation Build provides a complete build solution with easy integration to other components of Team Foundation Server and Visual Studio Team System. Here is a set of features that detail what integration really means.
    • Build reporting and archiving inside Team Foundation Server
    • Easy access to source control
    • Ability to quickly spool up quick and dirty builds
    • Simple scheduling tools providing day, time, and event driven build firing
    • Easy to use retention tools for "expiring" old build artifacts
    • Automated test execution
  2. FinalBuilder provides an excellent visual development environment with pretty widgets to drop on a design surface. Creating build scripts visually can be a nicer design experience than working with the raw XML found in Team Foundation Build and tools like nAnt.

    Microsoft obviously recognizes the value of visual composition as the next version of Team Foundation Build (2010) is built on WF (Windows Workflow). This means builds tasks are effectively WF activities. If you've worked with WF, you may know that WF almost implies the next point: Team Foundation Build scripts will be built visually via a design surface in Visual Studio.
  3. Arguably, the most significant advantage FinalBuilder has today is in the number of out-of-the-box build tasks (actions in FinalBuilder language) that come with the product. A complete list of FinalBuilder actions is available here.

    The complete list of FinalBuilder actions is exhaustive and I don't dare replicate it here.

Integration of the 2 Products

Regarding using Final Builder with Team Foundation Build, it is important to note that the two products don't preclude each other. Far from it, FinalBuilder ships with an integration task for working with Team Foundation Build. See this article for more information about using that integrated functionality.

This integration task gives us the ability to call FinalBuilder scripts from an automated (scheduled or event-fired) Team Foundation Build run. This is cool because we get the best of both tools:

  1. TFB Gives us complete integration with the development platform and reporting tools of Team System.
  2. 2. Final Builder gives us a nice visual development experience and more out-of-the-box build tasks than MSBuild.

Choosing the Right Tools from your Toolbox

One thing to keep in mind is this: Is the tool you need one that simply builds .NET web sites, class assemblies, and windows forms applications? If yes, the problem you are trying to solve is moderately simple. Team Foundation Build does a very good job of providing a complete solution for these scenarios.

FinalBuilder does have an additional expense associated with it, so if the build situation you are trying to solve is one of creating .NET binary packages, you may be better off using Team Foundation Build "unadorned". It does a great job of doing what it does.

If you are looking for other functionality like working with VB6 projects or spooling up virtual machines for deployment scenarios, FinalBuilder has a lot to offer. The promise of Team Foundation Build extending WF in the 2010 Team System release holds the promise of a solidly extensible build platform with an inherent visual design story. As Team Foundation Build matures, it will likely provide a feature parity competitor to FinalBuilder, but it has some catching up to do.

Friday, November 28, 2008 11:02:48 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -

Microsoft has certainly been ratcheting up the community involvement over the last few years. In a down economy like this one, free training opportunities suddenly take on even more significance. Local user groups, Code Camps, product release events, and occasional "just because" events all provide opportunities to get together with local developers and maybe add a tool or two to your toolbox. One such initiative is the Fire Starter Event series.

These events are one day, free-to-attend, community produced deep-dive immersions on particular technologies. FireStarters are opportunities to learn about some technology in the MSFT stack that you may not be familiar with and would like to see the essentials needed to get started.

Think of FireStarters as mini Code Camps dedicated to specific technologies. Nice!

Currently scheduled FireStarters include:

Previous FireStarters have focused on Silverlight, ASP.Net + AJAX, and SQL Server. If you would like to see a FireStarter event in your community, contact your local MSFT Developer Evangelist and see what can be arranged.

Friday, November 28, 2008 8:46:32 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -

If you exchange email with me on a regular basis, you know that I am the king of email faux pas. I regularly do things like this:

  • Use CNTRL+Enter to send an email sooner than I really want to send it.
  • Send emails that are missing attachments.
  • Send from my work account when I meant to send from my personal account (this one is a biggy in Outlook).
  • Hit Reply All when I meant Reply.
  • Include the wrong person on the CC line.

In short, I am well aware of proper email etiquette, but I am notoriously bad at exercising it. All I really need is a last minute check to ensure I am not doing something stupid.

Enter my first real (Visual Studio Tools for Office) application. I just want to give myself an "Are You Sure" screen before sending an email in Outlook and review all the critical aspects of the email before I send it.

This Add In for Outlook 2007 simply displays a window before actually sending my email, giving me an opportunity to change my mind. It shows me the major things that I should check before really hitting send:

  • The account I am sending the email from
  • The addresses on the To: line
  • The addresses on the CC: line
  • The addresses on the BCC: line
  • The number of attachments on the email.

image

The code is up on Elegant Code's Google Code SVN repo here and you can download the click once installer here. I guess if anyone cares about something as inane as this, you are welcome to send me feedback and suggestions.

I am the first to realize this is a lame little utility, but it was interesting to write it as I got a little more familiar with the VSTO model. Also, I know there aren't any real unit tests in the test project. The reasons for this are twofold.

  1. The app is nothing much more than a Windows form with drag and drop attributes and 2-line event handlers.
  2. I am feeling lazy tonight.

Enjoy.

Friday, November 28, 2008 8:01:00 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -

 Wednesday, November 26, 2008

Believe me, I understand TDD. I grok it. It is in my soul.

I also happen to believe (and know from experience) that unit test frameworks are valuable far beyond their use in TDD. Some of the best uses are for integration tests at the API level.

It is this coolness that makes it so handy to run a unit test harness as a load test run using VSTS. I worked with one client who had a particular need for this in testing a HUGE network of independently addressable embedded Linux devices, each one exposing a TCP/IP-level API. More on how to running unit tests as load tests here.

But on to my latest use of a unit test. Remember back in the day when we wrote libraries without unit test frameworks? What did we do? We wrote a little command line EXE to exercise the thing while we wrote it and never checked that in to SCC. It worked, mostly.

I often have the same need when writing Windows Forms applications. I want to spool up and play with a window without all of the overhead of the entire application. So, here's my test.

   1: namespace ElegantCode.BeSure.Test.GivenTheConfirmationDialogIsDisplayed
   2: {
   3:     [TestClass]
   4:     public class WhenTheUserClicksNo
   5:     {
   6:         [TestMethod]
   7:         public void ThenTheDialogResultShouldBeNo()
   8:         {
   9:             ConfirmationForm confirmationDialog = new ConfirmationForm();
  10:             DialogResult result = confirmationDialog.ShowDialog();
  11:  
  12:             Assert.AreEqual(result, DialogResult.No);
  13:         }
  14:     }
  15: }

No, this is not a unit test. All this does for me is allow me to open the window in a run time environment, see it lay out on the screen, click around on it, etc.

If you notice the structure of the test naming, I am using a little BDD convention because I am wondering about the idea of building a manual regression suite this way. What if a tester sites down and runs through a manual test by launching the a unit test harness that drives the UI.

It's an interesting idea, anyway.

Wednesday, November 26, 2008 11:19:02 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -
David Starr
 Monday, November 24, 2008

Team_Build_Target_Map1.docx (22.73 KB)

I had the good fortune of reviewing the upcoming book titled Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build. This book is an absolute must for anyone who is creating and customizing build definitions in Team Foundation Build. As part of my review process I created a map that lists the order of target invocation. I found this map very handy, so I’m posting it because I figure others will find it handy too. The map is listed below, and also contained in the attached word document. If you make any corrections or improvements to the map, please share back!

By the way, MSBuild Sidekick turned out to be very useful in building this map. The Team Foundation Build targets file is large and complex. MSBuild Sidekick's tree-view makes it much easier to navigate this beast, and the search features made it easy to traverse the target dependencies. This is a very handy tool for editing (or studying) build scripts.

This map shows the order of target execution in the Team Build targets file,  %ProgramFiles%\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets. The target names in the map are color coded as follows:

Green: this is an extensibility target that can be customized in your TFSBuild.proj file
Blue: This is run as a separate MSBuild process to support parallel processing

EndToEndIteration

When a Team Build agent starts a new build, the build starts by invoking the EndToEndIteration target. This target then invokes the following chain of targets.

·         CheckSettingsForEndToEndIteration

·         InitializeBuildProperties

·         BeforeEndToEndIteration

·         BuildNumberOverrideTarget

·         InitializeEndToEndIteration

·         InitializeWorkspace

o   BeforeInitializeWorkspace

o   CoreInitializeWorkspace

o   AfterInitializeWorkspace

·         TeamBuild

o   CleanAll (CleanCompilationOutputOnly != true)

o   InitializeBuild

o   PreBuild

§  Get

·         BeforeGet

·         CoreGet (SkipGet != true)

·         AfterGet

§  Label

·         BeforeLabel

·         CoreLabel (SkipLabel != true)

·         AfterLabel

o   CleanCompilationOutput (CleanCompilationOutputOnly == true)

§  BeforeClean

§   CallClean (SkipClean != true)

·         CoreCleanCompilationOutput

o   ComputeConfigurationList

o   CleanConfiguration

§  BeforeCleanConfiguration

§  CoreCleanConfiguration

·         ComputeSolutionList

·         CleanSolution

§  AfterCleanConfiguration

§   AfterClean

o   Compile

§  BeforeCompile

§  CallCompile

·         CoreCompile

o   CompileConfiguration

§  BeforeCompileConfiguration

§   CoreCompileConfiguration

·         ComputeSolutionList

·         CompileSolution

o   BeforeCompileSolution

o    CoreCompileSolution

o    AfterCompileSolution

§   AfterCompileConfiguration

§   AfterCompile

o   PostBuild (SkipPostBuild != true)

§  GetChangesetsAndUpdateWorkItems

·         BeforeGetChangesetsAndUpdateWorkItems

·          CoreGetChangesetsAndUpdateWorkItems (SkipGetChangesetsAndUpdateWorkItems != true)

·          AfterGetChangesetsAndUpdateWorkItems

o   Test

§  BeforeTest

§   CoreTest

·         RunTest

o   TestConfiguration

§  BeforeTestConfiguration

§   CoreTestConfiguration

·         ResolveTestFilesForEndToEndIteration

§   AfterTestConfiguration

§   AfterTest

o   GenerateDocumentation

o   PackageBinaries

·         DropBuild

o   BeforeDropBuild

o    CoreDropBuild (SkipDropBuild != true)

o    AfterDropBuild

·         AfterEndToEndIteration

DesktopBuild

This is the target execution sequence when you perform a Desktop Build. For more information on configuring and using a Destop Build, see this MSDN article.

·         Compile

o   BeforeCompile

o   CallCompile

§  CoreCompile

·         CompileConfiguration

o   BeforeCompileConfiguration

o    CoreCompileConfiguration

§  ComputeSolutionList

§  CompileSolution

·         BeforeCompileSolution

·          CoreCompileSolution

·          AfterCompileSolution

o    AfterCompileConfiguration

o    AfterCompile

·          Test

o   BeforeTest

o    CoreTest

§  RunTest

·         TestConfiguration

o   BeforeTestConfiguration

o    CoreTestConfiguration

o   AfterTestConfiguration

o    AfterTest

·          GenerateDocumentation

·          PackageBinaries

DesktopRebuild

Start a build using DesktopRebuild as the initial target to perform a clean, full compilation and run tests.  For more information on how to build team projects on the desktop, see this MSDN article.

·         Clean

o   BeforeClean

o   CoreClean

·         CoreCleanAll (CleanCompilationOutput != true AND SkipClean != true)

·         CallClean (CleanCompilationOutput == true AND SkipClean != true)

o   CoreCleanCompilationOutput

§  ComputeConfigurationList

§  CleanConfiguration

·         BeforeCleanConfiguration

·         CoreCleanConfiguration

o   ComputeSolutionList

o   CleanSolution

·         AfterCleanConfiguration

o   AfterClean

·         DesktopRebuild (see previous section for details)

OnBuildBreak

If an error occurs during the compile phase, normal processing is suspended and the OnBuildBreak target is invoked. This target then invokes the following sequence of targets:

·         BeforeOnBuildBreak

·          CoreOnBuildBreak

o   GetChangesetsOnBuildBreak

§  BeforeGetChangesetsOnBuildBreak

§   CoreGetChangesetsOnBuildBreak (SkipGetChangesetsAndUpdateWorkItems != true)

§   AfterGetChangesetsOnBuildBreak

o   DropBuild

§  BeforeDropBuild

§   CoreDropBuild

§   AfterDropBuild

o   CreateWorkItem

§  BeforeCreateWorkItem

§  CoreCreateWorkItem (SkipWorkItemCreation != true)

§  AfterCreateWorkItem

·         AfterOnBuildBreak

Skip Properties

These properties are used to suppress the execution of certain targets in the build sequence.  A complete list of customizable Team Foundation Build properties can be found in this MSDN article.

·         SkipClean

·         SkipDropBuild

·         SkipGet

·         SkipGetChangesetsAndUpdateWorkItems

·         SkipInitializeWorkspace

·         SkipInvalidConfigurations

·         SkipLabel

·         SkipPostBuild

·         SkipWorkItemCreation

Monday, November 24, 2008 4:57:40 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1] -
Martin Danner | Team Foundation Build | Visual Studio 2008
 Friday, November 21, 2008

So I splurged recently and picked up one of the new Western Digital 300GB SATA VelociRaptor drives. I also happened to be in Las Vegas, and there was a Fry's nearby. I think that was the cause, and the effect was me ending up with the drive, but I digress. Every so often, I wonder how fast my various 5400, 7200, and 10000 RPM drives are, especially taking USB 2.0 and ESATA into account. I downloaded the latest version of HDTach and went to work with my not-very-scientific performance tests:

Hard Drive Random Access CPU Utilization Average Read Burst Speed
Internal Hitachi 100GB 7200RPM 16.8 ms 3 % 41.3 MB/s 114.6 MB/s
External 5400RPM (USB) 17.9 ms 13 % 32.8 MB/s 36.2 MB/s
External 750GB 7200RPM (USB) 13.9 ms 0 % 34.7 MB/s 35.1 MB/s
External 750GB 7200RPM (ESATA) 13.6 ms 4 % 66.9 MB/s 90.4 MB/s
External 300GB 10000RPM VelociRaptor (ESATA) 7.3 ms 4 % 80.0 MB/s 88.9 MB/s

  Hardware used: Dell D820 laptop, 4gb RAM, Windows XP/SP2

BTW - the numbers in bold make me happy, and here's the graphic that went along with the final test (the VelociRaptor drive):

HDTach

Friday, November 21, 2008 3:33:58 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -
Development | Misc | Richard Hundhausen | Virtual PC 2007
 Thursday, November 20, 2008

I taught another week long class on Team System last week and as always, I learned a lot. It's a definite truth that if you want to learn about something, teach a class on it.

The other thing about is that each client you work with is looking to solve a different problem and you get introduced to new scenarios when you work through the "How can I solve that problem" discussions. This week included a lot of those types of discussions, and I therefore had to dig a bit.

What pearls of wisdom did I come away with?

  1. There is no apparent command line tool or GUI tool to get ONLY the files that changed as part of a change set.

    Scenario: I have files A, B, and C in a folder, and I change file B as part of change set 43. When I do a get (tf.exe get 43) I am going to get all 3 files.

    What to do if I only wanted the delta (file B)? Well, there's a freeware utility waiting to happen.
  2. In TFS 2008, I can create a new Team Project and as part of that installation, I can choose to create the new source control library as a branch of a code line in another Team Project.

    What happens to the history in case I delete Team Project A, which was the head for Team Project B's branch in SCC? Well, Team Project B just became the head.
  3. There is a PowerTool set for the Database Professional SKU (now packaged with the Developer SKU) that adds T-SQL code analysis. Maybe this will cut down on:
    select * from customer
Thursday, November 20, 2008 9:59:36 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -

Navigation
Archive
<December 2008>
SunMonTueWedThuFriSat
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Accentient, Inc.
Sign In
Statistics
Total Posts: 386
This Year: 7
This Month: 3
This Week: 1
Comments: 376
Themes
Pick a theme:
All Content © 2010, Accentient, Inc.
DasBlog theme 'Business' created by Christoph De Baene (delarou)