Good bye Visual Studio Emulator for Android and hello problems

I recently tested a prototype of a Xamarin Android app that should run on Android 4.1+. So I fired up Visual Studio Emulator for Android and saw that API level 16 (4.1) is missing from the list. The oldest is level 17/4.2.

Since they have a nice smiley icon for feedback I wrote a quick request to include level 16 as well since a lot of apps are targeting 4.1+, not just me.

The shocker came few seconds later in a form of an automated e-mail response (emphasis mine):

Hello,

This is an automated message. Unfortunately, we have no plans to publish Android images past 4.4. We recommend that you try Google or GenyMotion’s emulator for future images of the Android operating system.
 
When we first released the Visual Studio Android emulator, the Google emulator was slow, out-of-date, and a significant source of pain for mobile developers. In addition to the great work performed by GenyMotion, the Visual Studio Android Emulator proved that emulators can be fast, productive tools for mobile development.
 
Since then, Google has responded to developer feedback by increasing their investment in their tools. The next generation Google Android Emulator has closed the feature gap that previously differentiated Visual Studio’s emulator. Google’s emulator has become much faster and more feature rich.
 
We also know that, for mobile developers, authenticity is key. We believe that Google, as the platform owner, is best positioned to provide ongoing support for new versions of the platform in a way that accurately and authentically reflects the real-world behavior on devices.
 
For developers like you who’ve come to love and depend on the VS Android Emulator, thank you! We will continue to support in-market platform images according to Visual Studio’s generous support policy. However, Microsoft will no longer produce new Android images for the VS Android Emulator. We consider this a successful project that has come to a natural conclusion.
 
Happy coding!

Wait, what? First time I heard that VSE4A is no more. Which wouldn't be that tragic if Hyper-V wasn't involved. See, VSE4A is the only Android emulator based on Hyper-V. Why do I even care? Oh, I do and you should do as well. When Hyper-V is enabled it doesn't allow any other virtualization host to run. Sure, you can disable Hyper-V (reboot required) and go with Google's Emulator or a better one from Genymotion. But then you can't run Docker, Windows Emulator and  your other Hyper-V guests at the same time. More here.

Happy coding, indeed.

There is light of hope though. Miguel tweeted that there might be a solution in the future



Hopefully that's the case. In the meantime VSE4A still works and is available for download, it is just missing images, specially newer ones (latest is API level 23 aka 6.0).

But at the end I'd really like Microsoft to address the cause of this blunder: the monopolistic Hyper-V behavior on desktop. If Windows virtualization worked like others do ("live and let live") there won't be a problem whatsoever. The way it works now it makes sense on servers, not on desktops.

But instead of fixing that, Microsoft choose to create all imaginable emulators on top of Hyper-V. What could go wrong?

Finally upgraded to Windows 8.1 (from 8.0)

Since Microsoft released Windows 8.1 I’ve tried to upgrade my 8.0 to 8.1. Without success though. Every upgrade ended just a little bit before 100% with a BSOD and after some automatic retries to remedy the situation it simply rolled back to 8.0. By looking at the log file produced it was obvious there is a problem with a driver. But which one?

After some retries I gave up. Until now. The reason for my retry was that I found a dead computer (motherboard) after my vacation. I’ve replaced dead motherboard with a newer model (simply because the old one isn’t available anymore) and retried upgrading to 8.1 (thinking it might have been motherboard related). And I succeeded. The upgrade went through without problems. Hura. But.

After a while a realized that I didn’t plug in all my USB devices yet. So I started plugging them in only to create a BSOD after BSOD. By trial and error I’ve found that USB devices that act like disks are causing this problem (I have two of those). Then I went examining the crash dump. And there it was the real culprit in all its glory: iaStorF.sys aka Intel’s disk driver:

Debugging Details:
------------------


POOL_ADDRESS:  ffffe0000040f160 Nonpaged pool

FREED_POOL_TAG:  RstF

BUGCHECK_STR:  0xc2_7_RstF

CUSTOMER_CRASH_COUNT:  1

DEFAULT_BUCKET_ID:  WIN8_DRIVER_FAULT

PROCESS_NAME:  System

CURRENT_IRQL:  0

ANALYSIS_VERSION: 6.3.9600.16384 (debuggers(dbg).130821-1623) amd64fre

LAST_CONTROL_TRANSFER:  from fffff800ed2af338 to fffff800ed16a0a0

STACK_TEXT:  
ffffd000`20737018 fffff800`ed2af338 : 00000000`000000c2 00000000`00000007 00000000`00001205 00000000`04070015 : nt!KeBugCheckEx
ffffd000`20737020 fffff800`0105131e : 00000000`00000000 ffffe000`0c4ddb01 ffffe000`0b2f8010 ffffe000`01a05630 : nt!ExDeferredFreePool+0xbb8
ffffd000`207370f0 00000000`00000000 : ffffe000`0c4ddb01 ffffe000`0b2f8010 ffffe000`01a05630 ffffe000`0041a870 : iaStorF+0x131e


STACK_COMMAND:  kb

FOLLOWUP_IP: 
iaStorF+131e
fffff800`0105131e ??              ???

SYMBOL_STACK_INDEX:  2

SYMBOL_NAME:  iaStorF+131e

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: iaStorF

IMAGE_NAME:  iaStorF.sys

DEBUG_FLR_IMAGE_TIMESTAMP:  4f7e1f6d

FAILURE_BUCKET_ID:  0xc2_7_RstF_iaStorF+131e

BUCKET_ID:  0xc2_7_RstF_iaStorF+131e

ANALYSIS_SOURCE:  KM

FAILURE_ID_HASH_STRING:  km:0xc2_7_rstf_iastorf+131e

FAILURE_ID_HASH:  {f7fa26b6-6e68-69b5-7668-84d625b41a69}

How does one fix that? Googling of course. Here is the solution from Hans-HermannKaas. It looks like Windows 8.1 changed something regarding drivers (see Herman’s explanation) and nor Intel nor Microsoft handle it when upgrading. Tough one to understand.

Basically you would want to copy iaStorF.sys from IRST driver’s package x64 folder into c:\windows\system32\drivers folder. For me – I had an outdated version there.

But because you can’t do that before upgrading you’ll have to detach all USB devices that act like disks, upgrade, fix this and only then reattach them.

There you go.

SSD’s firmware version might be really important

I had a good old Asus EEE 1005HA netbook running Windows 7 just fine, albeit slow. The best way of speed it up was to upgrade it to a SSD. The I/O difference should speed it up considerably as the original disk was a 5400rpm one. The SSD prices are low enough, too.

So I went and bought a small, reasonably priced OCZ Vertex Plush 60GB SSD. The disk replacement process isn’t a very simple one because the disk is buried in the guts of the netbook. See one and two (there are more videos, just google them) and be careful with the connectors as they are really fragile.

I’ve replaced the disk, put everything back together and then booted Windows 8 x86 from an USB stick (the easiest way to burn an ISO to an USB stick is to use Windows 7 USB/DVD Download tool). Everything went smooth until Windows finalized the setup. Bam. I’ve got an “Windows couldn’t configure hardware on this device” error (very helpful description, isn’t it). After restart the computer didn’t boot but rather complained about missing boot disk. Huh? That’s odd and when Windows install fails it has to do with hardware issues usually – this time it hinted some sort of problems related to the SSD. Perhaps the problem lies in the Intel Atom CPU or something other on my netbook. Hence I’ve tried installing Windows 7 x86 as I knew it works. Bam. The same error. Changing BIOS settings didn’t help either. Same error over and over again. I’ve also got odd errors during partition management. BTW I’d really like to know which genius at Microsoft thought of requiring the Windows license key before OS is installed (yes, yes, you have to retype it each try you make, very annoying in such cases). Just for fun I tried installing Ubuntu and, surprisingly, I had no problems and everything was really smooth. At this point I was tempted to leave it with Ubuntu but I had other requirements and had to have Windows.

Then I started googling around if somebody experienced similar problem and after a while I’ve come to a forum thread where they mentioned very faulty OCZ Vertex Plus firmware. According to that thread older (than the latest 3.55) firmware versions have fatal issues with Windows. Only the latest and newest 3.55 should work. Coming from HDD world I never thought that a disk firmware could create such havoc but it fitted the description of my problems. Note that there is no easy way to check the disk’s firmware version without the OS installed (and even then). Anyway, there is an ISO you have to burn to a CD and boot computer from there (beforehand make sure the SSD is in IDE, not AHCI mode). The ISO is linux based and you’d need an utility to burn it to USB stick (netbooks don’t have CD drives usually). Free UNetbootin does the work just fine.

Once I’ve booted from firmware upgrade USB stick I discovered that my SSD was running firmware version 3.50. Bingo. Update went smoothly and after yet another Windows 8 reinstall everything worked as it should.

Two Windows 8 feature requests

Microsoft started blogging about Windows 8 (there is twitter account @BuildWindows8 as well) and I started thinking what I’d like to see in Windows 8. I can think of two features right now, out of my head:

  1. Make .net first class development tool. You might say that it is, but in reality it isn’t. Not all APIs are accessible through .net. Just look at (abandoned) Windows® API Code Pack for Microsoft® .NET Framework. Furthermore it is ridden with bugs. There are other APIs requiring black magic to use them from .net. Why are we, .net developers, supposed to mess with that?
  2. Give us a chance to store non-OS essential files on a separate drive. Starting with hibernation file which is as large as your RAM is. More or less. If that is 12GB it means you’ll have to give up 12GB of OS disk space. You might say who cares, 12GB is nothing with current disk prices. Sure, if you don’t look at obscene prices of non-mainstream disks (i.e. SSD) where 12GB matters. A lot. Then there are temporary files, user related documents, etc. A lot of stuff I’d be happy to offload to a cheaper and larger disk. Some of these can be redirected already, but mostly in obscure ways.

That much for now. What do you think?

Windows Home Server 2011 restore is just horribly flawed

I am a long time user of Windows Home Server (first version) and it saved me quite a lot times. Its restore had only one annoying flaw – that is it didn’t properly recognized my Realtek integrated netwok card (instead it tried to use drivers for another version and didn’t let me to select proper ones). So in order to restore I had to put in a recognizable network card and only then it worked. I guess a bit of hardware work here and there isn’t that bad for my strength after all.

Here comes Windows Home Server 2011 and my first restore experience. Initially it started very well, network card was properly recognized and I was happy. But then, oh well. I successfully connected to server and all went well until I had to select the partitions to restore. For beginning the partition letters were mixed up. Luckily I recognized the partitions by their names and their size. I’ve picked only the system partition to restore. When it should start restoring it worked for a minute and then yielded an unknown error has occurred. Gulb. After looking at the end of its log file it was saying that it can’t lock the volume for reason 5. So how come it can’t lock an unused partition. After googling I discovered that I am not the only one with this locking issue (https://connect.microsoft.com/WindowsHomeServer/feedback/details/665345/unable-to-restore-windows-7-client-with-raid-0). The workaround: delete the partition, create the partition and don’t format it. So I did. However, previously the partition was exactly 150,000 MB and now it shrunk to 149,999 MB. One MB shouldn’t make the difference, should it – the partition wasn’t full to the last byte? It turns out that WHS restore is so dumb that it will refuse the restore to this new partition due to the missing MB even though partition was used like 60%. And there is no way to make it bigger because next to this partition is another one and I don’t want to delete is as well. Very stupid and worse than WHS v1 was. Much worse.

So here is my plan now: attach an external disk, restore there, boot from external disk, manually copy the system partition files to original shrunk partition, make it bootable and run as usual. Will I succeed? I certainly hope so.

I am very disappointed in WHS 2011. The half of the key features (backup, restore) is seriously flawed.

Update: Even a non formatted partition can't be locked for some reason. I guess it has something to do with Intel Rapid Storage since the partition in question is a RAID1 one. Don't forget, it worked just fine with previous WHS.

Update2:

Here is the final workaround after a day of trial and errors:

  1. Restore system partition using WHS recovery CD to other (external) disk (I've mounted a spare disk in a Sharkoon dock).
  2. (optional) Again restore system partition to the disk above or some other disk, just to have a untouched copy.
  3. Boot from other disk - system is now bootable but not from original disk.
  4. Delete the original boot partition (the one that WHS can't restore).
  5. Install Acronis Disk Director 11 Home (it isn't free but I bought it just for this purpose and it is well worth it) and copy partition from step 2 (or the from step 1) to the original location (to replace the one you deleted in step 4). This software is required to copy partitions - I guess any partition copy software would do.
  6. Reset and boot the original system.

In case either other disk or original disk isn't bootable anymore you might do one of these:

  1. Boot from Windows 7 CD and try "Startup Repair".
  2. Boot from Windows 7 CD and do the "Custom Installation" on that partition. That will make partition bootable. Once it is bootable repeat the process described above.

I also think I know why WHS can't lock my original partition. It is most probably because it is located on Intel Rapid Storage RAID1. Note that WHS v1 didn't have any problem whatsoever with the same configuration. Bad bad WHS 2011.

I lost a working day and 24€ but at least I restored my workstation. Next time it will be much faster.

Let me know if it works for you.

Update: Here is the issue on connect (thanks to Henk Panneman for re-finding it).

Update v2: Issue disappeared again. Oh well, tired to fix the link again and again....

The long path of installing Windows Home Server 2011 under Hyper-V R2

Here is my experience of Windows Home Server 2011 aka Vail installation under Hyper-V R2 server (Core2 Duo E7600, 8GB RAM, 500GB RAID 1 and 3TB RAID5). What could have gone wrong it actually went but let’s go by steps.

  1. During file copy at the very beginning I was experiencing couldn’t copy file XY. Problem: corrupt ISO file I was using. Solution: re-download the file.
  2. The setup make it further but I started experiencing random reboots and BSODs during install, this time it was happening soon after initial files copy finished. On the bright side I caught few of them and they were mostly mentioning memory corruption. Time for memtest86+ and for RAM test. It turned out that one of four Patriot DDR2 2GB CAS6 memory sticks was bad. Solution: Throw out the problematic stick and run the server with three sticks. Also donated to memtest86+, well deserved.
  3. Memory issues were still present during setup. Argh.  Solution: Throw out the third memory stick (they like to work in pair it seems and a pair and a third wheel obviously isn’t something one should use) and replaced it with two older 1GB sticks I had collecting dust.
  4. I’ve made it to the step when setup says “Waiting for installation to continue” and shows a marquee progress bar. Except it didn’t finish. Ever. Now what. After peeking into log files located at C:\Users\All Users\Microsoft\Windows Server\Logs I’ve more or less soon understood that it has something to do with the “waiting for a web page to show”. After more digging I’ve found out that there were problems connecting to the internet and the internal web page wasn’t showing. Problem: the network card didn’t get an address from my DHCP for some reason. Solution: I’ve set a fixed IP and DNS records.
    Hint: Type Ctrl+Alt+End to simulate Ctrl+Alt+Del from Hyper-V client. Pick Start Task Manager and File/Run. Run explorer.exe and you can browse around the file system.

It took me a couple of days to make it through but at least I did it. Hura. It took me that much because I was installing on a 1TB VHD disk on a RAID5 array and setup takes time each retry.

So, that’s it. Now it looks fine.

Jinxing your application

If you ever wrote a multithreading application you should understand how hard is to get it right. If you don’t understand it then your application most probably isn’t written correctly.

You’ve written a multithreaded application and now what. How can you test it whether it is written correctly or not. Unit testing won’t be of great help because there are complex currency issues that might manifest in a bug only under certain circumstances. Imagine this piece of code:

class Program
{
    static int x;
    static Random rnd = new Random();

    static void Main(string[] args)
    {
        List<Thread> threads = new List<Thread>();
        for (int i = 0; i < 4; i++)
        {
            Thread t = new Thread(Runner) { IsBackground = true };
            t.Start();
            threads.Add(t);
        }
        foreach (Thread t in threads)
        {
            t.Join();
        }
    }

    static void Runner()
    {
        for (int i = 0; i < 1000000; i++)
        {
            Thread.Sleep(rnd.Next(10));
	   int orig = x;
            x += 5;
            Debug.Assert(x == orig+5);        
} } }

I am increasing a shared static variable from multiple threads without any synchronization. Will it work? It might or might not (try it!). It depends on when different threads are accessing the variable x. One thing is for sure, this code isn’t correct and it most probably won’t work and for sure it won’t work always. That is the biggest problem with multithreading – if something works it doesn’t mean that it it is correctly written and that it will work always. More about this later. If you use unit testing to test runner method the test will pass because unit testing doesn’t test multithreading, at least not easily.

So, how does one test such code and scenarios. One way is to use a static analysis tool. The other way is to put a jinx on your application. Once your application is jinxed it will be much more prone to displaying concurrency and other multithreading errors. And that’s exactly what Jinx does. Behind the scenes it makes your application fail more often that it would fail in normal circumstances. I mean that it shows faults in the application (if any) that would otherwise remain hidden and would occur only randomly here and there (you know, your user will find it after 2 minutes of running the application) – it doesn’t fail your application for no reason, it just emphasizes your bugs.

The most interesting aspect of Jinx is its the way it works. Jinx is a sort of hypervisor. You certainly know Hyper-V hypervisor whose task is to run guest operating systems. Jinx’s task is to make a clone of your OS and debugged application within and run multiple versions of it under various conditions. This is done so that any multithreading error is more likely to appear. Just by running more versions of the same application the error is more likely to manifest itself. But Jinx throws all sort of other jinxes to your application as well. That’s the shallow explanation. You’ll find more on official overview page and FAQ page.

So, let’s jinx the code above. Note that if you don’t want to you don’t need any modification of an existing code. Jinx can be set to do its task on any newly run application. However, some fine control is a better way to go. Here are the simple steps for selective jinxing:

  1. Reference jinxinterface assembly. It contains a single static JinxInteface class with a bunch of static methods and serves as a communication bridge between application and Jinx.
  2. Add jinx.cs file to your project. Again it contains a single static Jinx class that is a wrapper around JinxInteface class mentioned above. Its purpose is mostly to apply Conditional("DEBUG") over methods so they won’t get executed for non-debug version of the application.
  3. Call Jinx.RegisterApplication(); method at start of the application. This way you’ll let Jinx know that your application should use some jinxing.
  4. Replace Debug.Assert with Jinx.Assert. The only difference with both asserts is that the latter send statistical information to Jinx.

After the changes the code should look like this:

class Program
{
    static int x;
    static Random rnd = new Random();

    static void Main(string[] args)
    {
        Jinx.RegisterApplication();
        List<Thread> threads = new List<Thread>();
        for (int i = 0; i < 4; i++)
        {
            Thread t = new Thread(Runner) { IsBackground = true };
            t.Start();
            threads.Add(t);
        }
        foreach (Thread t in threads)
        {
            t.Join();
        }
    }

    static void Runner()
    {
        for (int i = 0; i < 1000000; i++)
        {
            Thread.Sleep(rnd.Next(10));
            int orig = x;
            x += 5;
            Jinx.Assert(x == orig + 5);
        }
    }
}

Before any analyzing takes place Jinx should be enabled and set – this is a system wide option. There are two ways to open the Jinx console – either through Tool/Jinx Visual Studio menu item or directly from All Programs via start menu. Either way you need Administrator privileges. Enabling is easy, just check Enable Jinx checkbox and that’s it. As per what programs are analyzed I’ll use “Analyze the most recent program I have registered.” option.

jinx

You can adjust some strategy settings on Strategy tab, I’ll skip this as it is an advanced option. And you can see the statistics on Status tab. Let’s run the application now. Jinx will kick in and the CPU will get under heavy load and the system might shutter due to Jinx running versions of the application in parallel. But the assert failure pops up almost immediately – the bug was caught for sure. If you run the application without jinxs there error would manifest much more later if at all and note that the test code in question is an extreme example. Here is the status tab page after a couple of errors caught:

status

The asserts observed counter is increased thanks to Jinx.Assert method call. Jinx analyzer isn’t limited to asserts and it might catch other type of errors as well according to PetraVM guys. Jinx is much more than this simple example.

So far I’ve run few examples like this and Jinx performed well and I think Jinx is a good weapon against multithreading bugs. However there might be a problem for testing. Since Jinx is a hypervisor on its own it won’t get along with other hypervisors such as Hyper-V. In other words forget about running Jinx on guest OS. A dedicated machine is required. Perhaps this issue will change in the future.

Also be careful when experimenting with Jinx as it is in beta phase right now (you can apply for testing over here). Running a beta hypervisor might result in a BSOD and all the consequences from BSOD such as non bootable Windows after. Which happened when I was writing this post. Perhaps this post is jinxed as well :-). Humor aside, I am sure guys behind Jinx will make it rock solid for the RTM. They obviously know very well the hypervisor craft.

Happy jinxing your applications!

Putting sleepless Windows 7 to sleep

A while ago I had the problem with Vista. The thing was that it woke up randomly from the sleep state. The same problem reappeared when I’ve upgraded to Windows 7 x64. But the solution I’ve found previously didn’t work anymore. Even turning off all wake up features for each device didn’t make any difference. Computer would just wake up in the middle of night and stay awake. Besides unpleasant noise there is also unnecessary power consumption.

However it looks like I’ve found the solution once again and this time it is a much more clean and an obvious one. Go to Control Panel, Power Options and click on Change plan settings of the currently selected plan.

poweroptions

Next click on Change advanced power settings

balanced

And finally disable Allow wake timers in Sleep node.

final

That’s it. Your Windows 7 computer will sleep like a baby again.

Investigating Windows BSOD cause for dummies

Does your Windows displays nice, we all love, BSOD once in a while or perhaps, god forbid, often? There are two most plausible suspects for this behavior. And no, it is rarely Windows fault. Instead it is either hardware or driver and I won’t even dig into the quality of drivers produced by various hardware companies.

But the big question here is, which one? Which driver? Which hardware? It is even harder to pinpoint the cause in case when BSOD occurs at random times. Luckily there is a tool that might shade some light on the mystery and point cyber finger at the offending driver: Microsoft Debugging Tools for Windows.

Recipe for using Debugging Tools

The recipe is shown on Windows 7 but it is very much the same for other Windows flavors.

1. Make sure your BSODs are producing memory dumps.

  1.  
    1. Right click on Computer, pick Properties
    2. On the left side click Advanced system settings
    3. Select Advanced tab, you’ll see this window
      dm1
    4. Click Settings… button in Startup and Recovery Group to see this window
      dm2
    5. Make sure that Kernel memory dump or at least Small memory dump (256KB) is selected (it should be on by default). That way Windows will store the forensic evidence of the crash.

2. Install appropriate (x86, x64 or Itanium) version of Microsoft Debugging Tools for Windows.

3. Run WinDbg debugger (installed as a part of package in previous step) as administrator (Right click/Run as administrator).

4. Setup symbols server path so the tool can output human readable information instead of hex codes.

Pick File/Symbol File Path… menu item and enter the following line into the text box:
SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
This line instructs WinDbg where to download symbols from (in this case it will be public Microsoft server). Also note that c:\symbols is folder on my disk where WinDbg will cache the symbols. You are free to use whatever other folder.
Note: there are other ways for obtaining the symbols, this is just the easiest one.
d1

5. Now you are ready for some real action. If your BSOD produced memory dump you’ll find it in C:\Windows\Minidump folder (default location). Pick File/Open Crash Dump… menu item and search for a memory dump file. Once you open a file WinDbg will present you a window like this (note, the first time it make take a while because WinDbg will download symbols from the internet):
d2
Here you’ll find the first clue of the offender, see line which starts with Probably caused by. The text probably won’t tell you much more, so here is the magic wand command.

6. Either click on !analyze –v or type it into the command line at the bottom and press enter. A better description of the error will appear such as this one:
d3
Here is a much more (human readable) information you can use to understand the cause of the BSOD. There is an offending process or driver and even a call stack. Specially the former should give you a hint who is causing the problem. Or perhaps you’ll find it in the call stack among system functions. Unfortunately the given sample is not the best one because at the moment I don’t have any better since I didn’t run into BSOD for a long time except the given sample on my wife’s computer. Csrss.exe doesn’t tell me much because the real source is hidden probably by a hardware issue. But if it was soundblaster.dll or nvidia.dll or ati.dll it would be very obvious who is the cause, wouldn’t it.

Here is my advice: search for a known dll/exe on this screen and if you find one you probably found the cause.

Well, I am not a die hard debugging guy but I often did find the cause of my BSODs this way. I am sure skilled people can use WinDbg much better than me. However often you’ll be able to understand the BSOD cause by yourself simply running WinDbg and !analyze –v command. And you’ll agree that there is no better feeling than solving such an annoying problem by yourself.

Happy hunting!

Change the HAL of Windows OS

I am doing a presentation on Visual Studio 2010/.net 4 parallel programming enhancements in the near future. [MS] released Visual Studio 2010 CTP and that’s fine. The problem was that the one and only release comes in the form of a VirtualPC image. This is not a problem by itself but it is a problem if one wants to show parallelism. You see, VirtualPC supports only single processor guests ([MS] isn’t exactly pushing for VirtualPC enhancements, is it – at the time [MS] bought VirtualPC it was on the same level as [VMWare] Workstation, now it is lightyears away). How can one show performance enhancements of parallelism with one CPU?

Part of the solution is [VMWare] Workstation 6.5 (and earlier, don’t know exactly which ones): it supports multiprocessor guests. Great. However once I’ve imported VirtualPC image into Workstation the OS was still showing only one processor even though device manager recognized two processors. Even updating the computer driver (node Computer\Advanced Configuration and Power Interface (ACPI) PC) didn’t help – there were no choices. Luckily I’ve googled over this blog post: Hyper-V How To: Change the HAL on your vm. Oh, the joy, the trick just worked.

The other problem with this presentation is that Visual Studio 2010 CTP expired by the end 2008. The solution is to change date backwards (silly, isn’t it) but Workstation/Windows keep synchronizing the time with current and thus yielding all sort of activation and expiration warnings. The solution is a twofold one:

- add these lines to Workstation’s configuration file so the Workstation won’t synchronize the guest on every occasion (thanks to Virtual Time Freeze):

tools.syncTime = "FALSE"
time.synchronize.continue = "FALSE"
time.synchronize.restore = "FALSE"
time.synchronize.resume.disk = "FALSE"
time.synchronize.shrink = "FALSE"

- remove or disable guest’s network capabilities so the OS won’t synchronize as well.

Ah, the joys of presentations based on CTPs.