Problems Creating a VMRC ActiveX Instance at RunTime

9. April 2007 06:40 by Csaborio in General  //  Tags: ,   //   Comments (0)

During the Virtualization labs, which are freely available to anyone interested in Virtualization, the Artinsoft trainers have had a chance to teach the Virtual Server COM API and its uses.  One of the attendees showcases the application that they build on his blog. I think the application in its finished state is a great start to create something functional, but it is in no way something that can be used for management right out of the box.  The reason for this is simple: we wanted simple in order to reduce the learning curve of the COM API. 

I have started to work on my spare time on a new version of the Virtual Machine Configuration Assistant (VMCA) which will be version 2.0 due to major UI overhaul it has had.   One of the cool things I wanted to do, was the ability to open VMRC connections within the app in tabs (gotta love tabs in everything!).  So here is the interface I have so far (click on the image for larger view, as it has info on what I am trying to accomplish):


Sounds easy, huh?  Well, that is what I thought.  I have in my application the reference to the VMRC ActiveX control, the image that you see above depicts a VMRC instance placed on the form in Design Time.

When the user selects the VMRC option, I have the following code:

vmrcControl = new AxVMRCClientControl();
vmrcControl.ServerAddress = "vs02";
vmrcControl.Size = new System.Drawing.Size(985, 675);
//Add a New Tab
this.tabPage1 = new TabPage();
tabPage1.Text = VMCA.VirtualInstances.getVMInstance().Name;
//Add the VMRC Control
vmrcControl.Location = new System.Drawing.Point(0, 0);
vmrcControl.UserName = "Administrator"

The line in red below is where all hell breaks loose:


The problems seems to be that at design time, the VS Designer creates and configures a resource that is used to keep track of the ActiveX instance's state.  At runtime, this resource does not exists and that is the reason why the ActiveX is an invalid state.  Not being the ActiveX hacker that I would like to be, I am baffled on this problem.

Have you ever suffered with a problem such as the one above?  I have looked for help at various locations without any luck.  Although not critical, this feature is something that would definitely rock.  Help me solve this problem and I will send you a couple of pure quality Costa Rican coffee wherever you may be (if you are in Costa Rica, I'll send you beer instead ;)

I have posted a project which repros the problem:

In order to repro, just debug the app, and from the menus select Remote Control...if you can somehow make it through without the invalid OCX state exception, you are right on the money.

UPDATE: In order to run the project above, you *need* to have the VMRC ActiveX control installed on your machine.  The following page will guide you with the necessary steps to complete this process:

For all things related to software migration, be sure to visit Artinsoft's website.  For training in Visual Basic to C# migrations, Visual Basic to VB.Net,  Virtualization, and 64-bit training check our training web page.

Resize VHDs

13. March 2007 07:39 by Jaguilar in General  //  Tags:   //   Comments (0)

I just saw over at the Virtual PC Guy’s Blog that a new tool is available that allows you resize existing VHDs. You can check it out at the vmToolkit website.

According to the announcement, with this tool, you can resize VHDs (both increase and decrease their size), and can also be used to convert between Fixed and Dynamic disks.

Virtualization's downsides and how to minimize them/overcome them

9. March 2007 09:01 by Jaguilar in General  //  Tags:   //   Comments (0)

Today I saw an article over at ComputerWorld that talks about Virtualization's downsides. It brings out some interesting points, but I think you can easily overcome them. Here are my comments on some of the points they criticize.
(Since I am more familiar with Virtual Server than with competing products, I will concentrate on Virtual Server’s features)

  • Increased uptime requirements: This is something that has been on my mind since I started working with Virtual Server. Recently I had the change to setup a Virtual Server host cluster, and I think that is the way to go to minimize this concern. With Windows’ clustering capabilities, you can take out a node in the cluster, and another node will continue running the virtual machines. The virtual machines will only be unavailable for a few seconds while the resource group changes from one node to the other.
  • Bandwith problems: One of the recommended scenarios for running Virtual Server is to remove everything from a NIC on the host server except for the virtualization driver. You can extend this recommendation, and use several NICs on the host, each NIC associated with just one VM. Still, if you have something like a very high-traffic website, you’ll probably be better of running it on a physical server instead.
  • Cost accounting - license compliance: Microsoft has released new licenses for their server products that make them virtualization-friendly. You can review it here, and see how many licenses you need for your planned configuration. Licenses for other application may be messy, though.
  • Vendor support: This is something that the industry will have to sort out. Something similar happened with the move to multi-core systems. Some vendors treated dual-core CPUs as two processors (thus requiring two licenses), while other adapted a “per-socket” approach. Other even adapted even stranger policies (dual-core = 1.75 licenses ???). Again, the market will have to adapt to the new virtualization paradigm.
  • Management Complexity: Managing virtual machines as opposed to physical machines is definitely more complex – you basically have to perform all the management tasks that you normally do for physical boxes, PLUS the overhead of managing virtual machines. Management tools are still in their infancy, but with the eventual release of CarmineSystem Center Virtual Machine Manager plus a fully WMI-based API, the management effort should be reduced significantly.

Then again, there are some workloads that don’t work well when virtualized. Database servers are a classical example of this – IMHO it is a better idea  to have one large database server and hosts several database in that SQL Server instance (for example), than to have several virtual machines each one with a separate SQL Server instance hosting different databases.

Longhorn Hypervisor in Action (and an Intel intro to Virtualization)

5. March 2007 10:49 by Csaborio in General  //  Tags:   //   Comments (0)

Longhorn Server will have a virtualization role that will basically replace the need to use Virtual Server when working with Longhorn.  If you want to play around with the new virtualization role as of now, it is not going to be possible because this feature not present in any public betas. 

If you are curious about what this "role" is and a little more information on how this will impact that way we run virtual machines, take a look at the following demo done byJeff Woolsey:

Video: Longhorn - Windows Server Virtualization

Try this link instead for no-registration hassle

If you are still a bit lost in terms of what virtualization is, check the Intel webcast below:

These videos introduce virtualization technology and point out the differences between sofware and hardware based virtualization. They explore existing and emerging usage models of Virtualization: Server consolidation, disaster recovery, development/testing, load balancing, fast provisioning, etc They introduce the next generation of Intel� Virtualization Technology (Intel� VT) and VT -d (Directed I/O) and suggest usage models for the future enterprise.

VMWare Fusion with Graphic Card Support

5. March 2007 09:55 by Csaborio in General  //  Tags:   //   Comments (0)

At this point, Parallels is one of the key players when it comes to virtualizing any x86 operating system on OS X.  I use it on daily basis and cannot live without it.

VMWare has been working on its own version of the VMPlayer for OS X, called Fusion.  The Betas that I have worked with have been not that impressive in terms of performance.   VMWare claims that some of the sluggishness comes from debug code embedded into the application.  On the other hand, Fusion offers some innovative features:

  • Support for 64-bit VMs
  • Ability to assign a CPU/core to the host, and the other to the program

Recently they have upgraded their beta to support 3-D acceleration directly from the graphics card.  This means that very soon, Mac users will be able to play 3-D games on Windows within OS X.  Considering that the list of Mac games is extremely short, this will really make things interesting for the Mac gaming market.  There is a video on YouTube that has a demo of the application running: 

Your move, Parallels ;)

Virtualization Events in Europe

1. March 2007 05:20 by Jaguilar in General  //  Tags:   //   Comments (0)

In a couple of weeks we will be teaching two Virtualization for Developer Labs in Europe. The first one will be in Munich, on March 13–15, and the second one will be the following week in Reading, on March 20–23.

In this labs we show you in great detail how to leverage Virtual Server’s COM API and WMI methods in you own management applications. You will also learn how to create scripts to automate the management of Virtual Server installations, and you’ll also get to use the betas for the System Center Virtual Machine Manager.

For more information, don’t forget to check out the Virtualizacion Events website.

Virtual Machine Additions for Linux download link

22. February 2007 04:26 by Jaguilar in General  //  Tags:   //   Comments (0)

For some reason, several people have told me that they are not getting the link to download the Virtual Machine Additions for Linux on Microsoft Connect anymore. If that happens to you, try the direct link: . You will still need to enter your Passport Live ID in order to access the Connect website, but that link should take you directly to the Linux Additions page.

Virtual PC 2007 FINAL is out!

19. February 2007 08:36 by Jaguilar in General  //  Tags:   //   Comments (0)

Today Microsoft released the final version of Virtual PC 2007. You can download it here. This version fully supports Vista, both as a Host and a Guest, supports AMD and Intel hardware virtualization, and also supports 64–bit Host operating systems.

You can get some more information at the Virtual PC Guy’s WebLog, or directly on the VPC 2007 homepage.

Virtual Server being accessed by a 32-bit or 64-bit binary

8. February 2007 07:07 by Csaborio in General  //  Tags: ,   //   Comments (0)
Yesterday, one of the attendees from the Virtualization events asked this question which I though would be worthwhile to share:

For a simple .NET application like this, would we need different applications when running on 64 vs. 32 bit hosts?

Before answering, please allow me to elaborate more on where the question is going.  Virtual Server has a COM API that allows it to be managed by applications and scripts.  Virtual Server R2 SP1 Beta 2 (phew) comes in two flavors: 32-bit and 64-bit.  The owner of the question wondered if you could manipulate a 64-bit instance of Virtual Server using a 32-bit application (or vice-versa).

Ok, now that the question is (hopefully) a bit clearer, the answer to the question is no, you do not need to have a different version for accessing Virtual Server from an application regardless of its bit-architecture.  Why?  Virtual Server's COM API is accessed by an out-of-process COM library, which means that everything is done by means of RPC.  When two applications are communicating with each other by means of RPC, the 1st commandment of 64-bit is not broken (thou shall not run 32-bit and 64-bit code within the same process space). 

Windows Server Virtualization Calculator

8. February 2007 06:57 by Csaborio in General  //  Tags:   //   Comments (0)
Riddle me this: How many licenses of Windows Server Enterprise Edition would you need if you are planning on running 20 Virtual machines inside a server that has 2 processors?  Very, easy, you would need only 5 licenses.  Too tough?  How about this one...what would be the price difference if you were running 50 machines running Windows Server 2003 on a virtualization server with 2 processors if you chose to run the host machine with Windows Server Enterprise Edition vs. Windows Server Datacenter Edition?  Very easy...running Datacenter edition would be $25,580 cheaper.

It definitely is tempting to say that I can pull this info right off the top of my head, but that would be a big big lie. The secret lies in the sweet web application Microsoft has published.  It is called the Windows Server Virtualization Calculator, and without a doubt, it will clear a lot of doubts and will show you the best way to go (in terms of licensing) when consolidating your data center, enjoy!

Evaluation version of Windows 2003

31. January 2007 10:17 by Jaguilar in General  //  Tags: ,   //   Comments (0)

All of you are probably aware that you can download MSDN Pre-Configured Virtual Machine Images and of configurations you can get with the VHD Test Drive. There is another option, though, if you want to evaluate a Windows 2003 R2 installation by itself on a virtual machine or as a host for Virtual Server 2005 R2. You can get a 180–day evaluation of Windows 2003 Server R2 at the trial software page over at Microsoft. This makes it easier to evaluate the performance of the server product, for virtualization, or for any other tasks that you may be considering it.

Link: Windows Server 2003 R2: How to Get Trial Software

VMWare Releases FREE P2V Utility

30. January 2007 09:51 by Csaborio in General  //  Tags:   //   Comments (0)

There are many many alternatives out there that will assist you to migrate a Physical machine to a Virtual - heck, even NT Backup can be used to accomplish this.  The supported procedure recommended to carry out this procedure is to use ADS to create an image of the source machine and then dump it to a Virtual Machine.  I am currently testing this procedure and trust me, it is not a straightforward one.

Given the choice, I would recommend any other approach when carrying out a P2V migration.  VMWare currently released they migration utility that allows to move physical machines to virtual ones.   It even goes the extra mile and imports various virtual machines from other solutions such as Microsoft's Virtual Server.

This is perfect for users of VMWare, but what about if you want to carry a P2V migration to the Virtual Server format?  Well, you can still carry this out by using VMWare's tool and then using this utility to convert from VMWare to Virtual Server format.  Not the cleanest solution, but I guess this is a perfect example in which the ends justify the means ;)


Virtual Server R2 SP1 not Remembering Passwords Workaround

24. January 2007 10:49 by Csaborio in General  //  Tags:   //   Comments (0)

Before I get started on this blog post, allow me to say that this is something that you should never do in a production environment.  That being said, when working with the Administrative Web Interface of Virtual Server, it will prompt you for username/password when you start the browser session and when you want to use VMRC to control a VM:


See that "Remember my password" checkbox?  Well, it has never worked for us, and according to David Wang, this is an issue with the Virtual Server's Administrative Web Interface being accessed not as an Intranet site but rather as an Internet site.  I tried messing with the security settings of my trusted site to allow the use of the currently logged on user on the sites - this lead me nowhere as the web site would not even show up.

I then proceeded to mess with some settings with IIS and I have achieved my purpose: no more password input every time I need to VMRC! .  It is worth mentioning again that this is something I am doing on an isolated machine that we use for testing purposes - never, ever do this on a production machine!!!

Here is what you need to do:

  • Access the IIS Control Panel
  • Expand the following nodes: Virtual Server --> VirtualServer
  • Right click on the VirtualServer node and select Properties


  • Click on the Directory Security Tab
  • Click the Edit button under Authentication and access control
  • Mark the check labeled "Enable anonymous access"
  • Enter a username/password combination that is allowed to access Virtual Server


  • Close the dialog

So far what you have done will allow you to access Virtual Servers main Administrative interface.  If you want to skip the whole username/password issue when using VMRC, you must change some settings in IE:

  1. Access Internet Options from within IE
  2. Select the Trusted Sites Zone
  3. Click on Custom level
  4. Scroll all the way to the bottom and under User Authentication--> Logon, select "Automatic logon with current user name and password"
  5. Close the dialogs, restart IE

Once you do this, you will be able to access the Administrative Web Interface as the user you specified above.  Nifty trick for testing but a big no-no for any other scenario.

Installing Virtual Machine Additions on a Linux Guest

24. January 2007 06:40 by Jaguilar in General  //  Tags:   //   Comments (0)

The first step is to download the actual VM Additions. You can read more about the Linux VM Additions here. To download the additions, you need to log into Microsoft Connect, and the look in the available programs for the Virtual Machine Additions for Linux. Once you download and install the file VMAdditionsForLinux32Bit.MSI, you will have an additional ISO file under C:\Program Files\Microsoft Virtual Server\Virtual Machine Additions\, called VMAdditionsForLinux.iso. This ISO file will appear on the Known image files on the virtual machine’s CD/DVD Drive properties:


Once you mount the ISO, installing the additions is straightforward. You only need to change the directory to the CD-ROM drive from a terminal (in this case, /media/cdrom), and run the script This script takes several parameters, depending on what part of the additions you wish to install. You can, for example, only install the SCSI driver, or the X11 driver, or any other component. I installed all of them using the command line ./ all:


You can also install the additions using the RPM packages, if your distro supports it. Once the additions were installed, the VM worked like a charm. The mouse integration works perfectly, and the performance increase is noticeable.

Moving a VMDK with Linux installed to a VHD

23. January 2007 09:44 by Jaguilar in General  //  Tags: ,   //   Comments (0)

As suggested in this post by Christian, I went ahead and downloaded the vmdk2vhd utility to convert virtual hard drives from VMWare’s VMDK format to Microsoft’s VHD format. To test it out, I also downloaded Red Hat Enterprise Linux trial virtual appliance from VMWare’s site, and ran the converter on it. These are my results.

First, running the converter is pretty straightforward. You just launch the utility, and it presents you with a simple UI, where you select the vmdk you want to convert, and the path to the destination VHD.


Once you select the vmdk and the vhd, press the convert button to start the conversion process:


The tool shows you a dialog box when it completes the conversion:

I created a new virtual machine in Virtual Server 2005 R2 SP1 Beta 2 using this newly converted VHD,  and, not knowing what to expect, I started it. The redhat OS started the boot up process normally:


After making some adjustments to the configuration, including the X Server configuration, I finally got the X Windows server to come up. I am currently playing with the OS, and will proceed to install the VM Additions … I will document the process in another post soon.


As you can see, the process for converting a VMWare virtual hard disk to a Virtual Server VHd is very straightforward. This will work, ideally, in a migration scenario, but this also enables a scenario to try out the large amount of Virtual Appliances that you can download from VMWare’s website.

VHD Test Drive and SCSI Adapters

3. January 2007 09:17 by Csaborio in General  //  Tags:   //   Comments (0)

We have mentioned several times that if you can use SCSI for your VMs, then you should use it.  In order to practice what we preach, I downloaded a VHD from the VHD Test Drive program (Windows Server Pro 2003)  and hooked it up to a SCSI adapter and booted the machine.   It was unpleasantly  greeted by the dreaded Blue Screen of Death when booting.  As far as the reason why it happens, I really cannot tell.  Perhaps it has to do something with the VHD being syspreped and whatnot, but the purpose if this entry is not to tell you why it happens but rather how to get around it.

What I did was that I connected the VM to a virtual IDE controller and booted.   I let the sysprep process finish and once I had a Windows Server 2003 logon screen, I turned off the VM.   In the configuration screen of Virtual Server, I added a SCSI adapter and then added the VHD to an empty device:


Once this was set, the VM booted without any issues.

Virtual PC 2007 Release Candidate

3. January 2007 04:13 by Jaguilar in General  //  Tags:   //   Comments (0)

Virtual PC 2007 has moved to the Release Candidate stage. You can download it from here.

You can also check out the new features of this release on the Virtual PC Guy's WebLog .

Virtualization Overview

2. January 2007 09:20 by Jaguilar in General  //  Tags:   //   Comments (0)

Over at IBM developerworks there is an overview of virtualization technologies, starting with the history of virtualization, virtualization methods, and some more information on the current status of virtualization in the IT industry. The article focuses on Linux Virtualization solutions, but the information it contains and the background it gives is worth a read.

Link: Virtual Linux.

New Webcasts for the IT Pro

2. January 2007 08:43 by Csaborio in General  //  Tags:   //   Comments (0)
Microsoft has recently posted on their website a plethora of webcasts dealing with many current topics.  Of particular interest are the ones posted on Virtualization.   The ones that deal specifically with topic follows:

How to Virtualize Infrastructure Workloads

Using Application Virtualization to Decrease Your Application Management TCO

An Overview of Microsoft's Vision for Virtualization

Transitioning to Windows Server Virtualization

I have yet to watch them, but if I find something particularly interesting, I will post it on my blog ASAP. 

Comparison between Virtual Server and Windows Virtualization, Part II

30. December 2006 11:24 by Jaguilar in General  //  Tags:   //   Comments (0)

This post is the second part on the comparison between Virtual Server 2005 R2 SP1 and Windows Virtualization:

  • Cluster Support: Both Virtual Server and Windows Virtualization have support for Windows Server clustering
  • Scripting support: Both Virtual Server and Windows Virtualization have support for scripting, but Virtual Server uses a COM API and Windows Virtualization a WMI-based API
  • Supported VMs: Virtual Server, with SP1, support up to 128 VMs on a single server. Windows virtualization supports as many as the hardware allows.
  • Management Interface: Virtual Server has web-based administration tools. Windows Virtualization, on the other hand, will be managed through a MMC snap-in, to put it in line with all other Microsoft’s management solutions.

You can check out the first part here.