Skip Links

Network World

Brian Egler

Use the Loopback adapter in Virtual Server 2005

SQL Server

By Brian Egler on Fri, 08/14/09 - 8:32pm.
Newsletter Signup

Teaching Microsoft classes means using Virtualization for education and testing. Nowadays we can set up a virtual cluster and test out a failover cluster using a rinky dink laptop. Pretty amazing, really. I discovered a neat feature with Virtual Server recently - the loopback adapter.

We have been using virtualization for a while now. For non-Microsoft courses we use VMWare. When Microsoft acquired Connectix we started using their version Virtual PC. The nice thing about Virtual PC was that you could drag-and-drop files from your host machine (the physical machine) to your guest OS (the virtual machine or VM) and vice versa. However, this opens up security issues so we had to lock that feature down for our Virtual Classroom sessions over the internet.

Recently, I wanted to allow a customer to test out their own applications using the same VM we used in a class. Actually, we wanted to copy a production DTS package to a Windows 2000 VM and migrate it to SSIS on a Windows 2008 VM. I soon discovered that Virtual Server 2005 R2 does not support that drag-and-drop feature, presumably for the same reason we disabled it.

So how can we copy files from the host to the guest OS? In this day and age, it's a matter of getting onto Google and checking things out. I found the answer on a Microsoft blog. It's the Loopback adapter.

Step 1 is setting up the Loopback adapter on your host machine from Control Panel/Add Hardware although you are not adding any real hardware. Even if your host is completely disconnected from any network (like in a class), this will provide a connection for your VMs to grab hold of. If you let it default, the loopback adapter will get a 169.254.x.y linklocal (APIPA) address which is just fine for local communication. Usually this type of IP means we can't access the internet but what people don't realise is that it can be used for Local networks if you don't need the internet. I guess that's why it's called LinkLocal...

Step 2 is creating a Virtual Network in Virtual Server that links to that Loopback adapter.

Step 3 is mapping that Virtual Network to the Guest OS under your VM Configuration. When you start your VM, the IP address it grabs will be 169.254.x.y which will connect to the host and allow IP communication.

Step 4 is to do the same with other VMs. In my case I had a Windows 2000 VM and a Windows 2008 VM that needed to connect to each other so we could use SSMS/BIDS 2008 to copy packages and databases between them. Again the Virtual Network allowed us to do this. Oh, yeah, the original objective was to get files from the host to the VMs. This was done through shared folders on the host.

The best solutions are usually the easiest, aren't they?

I first discovered the feature on this blog:
http://blog.shijaz.com/2007/07/making-virtual-server-talk-to-host.html

Here are more details: (I know you love the details...)
http://vscommunity.com/blogs/virtualzone/archive/2007/01/09/using-the-microsoft-loopback-adapter-with-virtual-server-2005-r2.aspx

cheers
Brian

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You can use BBCode tags in the text.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <p> <strong> <i> <br /> <br> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Welcome, visitor. Register Log in
About Brian Egler's SQL Server Strategies

Brian D. Egler, MCITP/MCSE/MCT 2009, is currently an instructor with Global Knowledge, teaching various Microsoft training courses. He is a SQL specialist with a focus on SQL Server, Windows, .Net and XML. Egler has been a technical instructor for over 20 years and has more than 10 years experience with SQL Server, data modeling, database design, application development including IMS, DB2, Sybase. Every year he runs the Boston Marathon for cancer research.

Global Knowledge