How to share share internet connection to Hyper-V guest in Windows 8?

2

I have a Windows 8 machine with Hyper-V and I want to configure an internet connection on my guest system. The requirement is that the guest must have exactly the same IP and MAC addresses as the host.

I wanted to share the internet connection as described here, but I get the following error message:

An error occurred while Internet Connection sharing was being enabled. Internet Connection Sharing cannot be enabled. A LAN connection is already configured with the IP address that is required for automatic IP addressing.

My actual IP is 192.168.0.206 and I can't change that.

What is interesting, when I create a hosted network as follows:

netsh wlan set hostednetwork mode=allow ssid="name" key="key"

netsh wlan start hostednetwork

then I can share the internet connection.

I found this article that I wanted to try, but unfortunately Windows 8 has no RASS.

What else I can do to share the internet connection from host to guest with the same IP and MAC address?

lkurylo

Posted 2013-05-24T21:01:25.550

Reputation: 131

Answers

0

The guest must have exactly the same ip and mac as the host

This is not possible. How will other devices on your network distinguish between the two devices? What you can do is use the internal setting on Hyper-V, but as you already noticed you won't be able to access the Internet.

I'm not exactly sure why you can't change your IP, but have you considered putting a router between your physical PC and your connection to perform NAT? Then you could use the bridged connection in Hyper-V.

Tanner Faulkner

Posted 2013-05-24T21:01:25.550

Reputation: 11 948

I thought about router, but don't want additional costs. And I can't change the ip, because on the server admin has a mac filtering+dhcp – lkurylo – 2013-05-24T21:15:36.483

You could try Virtual Box instead, or troubleshoot the connection sharing problem instead (Trying to figure out what's causing that myself. All tutorials seem to use a wireless connection.) – Tanner Faulkner – 2013-05-24T21:35:42.867

0

This is how I did it...

  1. Remove all wifi hosted networks (netsh wlan stop hostednetwork)
  2. Start Hyper-V Manager
  3. Delete all virtual switches
  4. Create a new virtual switch set to "Internal Network"
  5. Open Network Connections and select properties for your internet connection.
  6. Share your internet connection with the virtual switch created in Step 4.
  7. The virtual switch should now have a static IP of 192.168.137.1
  8. Set the properties of your virtual machine to use the switch in Step 4.
  9. Start your virtual machine. The network adapter should have an IP of 192.168.137.XXX

If it still doesn't work, you may need to restart the ICS service of the main PC.

Let me know if you figure out how to share internet with Hyper-V and WiFi hosted network at the same time!

Damien

Posted 2013-05-24T21:01:25.550

Reputation: 133