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.

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!

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)
  End If
  If Instr(1, Wscript.FullName, sScriptEng, 1) = 0 Then
   'Need to switch to WSCRIPT
   CreateObject("Wscript.Shell").Run "wscript.exe " & Wscript.ScriptFullName
  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!

Remote Virtual Server Object

11. August 2006 05:53 by smurillo in General  //  Tags:   //   Comments (0)

We, here at the virtualization team, have been digging around and testing some of the development options you have for the automation of virtualized environments.

Developers might be waiting for that famous Microsoft Hypervisor that will be available with Windows Server "Longhorn". In the meantime, there are still tools you can use. The Virtual Server COM API is one of them.

You can instantiate this object on a local server where Virtual Server is up and running and you can then have access to its properties and procedures. But if you want to develop something a bit more dynamic you might be interested on creating a centralized management tool for a group of Virtual Servers. This can be accomplished by initializing the Virtual Server Object remotely. Learn more about this by accessing the Virtual Server Programmers Guide, included in your Virtual Server installation.

What I want to point out on this entry is that if you are planning to use the remote access, beware you are going to need your Virtual Server on the same domain where the application is running, or as a difficult alternative you can set up a trusted link. Also, the user executing the code must be added to the Administrator's group on the remote Virtual Server. Failing on doing this will lead to runtime security issues that will simply prevent the object from having access to the remote server.

Unlimited virtualization not only for Longhorn anymore

19. July 2006 09:55 by smurillo in General  //  Tags:   //   Comments (0)

Microsoft first announced on October 10, 2005 that Windows Server "Longhorn" Datacenter Edition would give customers the right to run an unlimited number of virtual instances on a physical server. At the same time they said that with a single license of Windows Server 2003 R2 Enterprise Edition, customers could now run up to four virtual instances. You can access the full press pass here.

That was a significantly good announcement for customers. Those who use Windows Server 2003 R2 Enterprise Edition would get to try the benefits of virtualization. If it became necessary to run more than four instances they could eventually give into temptation and look for an expansion by purchasing the Windows Server "Longhorn" Datacenter Edition. Good strategy!

On July 12, Microsoft decided to improve this offer and shock the customers a bit more, and then some more. Starting October 1, 2006, new servers licensed with Windows Server Datacenter Edition would be entitled to run an unlimited number of virtualized Windows Server instances, including Standard, Enterprise and Datacenter Editions. Multiply them and mix them up as you wish.

This is not the only change made by Microsoft in order to promote their Windows Server Datacenter Editions. Want to know what else they did? Read the full announcement here.