May 23, 2008
Tip and Trick Editorial

Fix Virtual PC 2007 Shared Networking (NAT) Internet Not Working in Windows Server 2003, 2008 and Vista Guest OS

After installing Windows Server 2003, Windows Server 2008 and Windows Vista into Microsoft Virtual PC’s virtual machine (VM) (update to Virtual PC 2007 SP1) as guest operating system, and set the Networking Settings for the VM to use Shared Network (NAT) as the network adapter, the Internet appears to be not working where web browser (Internet Explorer, IE and Firefox) cannot connect, find, locate or browse to website.

However, when IP address is used, access to the external server on Internet may work. For example, ping, trace route, ftp, sftp, telnet and SSH using IP address instead of domain name or host name, user can successfully connecting to the remote server.

NAT (Network Address Translation) is an easy shared networking technique that masquerading or transceiving network traffic through a router that involves re-writing the source and/or destination IP addresses and the TCP/UDP port numbers of IP packets as they pass through. In the case of Virtual PC, it uses a virtual NAT router which built on host computer’s default active network connection to allow guest operating system to access Internet via the host’s Internet connection.

Shared Networking or NAT allows computers or hosts on a private network to access the Internet using a single IP address, without exposing the PCs (or virtual machines) to the external network, significantly reduce security risk. NAT is also useful to allow virtually unlimited number of IP addresses to connect to Internet, thus administrator is not limited by the amount of IANA assigned-IP address allocated space. Beside, Shared Network (NAT) allows user to easily plug and play or move the virtual machine or physical machine to different network configurations such as different Wi-Fi wireless access point, home or office network.

Most computers, including Virtual PC 2007 virtual machines can easily access Internet using Shared Networking, as easy as right after operating system is installed, which enable DHCP by default. So, the problem with Windows Server 2003, Server 2008 and Vista as guest OS cannot access Internet is by design. The Internet not working issue is caused by when the guest operating system queries for DNS Server from Shared Network (NAT) virtual router, the guest OS is configured to use the same DNS servers which are used by the physical host computer.

This is not the case with a Windows Server 2003 guest though. The problem is that Shared Networking configures the guest operating system to use the same DNS servers as are used by the physical computer. However, when actual DNS query resolving packets are been returned, it’s actually returned from the IP address of “”, which is the virtual gateway used by Shared Networking (NAT).

Windows Server 2003, Windows Server 2008 and Windows Vista will reject any DNS resolution packets that are returned from a different source from than the DNS Server (both has different IP address) that it had requested the information from. As thus, all name resolution of domain name and URL fails, indirectly leads to the guest operating system appears to be cannot connect to Internet. Windows XP and older operating system is not affected by this behavior.

To fix the Shared Network (NAT) Internet no connection or not working issue, the resolution is to manually assign the IP address for the DNS Server for the guest operating system to, the virtual gateway IP address used by Virtual PC. To make the change (in guest operating system), open Network Connections folder (in Windows Vista, access via Network and Sharing Center), and right click Local Area Connection network icon to select its Properties. Then double click on Internet Protocl (TCP/IP) under General tab or Internet Protocol Version 4 (TCP/IPv4) under Networking (for Windows Vista) tab.

DNS Server Gateway IP for Virtual PC for Internet

Click to select the radio button of Use the following DNS server addresses, and then type in into the IP address box for Preferred DNS Server. Click OK twice to exit, and voila, the Shared Network (NAT) now works as it should with Internet access.

If you’re encountering this problem in Windows XP guest OS, it’s probably caused by invalid DNS server assigned by Virtual PC network adapter too.

  • Haris LinuxOS

    Thank you! I ve been searching for hours, and now my Win 7 Ult VM has internet!!

    • TnT Editor

      You can continue share or follow us on Twitter, add us to your circle on Google+ or like our Facebook page to keep yourself updated on all the latest info from Microsoft, Google, Apple and the Web.

  • my virtual vista ultimate does not have local area connection. my real PC is directly connected to internet and on virtual settings, I put 4 adapters and i have not the CD on these: atheros adapter, Teamviwer VPN, local only and Shared networking NAT

  • Roger

    You are my hero – unbelievable that MS cannot fix this Problem
    Since 2008 ???!!!???

  • Raj

    It really worked!! thank you so much for share.

  • Deivs30

    Thank You. Work as U write

  • Quyen Leighton

    An impressive share, I simply given this onto a colleague who was doing a bit evaluation on this. And he the truth is purchased me breakfast because I found it for him.. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the time to discuss this, I really feel strongly about it and love reading more on this topic. If attainable, as you turn out to be experience, would you mind updating your blog with more details? It is highly useful for me. Massive thumb up for this weblog submit!

  • leonardinho1

    Great, very well explained solution to this problem, my virtual wk2008 has access to internet now!!! Thank you very much.

  • Timo

    Oh, I spent a few hours trying to find an answer and this worked immediately. Thanks a lot!

  • Abhijeet

    This works perfectly fine for me. Using Windows 7 and VPC 2003. Works alright for me. Thanks a ton..!!

  • farid


    friend i am facing a issue in a ibm mt-7979 12s

    server running base opperating system windows r2 enterprise,ihave installed virtual pc 2007 on it

    and trying to run virtual pc (windows 2003) on it

    as soon as i start the machine and make it available in lan,my virtual lan is available and my base machine is not available in network

    please suggest a sollution urgent

    thanks for your advice

  • Marius

    THX a lot!

    This worked straight out of the box and was a great relief!

  • mezumi

    Have spent soo much time googling on this problem and none worked. But with just the change of the DNS server address I could connect to the internet at last!!

    Thanks so much!!

  • Scott Marlowe

    Just the fix I needed. Thanks.

  • David

    Wow, instant fix! Thank you so much.

  • Abed Zaben

    Thank you a lot my friend, I am having BackTrack4 running as the guest operating system, and I had an issue when trying to connect to the internet, so if you wanna do it in Ubuntu ( where BackTrack4 is Ubuntu based) use

    ->dhclient eth0

    ->sudo nano /etc/resolv.conf

    and edit the nameserver line from to and everything will works fine πŸ™‚

    NOTE: after editing restart the network interface

    -> /etc/init.d/networking restart

    if you get repeated Errors then just ignore it and "Ctrl + C" it πŸ™‚


    ~ Abed

  • Stephen

    "To fix the Shared Network (NAT) Internet no connection or not working issue, the resolution is to manually assign the IP address for the DNS Server for the guest operating system to"

    Just what I needed, many thanks!!!

  • MINA

    Excellent, thank you

  • Same goes for me!

    I've been going nuts trying to get updates to work for my virtual server 2003.


  • Joe

    A follow up. address was unecessary – just turned on NAT. Cisco VPN works with UDP only from VM.

  • Joe

    I have what is obviously a DNS Resolution issue running a Vista 32-bit Ultimate VM on Windows 7 Pro 64-bit Virtual PC. I tried the DNS address to no avail and even looked for a security tab on the virtual Intel adaptor which does not exist. I also tried disabling the host protection (SEP) on the host and no luck. I can ping anyting except but DNS resolution is obviously not hapening. Maybe MS changed the virtual DNS address in Win7 64-bit? Anyone have any other ideas?



  • I am still having trouble connecting my VPC2007 Server 2008 to the internet even when using this solution

    Any ideas on the situation

    Greetz Dwayne

  • itzmescottg

    thanks bro, works 100% when running windows 7 ultimate in :Windows Virtual PC"

  • Rajan Verma


    it solved my problem. thank you very much for your support


    Rajan Verma

  • David Ingledew

    Perfect. Worked straight away. Now need to see if we can get to work with two other specific IP's too.

  • Pingback: Virtual PC could not connect to the internet | .Net Technical Blog()

  • RedD

    Thank you!
    solved the problem with internet connection through manual guidance addresses DNS server guest identical at CSN-server host

    thanks again

  • hello good friends and learned me ahy q problems with internet connection pc wirtual q Vuena what to do is see if they have windows xp sp2 only they ought to go to your windows xp desktop and Ariba in 2007 DEVES virtual bar to go comfiguracion editing and put him aces clik to networks and network simvolo winged ahy you put shared network (NAT) and ready if it works send me an email to n.roa619 @

  • Thank you a million times over!! Finally, a detailed explanation and elegant solution!!

  • Awesome! Thank you so much. I had no clue what was going on…

  • Lance Snead

    Great tip. I've been trying to figure this one out for awhile..

  • gabi

    thanks! great find.

  • Roy Zeagler

    Thanks man…worked like a charm.

  • bakabaka

    I've done it on my own with Microsoft Loopback Adapter and ICS, but i had to change to "obtain dns automatically".

  • bakabaka

    Hey, it doesn't work>_<

    Am i the only stupid here?

    I have virtual pc on vista, inside – server2003

    I did everything as described but unfortunately it works for about 2 seconds and later it looks like its sending but not receiving…


  • BG

    Thank you. It worked for me as well.

  • Peter

    Thanks, works perfect.Great post

  • Ali

    Hi – thanks a lot – this tip saved many time. I tried so many things – on vista64(host) with vista32 guest system no internet was available. After i filled the dns there is internet connection (NAT). Thats funny because virtual pc 2007 is running fine on my other PC (vista32 host and xp or vista32 guest – i never had to do something to have internet connection in VPC)…Strange that !!!

  • RyDer

    Thanx a lot, man! You save my butt!!

  • Chris

    Thanks worked a treat!

  • Vikas

    "Use the following DNS server addresses, and then type in into the IP address box for Preferred DNS Server."

    Your one line solved my 2 days old problem. Simply great post… keep up the good work… πŸ™‚

  • Pingback: Virtual PC 2007 ε¦‚δ½•δΈŠηΆ²()

  • Rocjoe

    Your awesome awesomeness is exemplified by this awesome article. It's amazing how fixing the little things makes such a big difference!

  • Caga Regras

    Thanks! It seems other desktop virtualization apps suffer from the same problem when using W2K3 Server as a guest. Either VMware or VirtualBox, or both.

  • Pingback: Integrating Silverlight 3 in SharePoint 2007 « Karine Bosch’s Blog()

  • Tom

    This is great. Thanks a lot.

  • Naveed Sheikh

    Thanks a lot for the article. The network is working for me now. I was pulling my hair since yesterday to rectify this problem.

  • RJ

    Thanks a lot .. it worked for me ..

  • Edward

    Perfect solution to my puzzling no-inet issue with Windows 7 RC1

    I now have a working Win7 RC using VPC on Vista. Very happy!

    Thank you so much

  • giori

    Thanks a lot for your article. I am running Wampp on my working pc and use virtual pc 2007 for testing ie6/ie7 display in web design.

    Was wondering why NAT was working with xp but not with Windows 7 until I found this. You really made my day!

  • Martin

    Agree as Windows 7 RC (build 7100)solution, thank you for this post

  • msftnerd

    Thanks for the info, you made my day…

  • Michael

    Thanks a lot, I used this tip to configure my network setting on a virtual windows 7, works great!!


  • trev

    Brilliant! Thanks a bunch

  • Larah

    Another solution for those who tried the DNS solution above and failed. I ran into the same problem running VPC 2007 on XP SP3 (host) with 2k3 (guest) configuration. Using IE, for some reason I couldnt connect to windowsupdate to patch my 2k3 install. Strangely, I was able to connect to, but not to or windowsupdate. After mucking around with the network settings on the 2k3 instance, I found that 802.1x authentication was automatically checked. I unchecked this and instantly every website was accessible using IE.

  • Exactly the info I need, thanks!


  • Pingback: Vmware Workstation 6.0 - NAT fails()

  • Paddy

    This is really a good post. Thanks a ton.

  • Meysam

    My Exprince:

    if u use Dial-UP Modem u should first connect & then start the VM Consol.

  • DrMatt

    You are one smart cookie. Worked like a dream with Windows 7 beta as guest on VPC 2007 SP1 on Vista business host.

  • jsgiii

    Great solution. I had problems with using the NAT in VPC 07 after I had installed Windows 7 beta. Seems like I forgot to update my Virtual PC to SP1. The install went fine, but I had problems with internet connectivity. Your solution worked for the Windows 7 beta.

    Thank you, thank you, and thank you.

  • Frank

    Wow, great job on figuring this out man!!

    I was pulling my hair out…I had XP set up and all was working fine in VPC2007, and the Server2003 just would not connect to the internet…made your change and that did it.

    Thanks again!


  • Thank you.

  • Jessie

    THANK YOU THANK YOU THANK YOU!!! This worked with my Windows Vista VM on M7 πŸ™‚

  • Stan

    Didn't work for me, either. Fresh install of Windows 2008 Enterprise as guest on VPC 7 SP1 on XP SP3 host.

  • sunil

    I have installed windows 2003 server in in another drive D apart from windows xp which is in drive c.i am unable to access internet in windows2003 server through wireless connection,

    even trusted sites also.

    Any help will be great help.

  • daniel sikorsky

    thanks so very much!!!!!!!!

    worked like a charm!!host is winxp, guest is vista vm machine!

  • OMV

    Thank you, senor!

  • Gary

    Gee, I tried all that and it still wont work. I have Server 2003 Enterprise on the Virtual PC. The host os is Win XP professional. Did the NAT part and changed the DNS. but still not working. Any help please??


    Thanks a lot……………….

  • Sir William

    Thank you! This worked but what a headache!

  • Kamil D.

    I was very surprised, when it turned out, that NAT doesn't work at all or STOPS WORKING AFTER FEW minutes.

    I'm still wondering, why does NAT work sometimes for two, three minutes…

  • Yoshio Kurtz

    Nice tidbit and fix. I was getting annoyed until I found this.

  • mark

    good, this was helpful, thanks.

  • Thanks

    This was helpful

  • unhg

  • IB

    Thanks, I had to enter as dns server

  • Pingback: Unable to Connect to Internet in Virtual PC with NAT Shared Networking NAT on Windows XP Guest » My Digital Life()

Get latest updates via email: