Windows Phone 7 emulator on a VM? - virtualization

It seems that the Windows Phone 7 SDK doesn't support running inside a VM. On Parallels, the entire VM simply crashes when the emulator is starting up.
Around the web, though, a few people have reported that they were able to use it by changing a lot of the VM settings.
What do I have to change to be able to run it? I'm specially interested in Parallels, but VMWare or any other simulator that run on OSX if fine for me!

The WinPhone7 (and WinPhone8) emulator is itself a VM and few (if any) general-purpose VM's will host another VM infrastructure, which is why it crashes Parallels etc.
If you want to have the emulator run from within a different VM to the one MS provides, then you're into the realm of extracting images, toggling bits and trying to tack it into your VM of choice. Of course, the chances of the emulator then working as expected with no residual issues is as close to nil as makes no difference ;)
[Update 2013-01-30] VMWare5 & Parallels Desktop 8 now support running Hyper-V guest VM's. This is particularly useful for those wanting to develop against the Windows Phone 8 SDK which runs Windows Phone 8 guest VM's on Hyper-V.
Here's a guide to how to run Visual Studio 2012 & Windows 8 SDK (inc. the Windows Phone 8 Hyper-V-based emulator) in VMWare5 or Parallels desktop 5: Link
Note: Running Windows & Hyper-V inside a VM will be slower than running natively. Dual-booting into Windows (using Boot Camp on OSX) is stil the recommended method of developing for the Windows platform, especially if you want to use Hyper-V guest VM's.

I'm working in VMware Fusion with Expression Blend 4 RC AND the emulator.
works like a charm!

As others have said, WP7 is itself a virtual machine. Even if you can get it to run inside a virtual machine like Parallels, the performance will be abysmal. If your computer supports hardware virtualization, the emulator runs really smooth, without it it's very very sluggish. Running it inside another VM will make it even more sluggish - I am guessing to the point that it's unusable.
I know this is not the answer you want to hear, but I would recommend running Windows in Bootcamp, you will have much better experience developing and emulating.

I'm not so sure about compatibility for long term development, but in last september, I remembering trying the Windows Phone 7.1beta SDK on VirtualBox (I'm using mac SL), a free virtual machine from oracle (previously by Sun) and it works well there.
I just do a regular install of Windows 7 Home Basic (any Win7 except Starter will do, CMIIW) in the VBox with no tweaking at all, install the GuestAddition inside win7 (provided by VBox), then install the SDK. I create new WP project, arrange UI, make some codes as usual, then run it in emulator. Surprisingly, the emulator works fairly well and showing the app I've developed.
I'm not even experience any lag (my macbook is i5, 4GB ram, the VBox setting is dual core, 2GB ram, note that no other heavy mac process is on the run, so I solely run the VBox ... and iTunes for listening musics).
So if you still want to try WP SDK 7.1 on VM, why don't you try VirtualBox? My current VBox is installed with Windows 8 and have no extra space to reinstall the win7+WPSDK. If you do give a try on VBox, please report the result here to inform everyone.

I've run the Android emulator inside a VM before. It was slower, but still usable to test basic apps. Also, the Android emulator was then slow to where you couldn't tell a difference from between native or from within running Eclipse from within a virtual machine running Linux
x86-to-x86 emulation tends to be pretty fast nowadays due to both Intel and AMD CPUs having hardware to help it along. A lot of x86-to-x86 emulation also doesn't do a full emulation (see Android's emulator to see how a full emulator runs in comparison). In the x86-to-x86 case, the faster ones will try to pass as many instructions to the host OS so that a chunk of the code runs natively
People have made claims like 80-95% performance, which is pretty good. If you have a 3.2 GHz CPU, you get knocked down to around a 2.4 GHz equivalent of your CPU. That's not bad at all, and I honestly don't notice that much overhead running in a good x86-to-x86 VM
The biggest reason why the WP emulator has problems with VMs doesn't have to deal with it being a VM-in-a-VM, but it's most likely that it requires DirectX 10. This might have to do with XNA, which is Microsoft's really nifty gaming API that lets you easily port between Windows, WP, and the Xbox 360. A lot of VM programs don't support hardware 3d acceleration
On another note: if you want to use a low-end system, AMD CPUs may fare better since AMD doesn't tend to disable hardware virtualization features in their lower-end CPUs

If you're deploying to a device, you should be able to use a VM, since it's the emulator that has issues being a VM itself.

We have successfully deployed, and performance is acceptable in our environment, virtual Windows 8.1 Pro Desktop under VMware vSphere 5.5 (ESXi 5.5), and have the Windows 8 SDK and Emulator working correctly with no performance issues. (In Education - to University Labs for Windows Phone development).
The issue experienced by most, is you most have the Hypervisor pass through the Intel-VT into the VM, to effecticely create Nested Hypervisors. This is possible using VMware vSphere 5.5.
This option is available in virtual machine version 10, enabled in the vSphere Web Client - Enable Hardware Virtualisation.

Related

Is running a Windows on mac the same or very close to running windows traditionally?

It's been my understanding the OS sits on top of the hardware. Is it more or less the same to run windows from a macbook? When installing SQL on a windows partition, does this install similar to an all Windows setup?
I've heard the kernel is the main connector between hardware and basic OS, so would the mac kernel cause potential differences in operation?
Would installing the linux OS also adhere to these rules?
Thanks, and sorry for the simple question.
Generally, you are correct to say that, installing different operating systems on the same hardware would be the same. You will be able to both install Windows and Linux on the same laptop (whether that would be an Asus brand laptop, or HP, or whatever). Once you install an OS on some hardware, and the OS is able to recognize the hardware, and is able to utilize it, then you are in the clear. What's important is to install on OS that is compatible with the architecture of the computer. So if you get a Linux distro that supports x86 architecture, then you would have to install it on hardware that is with a x86 architecture.
Side note: Modern OS's are very smart and they have a wide range of architecture support (list of Linux architecture support, Windows support for ARM, Apple also has a wide range of architecture support).
Since you are asking about a macbook and Windows, then the short answer is: there won't be a problem for you to install Windows on your mac. Apple even gives you Boot Camp to easily do this (there are also quite a bit of recent tutorials on this topic as well).
So the end experience would be almost the same as having Windows on any other machine.
I've heard the kernel is the main connector between hardware and basic OS, so would the mac kernel cause potential differences in operation?
This is true. The kernel is the heart of any OS, but once you have your Windows running, it would be using its own heart and it won't touch the mac kernel. So if you remove your macOS and install only Windows, then only the Windows kernel would be taking control of the Mac hardware. But if you load your macOS, then the Mac kernel would be running and operating on the hardware.
Will Windows run faster on Mac hardware than macOS on its hardware? It's debatable and I would assume not a lot of studies have been made in that sphere. But, at least, it will run.
But what about dual-booting your macbook with Linux? Technically, it is possible (and the principle is the same), but Apple have made restrictions to their firmware, limiting the option of having both a macOS and a Linux distro at the same time. What's so different here than the case with Windows? Well mainly that the firmware of the macbook (the software embedded in the hardware of the laptop) doesn't allow for Linux to be installed. Maybe things have changed, but these are the (not so recent anymore) news I know about (I guess there are still ways of installing Linux on mac hardware).

Can I develop with VS Code on the new Samsung Chromebook Pro?

Thinking more about leaving my MBP at home and instead taking the new Samsung Chromebook PRO to Starbucks for the day.
Is this fantasy or will VS Code run properly on this new machine? I see options for the Arm chip based PLUS model but nothing for the PRO.
Is a port available and if so how has development been, good?
UPDATE
I guess this is a hard question to answer? Essentially, I just want to leave my heavy MBP that always needs a power outlet at home. Just want to head out with a light weight machine and work on it anywhere.
The PRO does run Linux but I have not verified clearly that VS Code can run in this environment. Being in Canada I have no access to the PRO yet, can only order it from USA at this point, which I might do once I know the verdict to my question.
My team and I have been experimenting heavily with the Samsung Chromebook Pro and have been actively switching our development environments completely over to the Chromebook ecosystem (away from Mac). Personally I run a combination of Atom and NeoVim with a complete development environment for Node.js, Postgres, and Redis on my Chromebook Pro.
For any desktop IDE you'll need to run Crouton which means you'll have to put your Chromebook into developer mode which is less secure. If you don't want to do that your only options are either use something like Caret (which will only do basic text editing) or to use some sort of cloud-based IDE; ones I know of: Cloud9, Codenvy, Shiftedit, and Eclipse Che (an open source one that just recently caught my eye).
The good news is Crouton can run effectively anything that Linux can (especially since the Pro has an x86 processor), and from what I can tell VSCode supports Ubuntu, the default Linux distribution for Crouton. You can even set up the Crouton Extension to put your GUI programs into Chrome tabs or windows within ChromeOS using Xiwi.
Anything with a GUI running in Crouton is going to hurt performance and battery life on Chromebook since ChromeOS is finely tuned for running specifically the Chrome Browser. I don't expect you run out and learn a terminal-based editor today if you haven't already, but I highly recommend at least getting comfortable using the terminal for quick editing, using git, and running simple shell commands. That will save you that sweet Chromebook battery life and a bit of frustration dealing with a somewhat-quirky Xiwi and Crouton Extension.
If you're willing to work out a few kinks the Chromebook Pro development experience is pretty great. It's truly a quality piece of hardware and ChromeOS is fantastic with the addition of the ability to run Android apps.
UPDATE (9/19/17):
There is another option now for at least getting server environments running on ChromeOS without using developer mode. It's called Termux, an Android app, which can bind to a local port and can be interfaced with via SSH. You can read more on the blog post we came across here: https://blog.lessonslearned.org/building-a-more-secure-development-chromebook/ You will, however, have to use a terminal-based text editor like VIM or a native ChromeOS one like Caret, so it will not run GUI editors like VSCode or Atom.
Check out https://coder.com
It's basically VS Code running on a remote server, accessible through a browser.
I've just started playing around with it and looks like a perfect fit for a Chromebook. And it's open source too :)
You can now (with the Linux-beta for chromeOS) quite easily run vscode locally on a chromebook, see this step-by-step guide: https://blogs.sap.com/2018/10/16/set-up-vs-code-on-chrome-os-for-local-application-programming-model-development/

Newbie Hypervisor Questions

If I install a bare-metal hypervisor (say, ESXi), would it allow me to run Windows 7 concurrently with Linux?
Would it allow me to run multiple instances of Windows 7?
When I'm sitting at the PC that's running Win7 and Linux on a hypervisor, which OS do I see when I look at the screen? (I'm suspecting that the only way to access either OS is to do a remote login.)
Assuming the answer to #2 is yes, how do you manage multiple installs of Win7 on the same hard drive?
Thanks in advance!
If you simply want to run Linux and Windows in parallel you may of course do this on e.g. ESXi. Still, the OSes would run with virtualized (or emulated) hardware available to them, i.e. you would not be able to easily access all the hardware directly and the hypervisor itself not only introduces an overhead but this overhead is not deterministic.
If you want to run an RTOS (like Real-Time Linux) or any other RTOS, then you need a "real-time hypervisor".
You can google for such hypervisors - there are a few out there.
(I dont want to recommend one here as we are a vendor of such a solution our selves)
Regards
GFL

How can developers make use of Virtualization?

Where can virtualization techniques be applied by an application developer? How can virtualization be applied on a day-to-day basis?
I would like to understand from veteran developers making use of it. I am interested in the following things:
How it helps in development.
How it could be used for testing purposes.
What are the recommended practices.
The main benefit, in my view, is that in a single machine, you can test an application in:
Different OSs, in case your app is multiplatform
Different configurations, like testing a client in one machine and a server in the other, or trying different parameters
Diffferent performance characteristics, like with minimal CPU and RAM, and with multicore and high amounts of RAM
Additionally, you can provide VM images to distribute applications preconfigured, be it for testing or for running applications in virtualized environments, where it makes sense (for apps which do not demand much power)
Can't say I'm a veteran developer, but I've used virtualization extensively when environments need to be controlled. That goes for:
Development: not only is it really useful to have VMs about for different deployment environments (e.g. browser versions, Windows XP / Vista / 7) but especially for maintenance it's handy to have a VM with the right development tools configured for a particular job.
Testing: this is where VMs really shine: it's great to have different deployment environments that can be set back to a known good configuration and multiple server instances running in parallel to test load balancing.
I've also found it useful to have a standard test image available that I can run locally to verify that a fix works. If it doesn't then I can roll back to the previous snapshot with no problems.
I've been using Virtual PC running Windows XP to test products I'm developing. I have clients who still need XP support while my primary dev environment is Vista (haven't had time to jump to Win7 yet), so having a virtual setup for XP is a big time saver.
Before each client drop, I build and test on my Vista dev machine then fire up VPC with XP, drag the binaries to the XP guest OS (enabled by installing Virtual PC additions on the guest OS) and run my tests there. I use the Undo disk feature of Virtual PC so I can always start with a clean XP image. This process would have been really cumbersome without virtualization.
I can now dump my old PCs at the local PC Recycle with no regrets :)
Some sort of test environment: if you are debugging malware (either writing it or developing a pill against it) it is not clever to use the real OS. The only possible disadvantage is that the viruses can detect that they are being run in the virtualization. :( One of the possibilities to do it is because the VM engines can emulate a finite set of hardware.

Virtual Machine Benchmarks

I am using VMware Server 1.0.7 on Windows XP SP3 at the moment to test software in virtual machines.
I have also tried Microsoft Virtual PC (do not remeber the version, could be 2004 or 2007) and VMware was way faster at the time.
I have heard of Parallels and VirtualBox but I did not have the time to try them out. Anybody has some benchmarks how fast is each of them (or some other)?
I searched for benchmarks on the web, but found nothing useful.
I am looking primarily for free software, but if it is really better than free ones I would pay for it.
Also, if you are using (or know of) a good virtualization software but have no benchmarks for it, please let me know.
From my experience of Parallels and VMware (on the PC and more extensively on the Mac) the difference between any 2 competing versions of the software is usually quite small and often 'reversed' in the next releases.
I never found Parallels to be much faster (or slower) than VMware - it often would be a case of the state of the VM I was running, the host machine itself and the app(s) I was running within the VM. If VMWare brought out a new release which did something faster, you could be sure that Parallels would improve their performance in that area in the next release, too.
In the end I settled on VMWare Fusion and the key reason for this was just that it played nicely with VMware Workstation on the PC. I have trouble taking Parallels VMs from the Mac to the PC and back again, and this worked fine on VMware. Finally, though this is less of a concern, I was unhappy that sometimes it felt as if Parallels would release a version without proper regression testing - you'd get the up-to-date version and find that networking was suddenly unexplicably broken until they released another patch a few days later. I doubt this is still the case but VMware always felt a little more 'in control' and professional to me.
I'd go for a solution that you can get running in a stable fashion on your PC, that is compatible with your other requirements (such as your co-workers' platforms and your overall budget). You can waste your lifetime trying to measure which one is faster at any given task!
One other thing - it's worth checking the documentation that comes with the software, and any forums etc, before making judgements about performance. For instance, in my experience throwing huge amounts of ram at your VM (at the expense of free ram in the host system) does NOT automatically make it faster; better to split the ram up evenly, and certainly keep an eye on any recommended figure. In VMware, that recommended figure is a good guide.
You'll get best performance if your hardware supports hardware virtualization, such as AMD's AMD-V or Intel's VT, and you enable this feature on the computer and in your virtualization software.
For Microsoft solutions, you need at least Virtual PC 2007 or Virtual Server 2005 R2 SP1, or Hyper-V on Windows Server 2008 (I don't expect you'll rebuild your system just to run Hyper-V, but I thought I'd mention it).
Subjectively I haven't noticed any difference between Virtual PC and VMware Workstation performance; I'm using VMware now as it supports USB virtualization, which Virtual PC doesn't.
You also generally need to install appropriate custom, virtualization-aware, drivers in the guest OS, as the standard drivers are expecting to talk to real hardware. In Virtual PC and Server these are called Additions, in VMware they are VMware Tools.
Anandtech has some great info on virtualization. Although they are not any benchmarks, it provides a great insight on why it is so difficult to do proper virtualization benchmarks. I cannot suggest you a specific product, because it depends very much on your requirements.