Windows Phone Emulator loses connection - windows

I am running Windows 10 Education from a Macbook Pro, 2,7 GHz Intel Core i5, 8GB ram running OS X 10.11 using Parallels Desktop 11.
I have spend the last two days trying to get Visual Studio 2015 to run the Windows phone emulators properly (More precisely: Mobile Emulator 10.0.10240.0 WVGA 4 inch 512MB). Managed to solve most, but now stuck with the emulator being very unreliable mainly giving me the following errors:
The connection to 169.254.17.107:8117 has been lost. Debugging will be aborted.
or
The emulator couldn't determine the host IP address, which is used to communicate with the guest virtual machine.
Some functionality may be disabled.
I can't find a pattern because sometimes it happens while the application is deploying - sometimes after it has loaded perfectly and I was able to use the emulator. Every now and then, after getting an error, I simply run the application again right away and it will work ok, until next time i need to run it.
The virtual switch in Hyper-V is set to Interal and I have also tried External and Private.
I have tried setting the MAC type to static for the network adapter under settings in Hyper-V.
Tried deleting the emulators and all virtual switches.
Tried disabling and enabling the virtual switch in Network Sharing.
Some of the guides and posts elsewhere about similar problems are a bit outdated (Running Windows 8 and Parallels 8 ect.) Can anyone help me make the emulators work every time with my setup?

Related

Running metal-enabled app on macos virtual machine

Is there any virtualization solution that supports metal api?
We have an app that uses Metal internally, and we'd like to test it across different macOS versions. Unfortunately it seems that VirtualBox, Parallels Desktop & VMWare Fusion doesn't enable Metal API in their guest macOS.
How can we test the app without having multiple physical machines or without using dual-boot?
UPDATED ANSWER 2019
Parallels Desktop v. 15 finally uses Metal. See their blogpost.
ORIGINAL ANSWER:
As far as I researched there's no chance of doing so with virtual machines.
The only feasible work-around we found is to:
find/purchase hi-speed USB drive (or even external SSD)
install various macOS versions on partitions of the USB drive
boot your Mac from the pendrive and select the OS you want to test
Not ideal, but does the job.

Windows Phone SDK Paradox: "Xde couldn't find an IPv4 address.." and "The emulator couldn't determine the host's IP address..."

A few useful pieces of information: I'm running Windows 8 Professional on a custom-built rig, and I am using a 'WiFi dongle' to connect my computer to the local router. I am using a home network, not a public/work/school network.
I installed the Windows Phone SDK. Piece of strawberry cheesecake so far. Coded my first simple browser app (as detailed on the Windows Phone Dev site) and hit the Run button, expecting my app to come to life and breathe in links and breathe out websites!
But instead, I got this:
Something happened while creating a switch:
Xde couldn't find an IPv4 address for the host machine.
In this case, the emulator wouldn't run at all. And so, I did my research and found out that the solution was this:
Remove all the switches from Hyper-V Manager's "Virtual Switch Manager", and make a new Internal one called Windows Phone Emulator Internal Switch.
I did, and the error did NOT show up again but it did screw up my WiFi and Bluetooth adapters (which I had to do a system restore to solve) and now both WiFi and Bluetooth peripherals are working again.
However, I got this error instead when running the emulator again:
The Windows Phone Emulator wasn't able to connect to the Windows
Phone operating system:
The emulator couldn't determine the host IP address, which is used to
communicate with the guest virtual machine.
Some functionality may be disabled.
In this case, the emulator did run, but I couldn't find my app anywhere. I did some research again and found that the solution to this was:
Delete the Windows Phone Emulator Internal Switch from Hyper-V Manager's Virtual Switch Manager.
Now, I created the switch to solve the problem in the first place. But I did delete it, for the heck of trying everything out. And no surprise there but, it went back to the first error.
I am now stuck in this paradox and have no idea how to escape it.
Thank you in advance!
follow the following steps to solve this problem
1.go to network and sharing center
2.go to change adapter setting
3.go to v Ethernet (internal Ethernet port windows phone emulator internal switch)
4.right click it and enable it(if already enabled then disable and enable it again).
Remove any Cisco VPN's or similar connections. I have found this VPN client works as a replacement to Cisco https://www.shrew.net/
For me shrew soft version 2.1.7 was the only version that worked.

Unable to create the virtual machine

I was so happy today that I have been finally able to install Windows Phone 8 SDK and try it a bit. I installed fresh new installation of Windows 8 Pro into my virtual machine (I am running if from Parallels) and then installed Windows Phone 8 SDK.
Everything went smooth, Visual Studio Express is installed and running, but when I created new project and tried to deploy it, VS fails with really weird message.
First of all, message box informing that "The Windows Phone Emulator wasn't able to create the virtual machine: Generic failure" appears. Really informing, really professional - generic error, that's really good. Then the information that deployment failed appears (thanks a lot for keeping me informed about that, I didn't noticed that it crashed completely). And then in the Error List, there is an information about "Invalid pointer" - even better. No clue at all about what failed or what's wrong.
Can anybody help me with that? There is nothing on the internet about this topic so far and I don't know where the problem is. I scanned the Windows events and logs, but there is nothing (probably I haven't been searching properly, so please guide me through that if you can).
Anybody can help?
The Windows Phone 8 emulator requires hardware Hyper-V support. In particular, it requires second-level address translation, hardware assisted virtualization, and hardware DEP support enabled and to not be ran in a hypervisor(no nesting). If you bought your machine within the past 4 years you should have no problem with these requirements. You can check out this article to see more information about that and how to find if your PC supports it.
Because of these hardware requirements, this means you can't run the phone emulator inside of most virtualization technologies... With one exception: I've been using VMWare 9 which appears to include an "unsupported" feature to allow Hyper-V to work though.. So your only choice for running the phone emulator is to either buy VMWare 9 (or 8 with more configuration) or upgrade a physical machine to Windows 8
The unsupported way VMWare allows you to run Hyper-V inside of a VM is that there is a manual option (hypervisor.cpuid.v0 = “FALSE”) which basically tells VMWare not to report to the virtual machine that it's running in a VM. Hyper-V checks if it's running in a VM and won't work if it is, so this gets Hyper-V to work past that check. I personally have tested this whole nested-VM thing with the Phone emulator(including before public release), and other than being quite slow, it does work pretty well with no immediate crashes or anything.
There is a workaround for VMWare Workstation 8 as well in an answer below. However, 9 is much easier to configure, so if you have it use this method.
I ran into the same issue and I fixed it by enabling Hypervisor applications in this virtual machine and adding the following line to the .vmx file:
hypervisor.cpuid.v0 = "FALSE"
This got the emulator working just fine. I found this answer here.
Hope this helps.
Actually, it works quite nicely with VMware Fusion 5.0.1
All I had to do is to add to the .vmx file of the virtual machine the following lines:
hypervisor.cpuid.v0 = “FALSE”
vhv.enable = "true"
Save and restart VMWARE (obviously the VM must be stopped before the changes are made)
I'm right now debugging a test app from VS2012 using the emaulator inside a VM in my Macbook
I'm a happy camper
:-)
I posted the same question on Parallels forum.
Reply:
The emulator is actually a virtual machine, so we are talking about a vm inside a vm, this requires support for nested Hyper-V, which afaik is planned but not implemented yet, also VMWare Fusion already supports this, if you are so desperate.
————-
See Parallels forum post: http://forum.parallels.com/showthread.php?p=646448#post646448
This works for me
Set RAM to 4g
Set at least 2 cores
add to vmx file.
vhv.enable = "TRUE"
hypervisor.cpuid.v0="FALSE"
Goot article
http://social.msdn.microsoft.com/Forums/en-US/wptools/thread/ed72010c-321c-4667-97b2-3ff1540e7f87/
You need SLAT compatible hardware to run Hyper-V, which is a requirement for using the emulator.
Can you clarify what kind of hardware you're attempting to run this on, and if you have enabled Virtualization in your BIOS settings?
The "Invalid pointer" error just means it cannot connect to the emulator (and/or device).
Just as an addition to https://stackoverflow.com/a/13163762/1964969 (top answer at the moment):
manually appending "hypervisor.cpuid.v0" key works for VmWare Player 5 as well (the main reason - this software is free for non-commercial use so it's perfect product if you test the waters, just download from VmWare website and install, it's fully-functional).
Slightly unexpected, any of the following amends solve the problem with WP8 emulator:
hypervisor.cpuid.v0="FALSE"
hypervisor.cpuid.v0="TRUE"
hypervisor.cpuid.v0=""
Yeah, you can apply empty value for that key - but why? Have no idea but it works. I did some notes in my blog as well:
http://windowsasusual.blogspot.ru/2013/01/how-to-launch-windows-phone-8-emulator.html
Under Parallels Desktop 8 follow this guide: http://kb.parallels.com/en/115211
Edit:
Oh, I didn't noticed that you are trying to run emulator on VM. My answer is for non-VM environment.
First of all, you need to check hardware requirement at here
Be careful, successful installation of SDK does not guarantee "your hardware is compatible"
If your hardware is compatible and Hyper-V is running(described in the link above), please check your BIOS and be sure to enable hardware virtualization in CPU Configuration
(for me, I could find it at Booting > BIOS > Advanced > Advanced > CPU Configuration)
Brief summary:
64bit CPU and OS
4GB RAM
Hardware-assisted virtualization supported CPU
Second Level Address Translation (SLAT) supported hardware
Hardware-based Data Execution Prevention (DEP) supported hardware
Proper BIOS settings
For me the solution adding line:
hypervisor.cpuid.v0 = "FALSE"
I use VMware Player and added the line (hypervisor.cpuid.v0 = "FALSE")in the .vmx file.
My virtual machine with Windows 8 Pro runs the emulator for Windows Phone 8 perfectly.
Solved the problem by uninstalling an older VPN client from the machine. It turns out some VPN clients might have compatibility issues with Windows 8. After uninstalling VPN client I was able to run the emulator without issues (of course after making sure Hyper-V was installed and enabled on the machine)
Not enough rep. to comment on the accepted answer, but Microsoft provide instructions specifically for Fusion here. It worked for me, after a couple of reboots of both Mac and VM. I installed W8.1 without Hyper-V support initially and had to install it after the fact ("Turn Windows Features On or Off" in Control Panel), but apart from that no problems. Quite speedy on a 16Gb 2013 MBP.

True-Time debugger / hiwave.exe: run multiple instances?

I have a couple Freescale 68HCS08 MCUs connected in an I2C network, running different programs. When I click "debug," Codewarrior checks for a running instance of hiwave.exe to load and debug the program. I'd like to debug both simultaneously, which means having two instances running.
What is the best way to do this? Do I need two PC's? Is it better to try and manually reload the MCU's, using the Build command instead of Debug in Codewarrior?
I can run two instances of hiwave.exe manually, and then use the "File"->"Load Application" menu item to select the .abs file. It seems to run both instances fine, including code display and breakpoints, although I'm using full-chip simulation rather than a hardware debugger at the moment. I would guess that's where most of the fun is, in making sure that each instance uses the correct debugger, especially if you're using two of the same USB devices.
"That's too easy", I can hear you saying. Fine, take option 2:
I do all my CodeWarrior / Hiwave stuff in "Windows XP Mode", a Virtual PC running under Windows 7, mostly because CodeWarrior's installer doesn't run on 64-bit architectures (or it didn't a few months ago, for which I yelled at them in their forums).
I'm not entirely sure of the licensing technicalities (if you have Windows 7 pro, you should get at least one free license to use the Windows XP mode), but perhaps you could do something similar - e.g. run a Virtual PC environment with one of your debuggers passed through to the virtual system (Windows Virtual PC and other virtualization environments let you pass USB devices through), and have your other debugger still attached to the 'host' system. You could then have CodeWarrior/Hiwave installed on both the virtual and host systems, with one controlling system A and the other controlling system B. USB fun-time still applies, as you'd have to make sure the 'correct' USB debugger was passed through to the virtual system.
The debugger, HIWAVE.EXE will not work in either Windows XP mode, nor VMs such as VMWARE WORKSTATION, nor any of the VMs available in Linux. This is to do with the way the driver for the USB MULTILINK has been architecured.
Making Codewarrior v6.x work in Windows 7 is easy, by patching the installer.
We were not able to get the debugging pod to work to debug live hardware, because of the fact that the USB driver is implemented with Jungo Windriver, and, as per other articles, neither of the virtual machines can push that across into the virtual environment.
I have wasted months trying to solve this, in the end we resurrected old XP licenses and installed XP. However safe to say that, this, combined with Freescale's lack of vision to allow people running Linux to develop for the silicon, forced me into a decision that I will no longer use their products.
However, running multiple instances of the debugger is possible. The maximum seems to be around 20

VMware Fusion 3.1 - Slow Windows Phone Emulator

I'm working on a new Windows Phone 7 project. Unfortunately, I have only access to a VMware Fusion instance of Windows, from where I run Visual Studio and the Phone Emulator.
My problem is that the phone emulator takes ages (well, seconds) just to show up for example the keyboard for user input (when selecting a TextBox).
I've read here that the problem comes from running a VM inside a VM.
My question is, if there is a trick which helps me to accelerate this somehow?
Thank you very much.
Cheers
EDIT:
Host machine: C2D 2.53Ghz, 4GB DDR3 RAM, SF-1200 SSD
I hate to say it, but the best solution is probably "don't run the emulator on a virtual machine". The emulator is only officially supported on a real physical machine.
Other than that, you will need to max out the resources available to the VM.
You're lucky you haven't ripped a hole in the fabric of spacetime by running an emulator on an emulator :)
See also: Windows Phone 7 emulator on a VM?, or Windows Mobile 7 Emulator Kills VMware

Resources