Happy New Year!!

31. December 2006 15:15 by Jaguilar in General  //  Tags:   //   Comments (0)

A quick post to wish you all a happy new year!

This is going to be an interesting year, with the release of Windows Vista, possibly Longhorn Server, and all the virtualization products on the pipeline from both Microsoft and the competition. I also think that this year 64-bit usage will increase significantly on the home and workstation front, given the release of Vista 64-bit and the fact that drivers are starting to show up.

So, best wishes to you all, and hope you have a great 2007!!

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.

On Virtual Machine Additions

28. December 2006 11:13 by Jaguilar in General  //  Tags:   //   Comments (0)

Several times I've been asked something along the lines of “why should I install virtual machine additions on a virtual machine? The virtual machine works fine without them, doesn't it?". I thought it is worth it to quickly mention the benefits of virtual machine additions in this post.

The Virtual Machine Additions included with Virtual Server perform several tasks. They allow better communication between Virtual Server and the guest OS, on things such as time synchronization or the ability to shut down the machine on command. But the most important task performed by the Additions is that they patch the operating system so it can work with what is called Ring Compression.

Operating systems normally run on Ring 0 on x86 CPUs. Ring Compression allows the virtual machine OS to run on Ring 1 on the hardware, allowing the host operating system and the virtual machine monitor to run on Ring 0. By using ring compression, the VMM is able to trap instrucions from the virtual machine that otherwise it is unable to catch – such as memory requests. The alternative, at least in Virtual PC (I’m not 100% possitive Virtual Server follows the same approach) is to run the operating system instructions not on the hardware, but on a binary translator. This is the one of the reasons why after installing the additions you see such an increase in the virtual machine’s performance.

Of course, ring compression is not necessary if you have a CPU with AMD-V or Intel VT technology. In those CPUs, the virtual machine monitor runs on a Ring -1, so guest operating system will run on Ring 0 without any complications.

You can read more about this topic here or here.

Comparison between Virtual Server and Windows Virtualization, Part I

28. December 2006 06:14 by Jaguilar in General  //  Tags:   //   Comments (0)

Windows Virtualization is the next generation of virtualization solutions offered by Microsoft. Here is a quick list on how it compares to Virtual Server 2005 R2 SP1:

  • Supported Hardware: Virtual Server 2005 R2 SP1 runs on both x86 and x64 architectures. Windows Virtualization will be x64 ONLY.
  • Virtual Machine Support: Virtual Server supports 32–bit virtual machines. Windows Virtualization supports both 32 and 64–bit Virtual Machines
  • Virtual Machine Memory Support: Virtual server can allocate up to 3.6GB per VM. Windows Virtualization will be able to assign up to 32GB per VM
  • Hot add: Virtual Server does not support adding hardware to a virtual machine while it is running. Windows Virtualization supports hot add of memory, processors, storage, and networking devices.

Viridian in Action

28. December 2006 05:51 by Jaguilar in General  //  Tags:   //   Comments (0)

A couple of weeks ago, during the Virtualization for Developers event in Redmond, we had a short presentation on Viridian by Arno Mihm, Program Manager for Windows Virtualization. He explained the features that will be available on that platform, the differences with the current Virtual Server architecture, and also talked a little bit about the hypervisor.

Windows Virtualization is coming up with some pretty impressive features. The Windows Hypervisor is a tiny piece of code (right now it is around 160KB… it has grown, though, since it was 140KB when we first heard about it on the Longhorn Developer Review back in April), that manages the different partitions running on the physical computer. Microsoft has taken an intelligent approach at this level. The hypervisor only manages context switches between the VMs and protects access to the different VM’s resources. All device drivers and any other logic are managed by the parent OS. This way the hypervisor code can remain really small and extremely fast, and provide the type of reliability that is necessary for this type of environment.

Another nice feature of Windows Virtualization is the device driver architecture. “Enlightened” operating systems will route all device requests through Virtualization Service Clients, that through a very efficient communication mechanism (called VMBus) will communicate directly with Virtualization Service Providers on the parent partition of the server, and then call the hardware directly. This is more efficient than current implementations, in which calls to virtual devices are trapped and handled through the virtual machine worker processes, requiring several context switches in the process.

The best part of the presentation, however, was to finally get to see Windows Virtualization in action. He did a short demo on his laptop, that had a preliminary build of Longhorn server with the Hypervisor enabled. One of the virtual machines was also running Longhorn server, and he showed us how you can dynamically add memory to a virtual machine, WHILE THE VM IS RUNNING, and the client operating system (Longhorn server in this case) will pick it up immediately. This is very useful for those times when you need to give an extra boost to a virtual machine so it can complete a certain task. And my understanding is that all new server products from Microsoft (starting with Exchange 2007) will be able to dynamically pick up these changes as well.

Running Vista on a Virtual Machine

26. December 2006 11:18 by Jaguilar in General  //  Tags:   //   Comments (0)

Over at the Virtually vista blog there’s a post talking about how to run the RTM of Vista in a virtual machine. Regarding the supported products and additions, the post states:

If you're using Virtual PC, you should be using the VPC 2007 Beta - the additions that ship with that product work just fine in Vista.
If you're using Virtual Server, you should use the VS 2005 R2 SP1 Beta - those additions work with Vista as well.

The only downside we've found with running Vista on a VM is that the precompactor doesn't work - and Vista uses a lot of disk space during the installation, so we haven't been able to compact a dynamic VHD with Vista.You can get both VPC 2007 and Virtual Server 2005 R2 SP1 Beta form http://connect.microsoft.com.

Merry Christmas!!!

22. December 2006 11:28 by Jaguilar in General  //  Tags:   //   Comments (0)

Yep, it’s that time of the year again. I just wanted to write a quick post to wish you all a Merry Christmas and a Happy New Year!!

I’ll probably make a couple of post in the next few days, since I won’t be taking time off for the holidays. But for those of you that do, I hope you have a happy holiday!!


Virtualization for Developers Event Wrapup

20. December 2006 04:59 by Jaguilar in General  //  Tags:   //   Comments (0)

Last week we succesfully delivered the first in the series of virtualization events aimed at developers creating software to work with Virtual Server 2005. Even though we didn’t get as much of a turnout as we were expecting, the event was a complete success. Also, the feedback we got for both the content and the presentation was excellent!

I encourage you to register for one of these events. The next one is in Zaragoza on Jan 23–25. The next US event will be again in Redmond, on Feb 6–8. Don’t miss them!

Taking Advantage of Virtual Machines - IE 6 Testing VPC Image

2. December 2006 21:15 by Jaguilar in General  //  Tags:   //   Comments (0)

Microsoft released Internet Explorer 7 a few months ago, with some great features such as an RSS reader and tabs (my favorite). You, however, cannot run both Internet Explorer 6 AND Internet Explorer 7 on the same Windows installation. So if you are a web developer, and have to test your web pages in different versions of the browser, what can you do? Well, for one, you can thank Microsoft for releasing Virtual PC 2004 as a free download.

One of the known advantages of virtualization is the fact that you can run different configurations on the same machine. Microsoft is right now using this to help developers, by releasing AS A FREE DOWNLOAD a Virtual Machine image that contains a pre-activated Windows XP SP2 installation, Internet Explorer 6 and the IE7 Readiness Toolkit. With this VPC Image, you can run IE7 as the standard browser in your PC, and have and Virtual PC 2004 image with IE6 for testing purposes.

You can get more information about the VPC image in this post at the IEBlog. One of the downsides of the image, though, is that it has a "timebomb" and expires in April, 2007. But, between now and then, looks like the best alternative for running both browsers on your PC.

You can get the image from the Internet Explorer 6 Testing VPC Image download page

Virtual Server 2005 Performance Tips

30. November 2006 12:23 by Jaguilar in General  //  Tags:   //   Comments (0)

I found two websites that give tips on how to get the best performance out of Virtual Server 2005. Check them out:

One of the best tips came from the second article, when discussing SCSI and IDE virtual hard disks:

Still, the rule for performance is pretty simple. Use SCSI-attached VHDs whenever you can and use IDE-attached VHDs whenever you must.

 Both pages give excellent tips, and discuss things like the amount of memory you should have, how to optimize VHD placement, number of CPUs, and others. I recommend you look at them if you are considering installing Virtual Server.

Virtualization for Developers event in Redmond in two weeks

30. November 2006 06:47 by Jaguilar in General  //  Tags:   //   Comments (0)

The first Virtualization for Developers event will be held in Redmond between December 12–14. The registration is still open at the Virtualization Developer Lab Series webpage. We’ve been working hard on the content for this labs, and we are really looking forward to this event.

In these events you will learn how to work with the Virtual Server 2005 COM API in great detail. Once you complete them, you’ll be able to script common management tasks, and incorporate API calls to your own management applications. You’ll also get an overview of Virtual Server capabilities, and you’ll see how the System Center Virtual Machine Manager can make your life easier. You can review the complete agenda on this webpage: Virtualization 3 day Lab Agenda Overview.

Oh, yes, and the upgrade guide as well!

24. November 2006 09:53 by Jaguilar in General  //  Tags:   //   Comments (0)

Planning and performing a Visual Basic 6.0 migration is not that straightforward. You need to keep track of many small details, and you need to keep in mind the complete migration process – in other words, always see the big picture. The tool I posted about yesterday, the Code Advisor and the Assessment Tool, are invaluable in the help that they provide during the planning stages of the project. For the complete upgrade process, however I have to recommend the Upgrading Visual Basic 6.0 Applications to Visual Basic .NET and Visual Basic 2005 guide from the patterns & practices Developer Center over at MSDN.

This guide was written as a joint effort between Microsoft and ArtinSoft, and details all the steps necessary to succesfully upgrade your applications to Visual Basic .NET. It also deals with the actual technical hurdles you normally face when performing these types of conversions. Overall it is very comprehensive, and should be in your library if you ar planning or performing one of these projects.

If you are using the VB Upgrade Companion, and decide to upgrade to C# instead, most information from the guide still applies. That is one of the beauties of the .NET Framework – the concepts from VB.NET work with C# as well.

And don't forget the Assessment Tool!!!

23. November 2006 12:34 by Jaguilar in General  //  Tags: ,   //   Comments (0)

Yesterday I blogged about the Code Advisor, that will pinpoint common programming practices that difficult the migration of a VB6 application. Well, another very important tool that you can add to your arsenal is the Visual Basic 6.0 Upgrade Assessment Tool. This tool was developed by ArtinSoft, and creates a spreadsheet with detailed information of actual upgrade issues that will be present in the .NET code after the migration.

This tool is also a free download from Microsoft’s website. You can also check out ArtinSoft Visual Basic to .NET page for more information on upgrading Visual Basic 6.0 applications.

Remeber the Code Advisor!

23. November 2006 12:02 by Jaguilar in General  //  Tags: ,   //   Comments (0)

If you are considering to upgrade your Visual Basic 6.0 application to Visual Basic .NET or C#, remember that the recommended first step is to run Microsoft’s Code Advisor. The Code Advisor, according to the website:

The Code Advisor for Visual Basic 6 is an add-in used to review your code to ensure that it meets predetermined coding standards. The coding standards are based on best practices developed by Microsoft to produce robust and easy-to-maintain code.

The Code Advisor detects issues that are not converted automatically during the automatic migration, increasing the manual work required after running the conversion tools. These include Variant variables, late binding, soft binding of different objects, and others.

Check it out: Code Advisor for Visual Basic 6.0

Updating Win32 API Calls

23. November 2006 05:30 by Jaguilar in General  //  Tags:   //   Comments (0)

The Visual Basic Upgrade Companion allows you to convert calls to the Win32 API from Visual Basic 6 to C#. API calls in VB6 have the following syntax:

Public Declare Function RegOpenKey Lib "advapi32.dll" _
Alias "RegOpenKeyA" (ByVal hKey As Long, _
ByVal lpSubKey As String, phkResult As Long) As Long

The equivalent API call in C#, using platform invocation (p/invoke) is:

extern public static int RegOpenKey(
IntPtr hKey,  string lpSubKey,  out IntPtr phkResult);

Even though the upgrade companion performs the conversion automatically, there are times when the protoype of the function may be slightly off. This happens mostly because of the changes in the data types between VB6 and C#. One example is when a string is sent to a method and its contents are modified in the call. String management is always tricky, and, in those cases, chances are that the VB Upgrade Companion will convert the VB6 fixed length string to a System.String object in C#. The correct conversion would be a System.StringBuilder object – remember that Strings are inmutable in C#, but StringBuilders are not, and they can be marshalled to the API as the strings that need to be modified.

If you ever have a doubt regarding the prototype of a Win32 API function in C#, I recommend that you check out PINVOKE.NET. This website contains the P/Invoke signatures for most methods of the API, classified by DLL. It is very complete, and can definitely save you lots of time if you are having problems with a particular methods.

If you are new to p/invoke, I also recommend that you check out this MSDN article on the subject.

Moving from ADO to ADO.NET using the VB Upgrade Companion, Enterprise Edition

10. November 2006 10:31 by Jaguilar in General  //  Tags:   //   Comments (0)

One of the best features of the Visual Basic Upgrade Companion, Enterprise Edition, is the fact that it transforms your ADO code into ADO.NET. The Companion converts most of ADO features automatically, and it work correctly even if you choose to generate C# code.

One detail, though, is that the generated code by default uses the SQL Client for ADO.NET connections. This brings huge performance increases to the application, but we’ve run in to the situation in the past where the original datasource was not SQL Server. We’ve seen applications that used the Jet Database Engine, which is no longer supported by the latest version of MDAC, and is definitely not supported by ADO.NET’s SQL Client.

The solution for these scenarios is to use the Microsoft Access Upsizing Wizard. So far we haven’t seen any issues when upsizing the data, but there are other features that are not supported by the wizard. Once you upsize your database into a SQL Server installation (it even works with SQL Server 2005 Express Edition – which is great news for smaller installations), the final step in your application is to update the connection string used. The easiest way to get a hold of the new connection string is to create the connection inside Visual Studio 2005, and then copy the Connection String from the connection’s properties:


It is also important to mention that this and most other behaviors can be customized through our consulting services. We can also carry out the complete migration process as well.

SCVMM Self-service issues

10. November 2006 09:12 by Jaguilar in General  //  Tags:   //   Comments (0)

The self-service portal is one of the best features of System Center Virtual Machine Manager (SCVMM –  I have to say I can’t get used to the new name – Carmine still sounds more familiar), as it allows administrators to define policies for creating Virtual Machines, and then users themselves can create new VMs that comply with the limits set by IT (i.e.: Guest OS, amount of RAM, hard drive, etc). This greatly improves the efficiency of IT departments, and allows end-users to take control of the server and workstation provisioning process into their own hands.

During the development of our labs, we run into several issues with the Self-Service portal of SCVMM . After going through all the process to create templates and hardware and guest profiles, we kept running into issues with the template being disabled in the self-service portal. Well, it turns out that the issues had nothing to do with SCVMM  itself, but with the configuration on the target Virtual Server. Here are some points in the Virtual Server configuration you should check if you ever run into similar problems (the error messages are not that descriptive):

  • The host have enough RAM and disk space for the new VM
  • The host must have a default path for Virtual Machines. You can check this one on the web management console of Virtual Server, under Server Properties->Search paths->Default virtual machine configuration folder.
  • The host must have sufficient network adapters to support the amount specified in the template.

Our test Virtual Server installation, the default path was missing. Be sure to check these points out if you ever run into a similar situation!

Virtualization Labs registration now open

8. November 2006 06:34 by Jaguilar in General  //  Tags:   //   Comments (0)

Registration for the Virtualization labs we will be teaching next year is now open. The program will run from December, 2005 to May, 2006, and we will be presenting the content in Redmond, Spain, and several countries in Asia.

The labs are 3 days long, and in them we show you how to leverage the features of Virtual Server 2005 R2 SP1 from a developer perspective. You’ll learn how to script common management tasks, how to use Virtual Server 2005’s API to manipulate virtual machines and develop your own management applications, and how you can setup the System Center Virtual Machine Manager (a.k.a. Carmine) to manage Virtual Server installations.

You can see the complete schedule and sign up for the events at http://www.virtualizationevents.com/ .

VHD Test Drive

6. November 2006 04:30 by Jaguilar in General  //  Tags:   //   Comments (0)

A couple of weeks ago I made a post about pre-configured virtual machine images. Well, it turns out that the program is now official, and it is called VHD Test Drive. You can read about it in this press release. With this program, you can download virtual machine VHDs that contain pre-configured Microsoft’s server products, so you can try them out easily. Third party support for the program is expected later. From the press release:

These virtual machines, which are provided in Microsoft’s virtual hard disk image format, are pre-built and pre-configured so that they can be downloaded or distributed for easy setup and evaluation. This allows customers to evaluate software in a fraction of the time it usually takes, such as setting up SQL Server 2005 in minutes instead of hours.

The VHD Test Drive Program is a first for Microsoft software and the more than 7,000 software vendors who can now deliver pre-configured applications within Windows Server-based virtual machines to their customers. Today the program launches with the latest versions of Windows Server 2003 R2 Enterprise Edition, SQL Server 2005 Enterprise Edition SP1, Microsoft Exchange Server 2007 (32-bit beta) with Microsoft Office Live Communications Server 2005, and Internet Security & Acceleration (ISA) 2006 Standard Edition. Partners and customers can expect to see additional Microsoft software added to this program.

You can check out the press release here, and read more about the program on the VHD Test Drive page.

MSDN Pre-Configured Virtual Machine Images

24. October 2006 08:30 by Jaguilar in General  //  Tags:   //   Comments (0)

If you are a MSDN subscriber, you have access to Virtual Machine images that are preconfigured with most Microsoft’s products:

MSDN Subscribers have access to a series of Virtual Images containing a fully functional installation of Windows Server 2003, SQL Server 2005, Visual Studio 2005 Team Suite, and Visual Studio 2005 Team Foundation Server. These Virtual Images are a benefit of your MSDN subscription and are available for download from the MSDN Subscriber download area.

I copied the paragraph above from Visual Studio’s Evaluation page. You do need to have an MSDN subscription to access these images. They are a great way to evaluate Microsoft’s products without commiting a physical machine to the evaluation, or having to spend time installing and configuring a server.

This is another great example of how virtualization is making our lives easier!