Video demos

8. September 2006 15:28 by Jaguilar in General  //  Tags: , ,   //   Comments (0)
We just posted the last of three video demonstrations that I recorded. They are for the Informix 4GL to Java migration tool, JLCA Companion and the VB Upgrade Companion Enterprise Edition Demo. The videos outline the main points of each tool, how they work, and also contain a quick demonstration of a migration of a small application. You can check them on the Demos section of the downloads page.

PowerBuilder Migration

6. September 2006 05:48 by Mrojas in General  //  Tags:   //   Comments (0)
Powerbuilder is a nice language but is little propietary and the developer comunitty is not as big as the .NET or Java ones. It imposes some risks on Powerbuilder projects.
That why some shops have started moving some of their inhouse applications to other platforms.
Personally I feel that .NET is the more natural platform for migration. Even more there is now a datawindows.NET component. DataWindows are the core of any Powerbuilder application and using this component really makes it easier to migrate a PB application.
In my following post I will describe examples using the Datawindows.NET component to migrate some PB samples.
For more info on DataWindows.NET

Component Services and one of those weird small things

5. September 2006 04:46 by smurillo in General  //  Tags:   //   Comments (0)

While Jose was testing a Lab I have been working on, he found himself getting an error I wasn't expecting. The exercise requires for the user to change the Default Impersonation Level on the computer where an application will access COM object using the Impersonate level. So, it is kind of simple, the exercise described how to access Component Services, go to the Computer's Properties and change the Default Impersonation Level; after which it should be sufficient to click on the OK button and suppose Component Services has made the change by then. Think again!

Well, what I can tell you is that at least in a Windows XP Professional Edition running on a Virtual Machine using Virtual Server 2005 R2, you get one of these errors that you would probably never notice, but if it came up, it could drive you insane. Component Services doesn't register the change until you do something else inside the Component Services windows, after you click on the OK button; anything at all: click on an icon, navigate the tree, close the application, whatever you want, but you will need to do something that triggers an event. Once you do that, you are good to go.

Visual Studio unattended install

4. September 2006 14:55 by Jaguilar in General  //  Tags:   //   Comments (0)

If you ever do a Visual Studio .NET 2005 unattended install, you’ll notice that the installation reboots the machine several times and won’t continue until you log back in – defeating in part the purpose of the UNATTENDED install.

Well, this page over at Aaron Stebner's WebLog has some instructions that can help you make your installation REALLY unattended. It requires two things: first, remove some pre-requisites that end up on the vs_2005.ini files regardless of what you do (instructions here), and second, create a batch file that installs both the prerequisites and VS.NET. This is the code in the batch file for the unattended install on x64 boxes (run it from the VS dir):

wcu\msi31\WindowsInstaller-KB893803-v2-x86.exe /quiet /norestart
wcu\dotNetFramework\x64\netfx64.exe /q:a /c:"install.exe /q"
wcu\DExplore\DExplore.exe /q:a /c:"install.exe /q"
setup\setup.exe /unattendfile vs_2005.ini

For other machines, you may need to change the architecture of the .NET framework for the correct one (x86/x64). I made that batch file for an unattended install a few months ago at a 64–bit event where I had to install Visual Studio in around 30 machines, and it worked like a charm. YMMV

Excellent tip... Mounting a .VHD by double clicking on it

4. September 2006 04:29 by Jaguilar in General  //  Tags:   //   Comments (0)

Last Friday on the Virtual PC Guy's WebLog,  Ben Armstrong, Virtual Machine program manager at Microsoft, posted a registry code snippet to mount vhd files by double clicking on them, and dismount them by using the right-click menu. You can get the code from here. I also recommend that you check out VPC guy’s blog every once in a while – his posts are always useful and interesting.

What's good about VHD Mounting?

4. September 2006 03:48 by smurillo in General  //  Tags:   //   Comments (0)

Microsoft uses and supports their VHD (Virtual Hard Disk) format on their virtualization products: Virtual PC and Virtual Server. You can get full access to the detailed specification online by signing the Virtual Hard Disk Image Format Specification License Agreement.

As you may have heard, Virtual Server 2005 R2 SP1 BETA2 (quite a name) is out now (read Jose Aguilar's post on it for more details) and it includes Offline VHD mounting. This feature was already planned to be included in System Center Virtual Machine Manager, but it is sure nice to get it now with Virtual Server. So what is the big deal about this? What Offline Mounting does is, it lets you mount your VHD files as if they were real drives on your server and it lets you do all the reading and writing you want.

Before this very handy feature existed, if you wanted to copy some files from or to your VMs you would have had to create a virtual machine, link it to the VHD, run it, and use the Virtual Network to make the transaction between the server and the VM. With Offline Mounting this task becomes quite a lot easier and you can skip a few of those in between steps. You can access Brian A. Randell's blog for more details on how to do this.

In the end, Offline VHD Mounting is all very nice but some of you may have noticed it brings up a bigger possibility, Offline Patching. If you have a company and you want to cut expenses on your Disaster and Recovery Sites this is a topic that should really gain your attention. Microsoft is definitely using Offline VHD Mounting as a message that they are heading towards an Offline VM Patching solution (Microsoft has hinted about this on a few ocattions). Since Microsoft's Virtualization Licensing policies only charge for those VMs that are actually running, you can picture the economic impact this is going to have in the future, your Back-up sites will not even have to run unless a disaster does happen.

Offline VHD Mounting is not just a nice new feature that will help you speed things up, it is also Microsoft's announcement on what's to come!

Vista RC1 Completed

1. September 2006 13:09 by Jaguilar in General  //  Tags: ,   //   Comments (0)

Windows Vista RC1 was completed today. From the Windows Vista Team Blog:

It’s official — Windows Vista RC1 is done!
...
You’ll notice a lot of improvements since Beta 2. We’ve made some UI adjustments, added more device drivers, and enhanced performance. We’re not done yet, however — quality will continue to improve. We’ll keep plugging away on application compatibility, as well as fit and finish, until RTM. If you are an ISV, RC1 is the build you should use for certifying your application.

Right now it is only available for customers on the TAP program, but according to a post in the forum, they plan to make it available to MSDN and Technet subscribers.

Volume Shadow Copy Service and Virtual Server ... what's in it for me?

31. August 2006 12:01 by Jaguilar in General  //  Tags:   //   Comments (0)

One of the features available in the latest Beta of Virtual Server 2005 R2 SP1 is the support for the Volume Shadow Copy Service (VSS). VSS is a feature of Windows 2003 server that takes “snaphots” of files, and allows you to quickly create a backup copy of a volume.

For an application to support VSS, it needs to get to a consistent state, freeze, and the perform the shadow copy. Once the shadow copy is created, the application thaws and resumes operations. If an application does not have a VSS provider, VSS cannot guarantee that the resulting shadow copy will be consistent. That is one of the best features of this technology – the actual applications (called “Writers” in VSS-speak) are involved in the creation of the shadow copy, so they can verify that whatever goes into the copy can be later restored without any problems.

By supporting VSS, backup programs (“Requestors”) can now tell Virtual Server that a backup is going to take place. Virtual Server can then make sure that the Virtual Machines are in a consistent state (I”m not sure if it suspends the VMs – I’m currently in the process of finding out that information), and tell the requestor that it is ready for the copy. According to the documentation, creating a shadow copy is very fast – for large volumes I’ve heard numbers of around 30 seconds to 4 minutes. This can also work for quickly cloning a Virtual Server host to another server, so that VMs can resume operations very quickly even if the system goes down.

Virtual Server 2005 R2 SP1 BETA2 is out

30. August 2006 22:00 by Jaguilar in General  //  Tags:   //   Comments (0)

You can now download Virtual Server 2005 R2 SP1 BETA2 from http://connect.microsoft.com. As with other beta software, you need to register for the beta first.

This release is pretty significant because it is the first version to support both AMD-V and Intel-VT hardware virtualization. From the release notes, it includes:

  • AMD Virtualization (AMD-V) compatibility
  • Intel Virtualization Technology (IVT) compatibility
  • Volume Shadow Copy Service support
  • Offline VHD mounting
  • Active Directory integration using service connection points
  • Host Clustering technical white paper

The best part is that you can upgrade existing installations very easily:

VSUPGRADE

I just upgraded my 32–bit workstation, and everything is working like a charm.

OT: What to do in case of an accident in the USA

29. August 2006 16:11 by Csaborio in General  //  Tags:   //   Comments (0)
On a completely non-technical note, I thought I'd share with my fellow colleagues (and anyone who searches for this info), what to do in case of a car accident in the United States.

See, in Costa Rica, whenever you are in a car accident, you leave your cars as they are until the police officer decides to drop by.  This is mainly done because in Costa Rica, many people drive without insurance, so they will go any length in trying to avoid to pay for the damages they have done.   The only way to get them (guilty counterpart) to pay is by having the cop see the accident scene as  it happened and then settle in court.  This, of course, leads to massive traffic when an accident happens.

Anyhow, back to the accidents in the US story.  I had the (dis) pleasure of being in an accident last Saturday in Boston.  I had the honor of being crashed by none other than "Paul from Revere", on his slightly big tank car.  Here is what they look like:






Yeah, that's right, the amphibious tank smacked me real good and left quite some damage on my rented car:




So here is what you need to do if ever on an accident in the US:

  1. Move your car out of the way to avoid traffic congestion (your inner Costa Rican conscience will make it very hard to accomplish this task).
  2. Find out if everyone is alright, call 911 otherwise 
  3. You need to find out the following info from the driver who crashed your car: Name, Address, Company, Insurance Company, Insurance Claim Number
  4. Write down the time and street name where the accident happened
  5. Write down the names and numbers of some witnesses around who can corroborate what happened
Once you have collected this info, call your company insurance and file a claim.  You will also need to file a report in the accident form that is usually found in the glove compartment of your rented car.

Hope this helps someone in the future!


Documentation on Best practices for Virtual Server

29. August 2006 11:48 by Jaguilar in General  //  Tags:   //   Comments (0)

When you make a Virtual Server deployment, make sure that you follow Microsoft’s recommended Best practices for Virtual Server. They can improve the performance of Virtual Server installations, and make your life as a system administrator easier.

One important thing that many people overlook when creating multiple VMs is the importance of using Sysprep. I wrote a quick walkthrough here, and you can find documentation on Microsoft’s website about it as well. Sysprep makes sure that each cloned virtual machine will be unique – not using it may introduce security and performance issues in your network.

Error while linking a C++ Application with Virtual Server

29. August 2006 05:51 by Csaborio in General  //  Tags:   //   Comments (0)
While trying to build a C++ application that tried to use the library from Virtual Server library VSComInterfaces.lib, we were getting a linker error that had us baffled for quite some time:

Error     1          error LNK2001: unresolved external symbol _IID_IVMVirtualServer  EnumVMs.obj    
Error     2          fatal error LNK1120: 1 unresolved externals          H:\Virtua\M01\Exercise-6\VMListing\Debug\VMListing.exe          

Searching for an answer in various search engines, only lead us back to where the example source code had originated:  http://windowssdk.msdn.microsoft.com/en-us/library/ms699581.aspx

We had no idea what was going on...we had brought the library from the C:\Program Files\Microsoft Virtual Server\Documentation directory from the server...the server...the x64  server!!!!

A quick check using dumpbin displayed the following info on the lib:


FILE HEADER VALUES
            8664 machine (x64)
               3 number of sections
        43589BDA time date stamp Fri Oct 21 00:42:18 2005
             57D file pointer to symbol table
              47 number of symbols
... 


We quickly compiled to 64-bit to see if the 64-bit library was indeed the culprit.  The app compiled without any problems!!

Bringing over the 32-bt lib file from a 32-bit Virtual Server allowed us to create the 32-bit version of the application and everything is back to normal.

Hopefully someone will find this post if they ever encounter the same problem in the future.

Reading Virtual Server's performance counters from .NET

29. August 2006 01:55 by Jaguilar in General  //  Tags:   //   Comments (0)

This code allows you to retrieve the information for Virtual Server’s performance counters from C#. It reads both the Virtual Machines and Virtual Processors counters.

 

   1:  PerformanceCounterCategory vmCat =
new PerformanceCounterCategory("Virtual Machines");
   2:              PerformanceCounterCategory vpCat = 
new PerformanceCounterCategory("Virtual Processors");
   3:  string[] vmInstances = vmCat.GetInstanceNames();
   4:  string[] vpInstances = vpCat.GetInstanceNames();
   5:   
   6:  List<PerformanceCounter> countersList = 
new List<PerformanceCounter>();
   7:  
   8:  foreach (string instance in vmInstances){
   9:  PerformanceCounter[] counters =
vmCat.GetCounters(instance);
  10:  foreach (PerformanceCounter pc in counters)
  11:  {
  12:              countersList.Add(pc);
  13:  }
  14:  
  15:  foreach (string instance in vpInstances)
  16:  {
  17:              PerformanceCounter[] counters =
vpCat.GetCounters(instance);
  18:              foreach (PerformanceCounter pc in counters)
  19:              {
  20:                          countersList.Add(pc);
  21:              }
  22:  }
  23:   
  24:  while (true)
  25:  {
  26:              System.Threading.Thread.Sleep(1000);
  27:              foreach (PerformanceCounter pc in countersList)
  28:              {
  29:                          Console.WriteLine(
                                  "{0}:\"{1}\" Counter:{2} Value:{3}",
                                  pc.CategoryName, pc.InstanceName,
                                  pc.CounterName, pc.NextValue());
  30:              }
  31:  }

Differences bewteen Virtual Server and the Hypervisor

25. August 2006 04:03 by Csaborio in General  //  Tags:   //   Comments (0)
When working with these labs, people who have heard about the hypervisor integration
usually ask what is going to be different between the hypervisor and the current offerings or Virtual Server 2005 R2 Beta. In this link, you an find extensive information about the difference between them, but of special interest is the table below:


Virtual Server 2005 R2
Windows Server Virtualization
32-bit VMs
Yes
Yes
64-bit VMs
No
Yes
Multi-processor VMs?
No
Yes, up to 8 processor VMs
VM memory support?
3.6 GB per VM
More than 32 GB per VM
Hot add memory/processors?
No
Yes
Hot add storage/networking?
No
Yes
Can be managed by System Center Virtual Machine Manager?
Yes
Yes
Cluster support?
Yes
Yes
Scriptable/Extensible?
Yes, using COM
Yes, using WMI
Number of running VMs?
64
More than 64. As many as hardware will allow.
User interface
Web Interface
MMC 3.0 Interface

This table only goes to show that Microsoft’s Virtualization strategy in the future will offer a lot more than Virtual Server. Keep in mind that these features will be available about 180 days after Windows Longhorn Server ships, so until then, we will just have to sit back and watch these long awaited features with a lot of patience.

Paravirtualization and Xen

25. August 2006 03:57 by Jaguilar in General  //  Tags:   //   Comments (0)

Another virtual machine product that has been making a lot of noise lately is Xen, the open source project from Xensource. Xen uses a different  approach to virtualization than Virtual Server, called Paravirtualization. In this type of virtualization, the guest OS has to be modified to work with a software interface to the Virtual Machine Monitor, instead of thinking it is running on the hardware. The thing is that this actually enables better performance of the Guest OS, as it aware that is running on a virtual machine environment. Xen also supports running unmodified OSes, but for that it is mandatory to have hardware virtualization (VT-x on Intel or SVM on AMD CPUs).

The next releases of Windows Virtualization are implementing a similar approach. It will still be pure virtualization, but the Guest OS will also be enlightened. What this means is that the Guest OS will be aware that it is running on a VM, so it will be able to increase the performance using a modified kernel. The best part about all this is that Microsoft and Xensource are actually working together to make sure that the technology included with Windows Virtualization will be compatible with the technology used in Xen. So, at the end, we, the customers, win.

Intellisense in VS

22. August 2006 06:53 by Mrojas in General  //  Tags:   //   Comments (0)

If you would like to edit XML files in Visual Studio and use intellisense, this is what you have to do:

Locate your schema, then copy it to C:\Progam Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml.

Then open your XML document and reference the schema by its namespace URI in the root element.

If you want to automate the update of your schema files the use scripting on the Visual Studio's OnStartupComplete event.

 

Adding a duplicated computer to the domain

18. August 2006 11:47 by smurillo in General  //  Tags:   //   Comments (0)

We at the virtualization team, have been creating copies of a virtual machine to use them as workstations that will be grouped into a domain. The only problem is that the original virtual machine was not syspreped and apparently this is creating problems joining the domain; this can be seen when new users can not log in the new virtual machine.

One quick and easy way that we have found helpful to fix this is changing the name of the computer (to avoid the duplicated name) and moving it to a temporary workgroup at the same time (we couldn't get to rename otherwise). Then we just made the computer reboot, and then moved it back to the domain, and reboot again. After that, it worked just fine.

Let Your Script Choose It's Host

18. August 2006 06:50 by smurillo in General  //  Tags:   //   Comments (0)

When you are creating scripts to be executed by the Windows Scrip Host, you know there are two applications that could host your script: WScript which is a GUI host or CScript which is a console based host. By default Windows uses WScript, but you can change the default host with a simple command wscript //H:WScript will set WScript to be the default host, and wscript //H:CScript will set CScript to be the host.

But what happens if you don't want to get such an ultimatum for all of your scripts. Wouldn't it be nice if you could make your script choose it's own host? I asked my self that question and found this VBScript code online (I couldn't find the original source):

' Forces this script to be run under the desired scripting host.
' Valid sScriptEng arguments are "wscript" or "cscript".
' If you don't supply a valid name, Force will switch hosts.
Sub Force(sScriptEng)
 If Lcase(Right(Wscript.FullName, 12)) = "\wscript.exe" Then
  If Instr(1, Wscript.FullName, sScriptEng, 1) = 0 Then
   'Need to switch to CSCRIPT
   CreateObject("Wscript.Shell").Run "cscript.exe " & Chr(34) & Wscript.ScriptFullName & Chr(34)
   Wscript.Quit
  End If
 Else
  If Instr(1, Wscript.FullName, sScriptEng, 1) = 0 Then
   'Need to switch to WSCRIPT
   CreateObject("Wscript.Shell").Run "wscript.exe " & Wscript.ScriptFullName
   Wscript.Quit
  End If
 End If
End Sub

All you need to do is call this procedure at the beginning of your script and it will be ready to go. So, for example:

Force "cscript"

will force your script to run on the CScript host. A wrong parameter will just force the script to run on the opposite host.

Set your scripts free!

Who says you can't expand VHDS?

17. August 2006 12:36 by Csaborio in General  //  Tags:   //   Comments (0)
It is a well known fact that dynamic VHDs that reach their limit cannot be made any bigger when running in Virtual Server.  I recently stumbled onto this problem when creating a differentiating disk from a base install of a dynamic disk of Win2K3 with 2 GB tops space.  I had two choices at this point:

  1. Create a new VHD and install everything I had done
  2. Try to find a way to expand the VHD with whatever hack came to my mind.
Being the stubborn person that I am, I decided to follow the latter.

The good news is that i t can be done - the bad news is that it may be a bit of an overkill!  Anyhow, here is what you need:

  1. A BartPE ISO that has some kind of imaging utility (ours has Ghost and TrueImage - amazing programs!)
  2. A fixed empty VHD that will fit the image of the disk you are trying to expand
  3. Lots of patience
Step 1: Image the Image

  1. Add the BartPE.iso as an additional CD-ROM Drive
  2. Add the empty VHD (let's call it images.vhd) as an additional VHD
  3. Boot your PC, it should boot from the CD and Bart-PE should start
  4. Format images.vhd into an NTFS drive using whatever you want
  5. Create an image of your source disk (the one you are trying to expand) and place it on the images drive
Step 2: Restore the Image

  1. Create a new VM configuration with a new VHD that will hold the new size (format it as NTFS with any utility you like)
  2. Add the BartPE.iso as an additional CD-ROM Drive
  3. Add the images VHD as an additional VHD
  4. Boot your PC, it should boot from the CD and Bart-PE should start
  5. Use Ghost or whatever you want to restore from the Image from the Images.vhd
Reboot.  Enjoy!

UrlRewriting Library for Asp.Net 2.0

15. August 2006 11:28 by Mquiros in General  //  Tags:   //   Comments (0)

Checking ScottGu's Blog the other day, he pointed to some useful links, I specially like the UrlRewriting library, I'm considering using it so wait for updates for my experience with it. I recommend to check that library it looks really good.

Via ScottGu's Blog

UrlRewritingNet.UrlRewrite V2.0 Released: Albert Weinert sent me mail on Friday pointing me at the new release of the UrlRewriting engine that he and Thomas Bandt wrote for ASP.NET. It is available as a free download and includes samples + full source code.

Categories