Hyper-V for Developers Part 1 Internal Networks

Posted on Dot net Slackers See other posts from Dot net Slackers
Published on Sun, 06 Jun 2010 00:00:00 GMT Indexed on 2010/06/06 18:53 UTC
Read the original article Hit count: 238

Filed under:

Over the last year, weve been working with Microsoft to build training and demo content for the next version of Office Communications Server code-named Microsoft Communications Server 14. 

This involved building multi-server demo environments in Hyper-V, getting them running on demo servers which we took to TechEd, PDC, and other training events, and sometimes connecting the demo servers to the show networks at those events.  ITPro stuff that should scare the hell out of a developer!

It can get ugly when I occasionally have to venture into ITPro land.  Lets leave it at that.

Having gone through this process about 10 to 15 times in the last year, I finally have it down.  This blog series is my attempt to put all that knowledge in one place if anything, so I can find it somewhere when I need it again. 

Ill start with the most simple scenario and then build on top of it in future blog posts.

If youre an ITPro, please resist the urge to laugh at how trivial this is.

Internal Hyper-V Networks

Lets start simple.  An internal network is one that intended only for the virtual machines that are going to be on that network it enables them to communicate with each other.

Create an Internal Network

On your host machine, fire up the Hyper-V Manager and click the Virtual Network Manager in the Actions panel.

1[1]

Select Internal and leave all the other default values.

2[1]

Give the virtual network a name, and leave all the other default values.

3[1]

After the virtual network is created, open the Network and Sharing Center and click Change Adapter Settings to see the list of network connections.

The only thing I recommend that you do is to give this connection a friendly label, e.g. Hyper-V Internal.  When you have multiple networks and virtual networks on the host machines, this helps group the networks so you can easily differentiate them from each other. 

Otherwise, dont touch it, only bad things can happen.

4[1]

Connect the Virtual Machines to the Internal Network

Im assuming that you have more than 1 virtual machine already configured in Hyper-V, for example a Domain Controller, and Exchange Server, and a SharePoint Server.

What you need to do is basically plug in the network to the virtual machine.  In order to do this, the machine needs to have a virtual network adapter.  If the VM doesnt have a network adapter, open the VMs Settings and click Add Hardware in the left pane.  Choose the virtual network to which to bind the adapter to.

5[1]

If you already have a virtual network adapter on the VM, simply connect it to the virtual network.

6[1]

Assign IP Addresses to the Virtual Machines on the Internal Network

Open the Network and Sharing Center on your VM, there should only be 1 network at this time. 

7[1]

Open the Properties of the connection, select Internet Protocol Version 4 (TCP/IPv4) and hit Properties.

8[1]

In this environment, Im assigning IP addresses as 192.168.0.xxx.  This particular VM has an IP address of 192.168.0.40 with a subnet mask of 255.255.255.0, and a DNS Server of 192.168.0.18.  DNS is running on the Domain Controller VM which has an IP address of 192.168.0.18.

9[1]

Repeat this process on every VM in your environment, obviously assigning a unique IP address to each.  In an environment with a domain controller, you should now be able to ping the machines from each other.

What Next?

After completing this process, heres what you still cannot do:

  • Access the internet from any of the VMs
  • Remote desktop to a VM from the host
  • Remote desktop to a VM over the network

In the next post, well take a look configuring an External network adapter on the virtual machines.  Well then build on top of that so that you can RDP into the VMs from the host machine and over the network.

Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.



Email this Article

© Dot net Slackers or respective owner