适用于 Android 的 Visual Studio 模拟器 - 运行模拟设备需要内部虚拟网络交换机 [英] Visual Studio Emulator for Android - An internal virtual network switch is required for emulated devices to run

查看:27
本文介绍了适用于 Android 的 Visual Studio 模拟器 - 运行模拟设备需要内部虚拟网络交换机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题

我想使用 Visual Studio Emulator for Android 但每当我尝试启动它时都会失败.

日志的最后一部分是:

27.9.2015.11:10:38:[信息] ===== 会话开始 =====27.9.2015.11:10:38:[信息] Microsoft Windows NT 6.3.9600.0 Windows 8.1 Pro with Media Center27.9.2015.11:10:38:[信息] 虚拟化类型:UnknownOrNotVirtual27.9.2015.11:10:38:[信息] 虚拟化版本:阿拉斯加 - 107200927.9.2015.11:10:38:[信息] 虚拟化序列号:由 o.e.m. 填写27.9.2015.11:10:38:[信息] 虚拟化产品:z97-d3h-cf27.9.2015.11:10:38:[信息] 显示适配器 0:名称:NVIDIA GeForce GTX 960,版本:10.18.13.536227.9.2015.11:10:38:[信息] 显示适配器 1:名称:Intel(R) HD Graphics 4600,版本:10.18.14.417027.9.2015.11:10:39:[信息] 重新初始化已安装的配置文件.27.9.2015.11:10:39:[信息] 已安装的配置文件已初始化.设备:3 平台:227.9.2015.11:10:39:[信息] 重新初始化可安装的配置文件.27.9.2015.11:10:39:[信息] 可安装配置文件已初始化.设备:30 平台:427.9.2015.11:10:41:[信息] 等待启动设备...27.9.2015.11:10:41:[信息] 启动设备:10.1" Lollipop (5.1.1) XHDPI 平板电脑27.9.2015.11:10:41:[信息] 验证模拟器参数...27.9.2015.11:10:41:[信息] 确定模拟器是否已经在运行...27.9.2015.11:10:41:[信息] 正在准备虚拟机...27.9.2015.11:10:47:[重要] 模拟设备需要内部虚拟网络交换机才能运行.27.9.2015.11:10:47:[关键] XDE 路径:C:Program Files (x86)Microsoft XDE10.0.10240.0xde.exe27.9.2015.11:10:47:[关键] XDE 参数:/sku Android/displayName "VS Emulator 10.1" Lollipop (5.1.1) XHDPI Tablet"/memSize 2048/diagonalSize 10.1/video "2560x1600"/vhd "C:UsersMiroAppDataLocalMicrosoftVisualStudioEmulatorAndroidContainersLocalDevicesvhd10.1_Lollipop_(5.1.1)_XHDPI_Tabletimage.vhd"/name "VS Emulator 10.1-inch Lollipop (5.1.1) XHDPI Tablet.miro"/noStart/silent27.9.2015.11:10:47:[关键] XDE 退出代码:CoulntCreateInternalSwitch (16)

到目前为止我已经尝试过......

  1. 完成了

编辑#2

我厌倦了@John Kemnetz 建议的方法.模拟器环境启动.

选择后,会显示此异常.

编辑 #3 :: 解决方案 ☺ ::

我在稍后的回答中进行了@John Kemnetz 建议的第二次尝试.这些是所有步骤:

  1. 打开设备管理器并从网络适配器
  2. 中删除了一个且只有一个Intel(R) Ethernet Connection I217-V
  3. 然后我根本找不到网络适配器,它消失了,所以我无法重新安装网络驱动程序
  4. 在我重新启动机器后,Intel(R) Ethernet Connection I217-V 不仅自动安装在 网络适配器 中,而且 Microsoft Hyper-V 网络交换机已安装默认微型端口.我第一次看到的东西.
  5. 然后我尝试了与 Edit #2 中相同的控制台条目.控制台没有像 Edit #2 那样启动.相反,我得到了这个.好吧,至少没有错误!
  6. 所以我跑到 VS2015,从模板创建 Cordova 应用程序并尝试运行模拟器.在我授予所有请求的用户权限后,它成功启动!
  7. 然后我在网络适配器下看到两个在进程中自动创建的新条目.

解决方案

看起来像是 Hyper-V 的问题.您可能想尝试以下操作(按顺序):*

  1. 打开 Hyper-V 管理器,通过虚拟交换机管理器删除所有虚拟交换机,删除所有虚拟机,然后重新启动.现在,尝试重新启动模拟器.
  2. 如果这也失败了,请尝试升级将您连接到互联网的适配器的驱动程序(我猜这是一个 WiFi 适配器?).转至控制面板 > 设备管理器,然后在网络适配器"下找到您的 WiFi/互联网适配器,右键单击并卸载.完成后,右键单击网络适配器并扫描硬件更改.这将重新安装您的适配器.重新启动,然后再次尝试启动模拟器.
  3. 如果仍然失败,最后的做法是在 Windows 上运行修复".如果 Hyper-V 和您的网络适配器之间确实存在问题,这可能会解决问题

*注意 #2 是适用于 kr85 的解决方案

Problem

I want to use Visual Studio Emulator for Android but whenever I try to start it it fails.

The final part of the Log is:

27.9.2015. 11:10:38: [Informational] ===== Session Started =====
27.9.2015. 11:10:38: [Informational] Microsoft Windows NT 6.3.9600.0 Windows 8.1 Pro with Media Center
27.9.2015. 11:10:38: [Informational] Virtualization type: UnknownOrNotVirtual
27.9.2015. 11:10:38: [Informational] Virtualization Version: alaska - 1072009
27.9.2015. 11:10:38: [Informational] Virtualization Serial Number: to be filled by o.e.m.
27.9.2015. 11:10:38: [Informational] Virtualization Product: z97-d3h-cf
27.9.2015. 11:10:38: [Informational] Display Adapter 0: Name: NVIDIA GeForce GTX 960, Version: 10.18.13.5362
27.9.2015. 11:10:38: [Informational] Display Adapter 1: Name: Intel(R) HD Graphics 4600, Version: 10.18.14.4170
27.9.2015. 11:10:39: [Informational] Reinitializing installed profiles.
27.9.2015. 11:10:39: [Informational] Installed profiles initialized. Devices: 3 Platforms: 2
27.9.2015. 11:10:39: [Informational] Reinitializing installable profiles.
27.9.2015. 11:10:39: [Informational] Installable profiles initialized. Devices:     30 Platforms: 4
27.9.2015. 11:10:41: [Informational] Waiting to launch device...
27.9.2015. 11:10:41: [Informational] Launching Device: 10.1" Lollipop (5.1.1) XHDPI Tablet
27.9.2015. 11:10:41: [Informational] Validating emulator arguments...
27.9.2015. 11:10:41: [Informational] Determining if emulator is already running...
27.9.2015. 11:10:41: [Informational] Preparing virtual machine...
27.9.2015. 11:10:47: [Critical] An internal virtual network switch is required for emulated devices to run.
27.9.2015. 11:10:47: [Critical] XDE Path: C:Program Files (x86)Microsoft XDE10.0.10240.0xde.exe
27.9.2015. 11:10:47: [Critical] XDE Arguments: /sku Android /displayName "VS Emulator 10.1" Lollipop (5.1.1) XHDPI Tablet" /memSize 2048 /diagonalSize 10.1 /video "2560x1600" /vhd "C:UsersMiroAppDataLocalMicrosoftVisualStudioEmulatorAndroidContainersLocalDevicesvhd10.1_Lollipop_(5.1.1)_XHDPI_Tabletimage.vhd" /name "VS Emulator 10.1-inch Lollipop (5.1.1) XHDPI Tablet.miro" /noStart /silent
27.9.2015. 11:10:47: [Critical] XDE Exit Code: CouldntCreateInternalSwitch (16)

So far I've tried...

  1. Done all steps from How to enable Hyper-V for the emulator for Windows Phone 8
    • VMX and EPT are enabled - checked with coreinfo.exe
    • SLAT is enabled - checked with CheckSLATStatusOfMachine.exe
    • Disabled Intel VT-d
    • Enabled Hyper-V in Windows features
  2. After all the relevant changes I've unpluged PC from power supply and tried again
  3. Repaired Visual Studio Emulator for Android and run XdeCleanup.exe
  4. Disabled Kaspersky Internet Security (I've read that sometimes security software interfere)
  5. Checked if I'm member of the Hyper-V Administrators group
  6. Successfully created and started new VM directly in Hyper-V Manager (This was just to check could I run any VM)

System info

  • CPU: Intel i7-4790K
  • OS: Windows 8.1 Pro with Media Center
  • Hyper-V Manager: v6.3.9600.16384

Comment

I've spent a lot of time to figure out the solution and I've failed. What am I missing?

I saw that for Windows phone sometimes they set their own virtual switch in Hyper-V Manager. Is that something I should also do, and how should it be done?

Edit #1

In the meantime:

  1. I manually added private and internal switch networks (named "Windows Phone Emulator Private Switch" and "Windows Phone Emulator Internal Switch", if naming matters). Restarted afterwards, tried again. Didn't work.
  2. I've noticed that XdeCleanup.exe deletes manually created internal private switch.

Edit #2

I've tired method suggested by @John Kemnetz.The emulator environment starts.

After selecting Yes this exception is shown.

Edit #3 :: Solution ☺ ::

I've came to the second attempt suggested by @John Kemnetz in later answer. These are all the steps:

  1. Opened Device Manager and deleted one and only Intel(R) Ethernet Connection I217-V from Network adapters
  2. Then I couldn't find Network adapters at all, it disappeared so I couldn't reinstall network driver
  3. After I had rebooted machine not only Intel(R) Ethernet Connection I217-V was installed automatically in Network adapters but also Microsoft Hyper-V Network Switch Default Miniport was installed. Something that I saw for the first time.
  4. Then I tried the same console entry as in Edit #2. The console didn't started as in Edit #2. Instead I got this. Well at least there was no error!
  5. So I ran strait to VS2015, created Cordova app from template and tried to run emulator. After I gave all the requested user privileges it successfully started!
  6. Then I saw under Network adapters two new entries that were created automatically in process.

解决方案

Looks like a problem with Hyper-V. You may want to try the following (in order):*

  1. Open Hyper-V Manager, delete all virtual switches via the Virtual Switch Manager, delete all VMs, and reboot. Now, try to restart the emulator.
  2. If that also fails, attempt to upgrade your drivers for the adapter connecting you to the internet (I'm guessing it's a WiFi adapter?). Go to Control Panel > Device Manager and under "Network Adapters" find your WiFi/internet adapter, right click, and uninstall. When done, right click on Network adapters and scan for hardware changes. This will reinstall your adapter. Reboot, then try to start the emulator again.
  3. If that still fails, the last course of action is to run a "repair" on Windows. If there truly is a problem between Hyper-V and your network adapters, this may resolve the issue

*note that #2 was the solution that worked for kr85

这篇关于适用于 Android 的 Visual Studio 模拟器 - 运行模拟设备需要内部虚拟网络交换机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆