Windows Phone 8 emulator error - Something happened while creating a switch
Asked Answered
G

12

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.

Gelman answered 31/10, 2012 at 0:20 Comment(3)
What was it that you had to remove?Byelection
Wow, VPN software that installs on Win8? Cisco? Other?Byelection
@Warren: Many VPN's install on Win8. Alas Juniper's Pulse VPN client also causes Xde to fail to configure correctly. Removing Pulse allowed Xde to work as expected.Emanation
R
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.

Ricotta answered 31/10, 2012 at 1:0 Comment(4)
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."Gelman
What else did you have to do? Share the knowledge, please, igrali.Byelection
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? igrali.com/2012/10/31/…Weil
I confirm that VPN softwares (in my case from Juniper) cause this issuePentagram
R
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.

Rogozen answered 2/11, 2012 at 22:9 Comment(5)
Worked like a charm - @igrali should mark this as the answer!Carlina
+1 Also note you have to name the virtual switch exactly as stated, otherwise it won't work.Methodology
Confirmed. Worked on my MacBook Pro running Windows 8 in Parallels 8, with the Cisco VPN client still installed. Thanks!Enunciate
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.Yemane
This should definitely be the accepted answer. Worked like a charm for me.Terrie
R
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.

Ricotta answered 31/10, 2012 at 1:0 Comment(4)
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."Gelman
What else did you have to do? Share the knowledge, please, igrali.Byelection
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? igrali.com/2012/10/31/…Weil
I confirm that VPN softwares (in my case from Juniper) cause this issuePentagram
R
18

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

Renin answered 31/10, 2012 at 0:44 Comment(5)
+1. Me too. Virtualbox 4.20 and Windows Phone 8 SDK emulator are not compatible.Byelection
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?Discretionary
+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.Poilu
+1: just uninstalling VirtualBox solved the issue for me too.Hydromedusa
+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.Marivaux
N
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.

Nat answered 18/1, 2013 at 16:0 Comment(2)
This did the trick for me. Even with Cisco VPN Client installed. Thanks heaps!Beatup
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)Tyburn
S
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.

Schou answered 4/11, 2012 at 2:44 Comment(0)
B
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.
Beadruby answered 1/2, 2014 at 20:8 Comment(0)
T
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.

Tbar answered 1/11, 2012 at 7:49 Comment(3)
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? :(Burgwell
@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.Tbar
I uninstalled it and it works as expected - and used shrew.net instead which seems to have worked greatBurgwell
T
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

Tuneless answered 23/4, 2013 at 11:56 Comment(0)
G
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.

Gujranwala answered 8/4, 2013 at 16:48 Comment(0)
Y
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.

Yemane answered 25/5, 2013 at 19:50 Comment(0)
C
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

Colum answered 23/8, 2013 at 20:11 Comment(0)
S
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.

Socioeconomic answered 9/8, 2016 at 21:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.