问题
I had a Win 8.1 hosted OS, running VS2013, and could test my WinPhone app in the emulator fine. The host OS is Win7 Pro.
I reinstalled the hosted OS to Win10, and VS2015, and now I get the Hypervisor not enabled
error when I try to test my app with the emulator:
I've tried disabling and re-enabling HyperV (in the hosted OS) as per:
Unable to start the Windows Phone Emulator
But to no avail.
I've also tried opening the BIOS setup (PhoenixBIOS) of the hosted machine, but there are no options that I can see that would help.
What else can I try to get it working?
(And why oh why didn't I back up the VM first?!)
回答1:
Into the Workstation run Powershell in elevated mode(Run as Administrator) and run
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All
Stop Workstation and go to settings/processors/Virtualization engine and set:
- Preferred mode: Automatic
- Disable acceleration for binary translation: unchecked
- Virtualize Intel VT-x/EPT or AMD-V/RVI: checked
- Virtualize CPU performance counters: checked
Start Workstation and Run lusrmgr.msc
and check also your account is in the Hyper-V Administratiors group
Check in the services that the HV Host Service and Hyper-V Virtual Machine Management are up and running.
If Error 31: A device attached to the system is not functioning
follow the steps from here.
The fix is:
- Shut down Workstation.
- Open the registry (Start > Run > regedit).
- Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\hcmon.
- Create a new key called Parameters.
- In Parameters, create a new DWORD value entry named DisableDriverCheck, and then set the value to 1.
- Reboot
Appears this issue is for Windows 7 host. The fix worked on the few I tried.
If Error 31 is still appearing run in the Workstation command prompt in elevated mode(Run as Administrator) and type
bcdedit /set "{current}" hypervisorlaunchtype auto
and then restart the Workstation.
Check again in the services that the HV Host Service and Hyper-V Virtual Machine Management are up and running.
Go to Network and Sharing Center/Change adapter settings and disable and re-enable all adapters with name: vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)
And now you should run the emulator... ;)
回答2:
Try to open .vmx of your VM and add:
hypervisor.cpuid.v0 = “FALSE”
Select
Virtualize Intel VT-x/EPT or AMD-V/RV1
on your VM settings.
来源:https://stackoverflow.com/questions/35716492/running-winphone-emulator-inside-win10-vmware