59

I have a similar problem like mentioned in this question:

Unable to create the virtual machine

But, my problem is a bit different in the error description:

enter image description here

The Windows Phone Emulator wasn't able to create the virtual machine: Something happened while creating a switch: Xde couldn't find an IPv4 address for the host machine.

I have SLAT compatible hardware, virtualization is enabled in BIOS, my Windows 8 installation is 64bit and it's not virtualized. Hyper-V is installed (tried reinstalling it, but it didn't help). EDIT: VirtualBox or any other virtualization software (except for Hyper-V) is not installed

EDIT2: Seem to have been some other networking software which was installed. Having to remove it sucks big time because I need it professionally. I hope they fix it.

EDIT3: I wrote about it in more details with all I could find on my blog.

Community
  • 1
  • 1
Igor Ralic
  • 14,835
  • 4
  • 40
  • 50

12 Answers12

61

It's already answered, but something easier worked for me (and without uninstalling VirtualBox):

"Go into Hyper V. Go into the Virtual Switch Manager. Create a virtual switch called 'Windows Phone Emulator Internal Switch'. Make it's connection type Internal. Now launch the emulator. It should work."

I had to reboot the machine before running the emulator, but now everything's working fine: VS2012, Xde and VirtualBox.

Credits go to TheGeekNextDoor.

Anderson Pimentel
  • 4,422
  • 2
  • 27
  • 48
  • 1
    Worked like a charm - @igrali should mark this as the answer! – Scott Ivey Dec 30 '12 at 17:29
  • 2
    +1 Also note you *have to* name the virtual switch exactly as stated, otherwise it won't work. – Efran Cobisi May 09 '13 at 09:44
  • Confirmed. Worked on my MacBook Pro running Windows 8 in Parallels 8, with the Cisco VPN client still installed. Thanks! – Joshua Smith May 15 '13 at 23:16
  • This definitely worked for me. I was even able to get VirtualBox working, along with OpenVPN just to further complicate things. The only thing I couldn't get working was for the phone emulator to work over the VPN connection. I fidgeted a lot, and I think that choosing the "repair" option on the Windows Phone 8.0 SDK finally connected everything just right. I also had to reboot my virtual machine several times. – VeeTheSecond Jun 10 '13 at 15:19
  • This should definitely be the accepted answer. Worked like a charm for me. – devnull69 Jul 01 '13 at 20:09
21

Open the Hyper-V Manager from the start menu, and open the Virtual Switch Manager. Remove any existing switches, and try make a new virtual switch with a connection type set to internal.

You might need to run XdeCleanup.exe afterwards.

Jonathan
  • 29,612
  • 37
  • 126
  • 201
Claus Jørgensen
  • 25,167
  • 9
  • 75
  • 139
  • I did as you suggested and then ran XdeCleanup.exe. It threw the same error: "Failed To Cleanup XDE internal switch. Something happened while creating a switch: Xde couldn't find an IPv4 address for the host machine." – Igor Ralic Oct 31 '12 at 01:10
  • What else did you have to do? Share the knowledge, please, igrali. – Warren P Oct 31 '12 at 20:14
  • 1
    It seems he posted more on his blog. He must have removed some other app like VPN software to correct it. I'm betting that's my problem too but what if I can't remove the VPN software? http://igrali.com/2012/10/31/windows-phone-8-emulator-wasnt-able-to-create-the-virtual-machine/ – Steven Hook Nov 01 '12 at 21:09
  • I confirm that VPN softwares (in my case from Juniper) cause this issue – Kedare Dec 10 '12 at 18:07
18

Had the same error message. After removing VirtualBox, everything works fine

  • +1. Me too. Virtualbox 4.20 and Windows Phone 8 SDK emulator are not compatible. – Warren P Oct 31 '12 at 20:19
  • Yip. Had to do the same. Does anyone know how to get the Windows Phone 8 emulator and Oracle Virtualbox to coexist harmoniously on the same machine? – GrantVS Dec 24 '12 at 06:01
  • 1
    +1: Only after uninstalling VirtualBox the emulator has started. Other ideas (such as dealing with Virtual Switch Manager and disabling features on network interfaces) did not work for me. – amartynov Feb 07 '13 at 11:51
  • +1: just uninstalling VirtualBox solved the issue for me too. – Korki Korkig Apr 02 '13 at 14:32
  • +1: Had VirtualBox 4.2.10 installed. Uninstalling it solved the problem (after having tried cleaning the virtual switches, en/disabling adapters, rebooting). Didn't even have to reboot. – Heinrich Ulbricht Oct 04 '13 at 18:08
7

For what it's worth, my problems have seem to go away after I turned off "Deterministic Network Enhancer" on all the vEthernet adapters like this:

network adapter settings

I got inspired to try this following the documentation online from Microsoft here. See the section titled "To reconfigure the Hyper-V virtual adapter used by the emulator".

Hope this one sticks. This has been a tiring process trying to keep up with what works and not with this "new and enhanced" emulator.

Eric Liprandi
  • 4,149
  • 2
  • 36
  • 52
  • This did the trick for me. Even with Cisco VPN Client installed. Thanks heaps! – H77 Apr 04 '13 at 11:43
  • This worked for me to (I was having the issue with the Android emulators that come with VS2015). In my case, I had VMWare installed, and one of the VM Ware checkboxes was checked) – Gyum Fox Aug 05 '15 at 07:22
5

This worked for me. Go to Windows 8 start screen. Scroll right and see HyperV tile.

Go into Hyper V. Go into the Virtual Switch Manager. Create a virtual switch called "Windows Phone Emulator Internal Switch" Make it's connection type Internal.

Now launch the emulator. It should work.

coderpro
  • 91
  • 3
4

Some of the answers here were helpful and by testing the trial-and-error method, I found solution that worked for me. Note: I have Cisco VPN client installed on Windows 8 64-bit. I did not want to remove Cisco client.

  1. Open Hyper-V Manager – Virtual Switch Manager and create virtual switch called “Windows Phone Emulator Internal Switch”. Make it’s connection type “Internal”. You don't have to remove any existing virtual switches.
  2. Open “Network Connections”. Right click “vEthernet Windows Phone Emulator Internal Switch” and select Properties. Deselect “Deterministic Network Enchancer” and click Ok. You could do that with other vEthernet interfaces as well.
  3. Run Emulator and it should work.
dotokija
  • 41
  • 1
3

It seems that Xde is currently not compatible with Cisco VPN Client v5.x; with the VPN client installed, you indeed get this error. Uninstalling Cisco VPN Client resolves this.

Marc Gravell
  • 927,783
  • 236
  • 2,422
  • 2,784
  • any idea if there are any workarounds that leave cisco vpn installed, or if either the emulator / cisco VPN will be updated to prevent this from happening? :( – Henry C Nov 14 '12 at 05:52
  • 1
    @Blakomen I'm afraid I don't know of any currently. Perhaps the best thing to do is, a: check that uninstalling Cisco fixes it (and then reinstall it; who knows - maybe it'll work then!), then b: once confirmed, log it as a bug on "microsoft connect". However, I can take no responsibility if uninstalling/reinstalling cisco VPN client goes horribly wrong and you can't reinstall it, or it makes rabbit ears come out of your case-fan, or anything like that. – Marc Gravell Nov 14 '12 at 07:34
  • I uninstalled it and it works as expected - and used http://www.shrew.net/ instead which seems to have worked great – Henry C Nov 15 '12 at 04:08
3

This what helped me to solve the same issue: http://mobileworld.appamundi.com/blogs/petevickers/archive/2012/11/01/troubleshooting-windows-phone-8-emulator-problems.aspx

And no need to uninstall virtualbox even have it running at the same time

Hope this will help to someone

Felix
  • 810
  • 10
  • 17
1

I have found the solution for this stupid error. I had working on this issue almost 1 month.

I just did 2 things recently and I emulator did create virtual machine in Hyper-V as well as deployed my application into Emulator.

  1. DISABLE ANTI-VIRUS. (I was using Panda Cloud Anti-Virus)
  2. Enable FIREWALL if you did TURN OFF

I hope this would work.

Thanks.

webwizo
  • 11
  • 3
1

I had some issues getting this going. In the end, by randomly disabling and enabling my network adapters, I was able to get the virtual switch working even for an external adapter.

VeeTheSecond
  • 2,946
  • 3
  • 18
  • 16
0

I was able to fix this by removing VMWare Player and Virtual Box, and then performing a Repair install of the Windows Phone 8 SDK (Control Panel-> Uninstall -> Windows Phone 8 SDK -> Change -> Repair

zshift
  • 327
  • 4
  • 10
0

If this problem happens on Windows 10, there's an easy fix... navigate to:

  • Start Menu
  • Settings
  • Network and Internet
  • Status
  • Network Reset

This cleans up all of the virtual network adapters so they can be recreated by the emulator. Once you reboot, delete the emulator and then recreate it and it should create the necessary network adapters in such a way that it will work.

DISCLAIMER: This technique worked for me using Visual Studio Emulator for Android on a Windows 10 machine. I understand it's not Windows 8 and it's not a Windows Phone emulator, but the underlying issue is the same so if anyone lands here and has Windows 10, you may want to try this.

AaronK
  • 308
  • 3
  • 14