Migrating a Windows Home Server guest machine from VMWare Virtual Server 2.x to Hyper-V

I was running a Windows Home Server under VMWare Virtual Server as a guest machine. It had a dedicated 750GB hard disk to host a fixed size virtual disk spanning entire hard disk.

These days I am migrating this and other virtual machine to the Hyper-V 2008 R2 free server and here is how I did migrate it.

  1. Uninstall Virtual Server Tools from guest machine (this is important at this point in time because later it can’t be done easily through add/remove programs).
  2. Shut down guest.
  3. Copy all VMDK files to a spare (new) 1.5 TB Seagate disk. This step isn’t strictly necessary but it was for me because the source disk had troubles reading some sectors – if I wanted to proceed I had to have all the files on a good disk. This step took something like 4 hours over 1Gb LAN.
  4. Download and run VMDK to VHD Converter.
  5. Convert VMDK files (as input select the one without numbers if your virtual disk is partitioned across many files, i.e. SomeDisk.vmdk). I converted to the same hard disk (it barely fits) and it took something like 7 hours.
  6. Copy the resulting VHD to the Hyper-V server (I could pick the server as target location in step 5. but I felt more comfortable doing conversion locally). This step again took something like 4 hours.
  7. Create a new Virtual Machine on Hyper-V server, attach the resulting VHD file as its disk.
  8. Run the machine, activate OS (it will detect “huge” hardware change and it will require activation).
  9. Install Integration Services (Action/Insert Integration Services Setup Disk on connection window) and that’s it.

Lessons learned:

  • Hard disks are growing fast in size but network speed doesn’t. Thus such transfers will be slower and slower due to the sheer amount of data to transfer between disks.
  • Such operation might take whole day
  • If you use an external disk like I am then you should really stick with e-Sata instead of USB 2 or firmware (it is up to 4x faster)
  • Have enough free space on hard disks

My first WPF 4.0/Windows 7 multitouch application

So I finally bought an Acer T230H multitouch enabled monitor that is supported by Windows 7. Actually, it is a dual touch but that’s enough. (for more on multitouch input devices for Windows 7 see my previous article).

On the good side it is a decent 1900x1080 monitor, not too expensive and multitouch works even under VMWare Workstation 7. On the bad side I knew it has some problems following fingers. Actually sometimes it gets just confused. That’s not a problem for a project I am working on but nevertheless I was curious.

Hence I created my first multitouch application that visualizes touch positions from monitor. Here is a screenshot featuring two fingers:

image

The application itself supports two different colors because I was interested only in two (no problem adding more if somebody wants me to). So, try the application and see how good or bad does your multitouch input device. Note, .net framework 4.0 RC is required.

As per my Acer T230H: indeed it has problems that usually manifest when fingers are nearby. And sometimes it just gets confused. Heck, it is one of the first multitouch monitors and a cheap one.

Have fun multitouching!

Powerful and easy installation authoring of .net applications with Advanced Installer

Lately I’ve built a .net class library that supports COM as well. To make setup file I usually use Visual Studio’s Setup Project because I rarely do anything complicated during the installation ant Setup Project does the work fine for me.

This time the setup was a bit different, more complicated, because I needed to register my COM stuff during the installation. So I’ve built the setup file and tried the installation inside VMWare Workstation’s guest as I always do. COM objects were registered fine but type library (TLB) wasn’t registered at all when setup project is built on Vista/Visual Studio 2008. The later isn’t strictly required for running the code but it surely helps developers with strong typing support. There are several options to solve the issue ranging from building on XP to coding the post install/uninstall actions. Well, none of them looks very appealing to me thus I’ve decided to try the Advanced Installer from Caphyon this time.

I can say that creating a setup file for my .net application with Advanced Installer was a breeze – I had a working MSI setup in 10 minutes. The process consisted of importing the Visual Studio Setup Project (which I already had – I could start from scratch or by importing the library project) and adjusting few properties. Truth, mine wasn’t a complicated one but it surely solved type library registration with a click on the checkbox. It actually solved my problem in 10 minutes. Any other option would be either more annoying or it would take more time.

Advanced Installer is not just easy to use. It looks like a powerful and flexible authoring tool as well and certainly not limited to (simple) .net applications only.

Running Visual Studio 2010 beta under VMWare Workstation 6.x

There are some graphical problems, probably due to new Visual Studio’s WPF UI, when running shinny new Visual Studio 2010 beta under VMWare Workstation: things like menus disappearing, strange artifacts appearing, etc.

Luckily the solution to this is very simple:

  1. make sure the virtual machine is turned off
  2. open virtual machine settings, go to Hardware tab and select Display
  3. Turn off Accelerate 3D graphics (DirectX 9.0c) option and that’s it.

disable

Picture quality might be a bit lower but at least everything will work. Btw I’ve installed Visual Studio 2010 in both Windows XP x86 and Windows 7 x64 virtual machines and it works just fine when graphics acceleration is turned off.

Update 9.12.2009: Workstation 7 supports WPF/Aero with hardware acceleration.

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.

VMWare Workstation's Easy Install

When you think that [VMWare] invented everything they push the innovations even further. These days I've finally accomplished Windows 7 beta download and since I don't have a spare computer right now I've though of installing it under Workstation 6.5. I have to admit that I didn't install any new OS for a while now (thanks to Workstation's excellent snapshot management system). So I created a new typical configuration and entered the path to the Windows 7 beta x64 iso file. Workstation recognized it as Vista (W7 is enhanced Vista after all, but I am sure Workstation will be updated to reflect the proper name in the future) and notified me that it will be installed using Easy Install.

ei

I didn't know about Easy Install and I was pleasantly surprised about it. It lets you enter all the required data for the installation in the next next dialog:

eii

and that’s it. After you put in all the required configuration data Workstation will install the OS for you, no interaction required whatsoever. That’s right, after some time you’ll be greeted by running OS. A huge timesaver even if you don’t install a lot.