Live Writer sample post

15. August 2006 06:44 by Jaguilar in General  //  Tags: ,   //   Comments (0)

The Windows Live team recently launched the Live Writer tool for writing blog posts. This is a sample post made with the tool. So far, it looks nice, with most features already working.

One of the nicest features is Live Map integration:


San Jose, Costa Rica

I think I am going to stick with Blogjet for the time being (especially for the flickr integration). But it won't harm you to check out Live Writer as well.

Virtualization 101 for IT

11. August 2006 08:09 by Csaborio in General  //  Tags:   //   Comments (0)
Without a doubt, Virtualization is the tech buzz word for this year.  Every newsletter I receive has a link to at least 3 VT sites.  Recently I stumbled on this entry which is a podcast by Dean Wells, who does a great job explaining what IT should consider nowadays when making computer purchases. 

I think many IT departments are blindly making purchases of hardware that do not support VT technology.  What they don't know is that the moment they purchase this new equipment, they are pretty much buying outdated equipment.  Mr. Wells does an amazing job explaining what IT departments should strive for when making these types of decisions, it is definitely worth a listen.

Copy and Paste from Host VM to Guest VM (and vice-versa)

11. August 2006 06:08 by Csaborio in General  //  Tags:   //   Comments (0)
I have to admit I was a bit shocked when I tried to copy and paste text between VMs using Virtual Server.  The clipboard was not copied at all and there was no easy way to transfer text back and forth.  I tried installing the Virtual PC Additions and still no luck.  I could not believe they left out a feature like this one out - I don't know if enabling this is trivial using some super secret setting, but until then, here is a workaround.

It is actually quite simple, and it was Stephen who hinted me on this while I was ranting.  On the host machine, enable Remote Desktop Connections and connect using a RDC client.  You will be connecting to the VM just like any other mahine, and RDC supports copying and pasting of text back and forth.

Not the best solution, I know, but it gets the job done.  It is also worth noting that the same problem happens with VMWare's VM player.

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.

Virtual Server, WMI and C#

11. August 2006 00:18 by Jaguilar in General  //  Tags:   //   Comments (0)

This code snippet allows you to connect to a remote instance of Virtual Server 2005 R2, via WMI, and retrieve all the Virtual Machine WMI objects.

   1:   
   2:  System.Management.ConnectionOptions co = 
   3:      new System.Management.ConnectionOptions();
   4:  co.Username = user;
   5:  co.Password = password;
   6:   
   7:  ManagementScope scope = new ManagementScope(
   8:      new ManagementPath(@"\\"+computer+
            @"\root\vm\virtualserver"),co);
   9:   
  10:  scope.Connect();
  11:  SelectQuery oq = 
  12:      new SelectQuery("SELECT * FROM VirtualMachine");
  13:   
  14:  ManagementObjectSearcher searcher =
  15:      new ManagementObjectSearcher(scope, oq);
  16:   
  17:  foreach (ManagementObject queryObj in searcher.Get())
  18:  {
  19:       //Do something
  20:  }
 

You need to provide a user and password with enough credentials to query the Virtual Server instance.
BTW, if you ever need to format your code for display on the web, check out this website.

HP and Intel Developer Workshops - Boston

8. August 2006 18:14 by Jaguilar in General  //  Tags:   //   Comments (0)

There’s a new HP and Intel Developer Workshops coming up in a couple of weeks. This one is going to be in Peabody, MA (close to Boston), between August 22–24. We will be teaching some of the lectures in the 64–bit Windows track.

These workshops provide a great opportunity for you to get hands-on experience on Itanium machines. We will also have open lab time so you can start porting your application to the architecture – and remember that we are going to be around to help you with your efforts.

Microsoft Kills Virtual PC

7. August 2006 15:44 by Csaborio in General  //  Tags:   //   Comments (0)
What?!?  Kill VPC?  A few weeks ago they announced they would give it away for free and now they are ceasing production...does not make sense, does it?

Well, if I add a "for Mac" at the end of the my Blog title it probably makes a lot more sense, doesn't it?  ;) Today the Mac community learned the pleasant surprise that VMWare is going to be releasing a Virtualization solution for Intel Macs.  On the same day, we also find out that Virtual PC for the Mac is going bye-bye :(

While this means that many PPC Macs will be left out in the cold without a way to emulate Windows, I understand where Microsoft is coming from.  Catching up where Parallels is right now in terms of VT support on the Mac would really take a while, and they would basically be starting from square one.  I can't wait to see what VMWare has up their sleeve...beating Parallels in the Virtualization market on Intel Macs is certainly a tough challenge.

Tool for creating MSDN-style documentation from .NET code

7. August 2006 13:47 by Jaguilar in General  //  Tags: ,   //   Comments (0)

One nice features of the JLCA is that it converts javadoc-style comments into the corresponding .NET XML comment. Well, a new tool was released a few weeks ago that can take .NET’s XML documentation and create nice looking files. It is called Sandcastle, and is currently a CTP download. It can create .html files from the source code, which can be processed with the HTML Help Workshop to generate a .chm file. It also has a Visual Studio Add-in that makes the process really easy.

You can download the CTP here, and read all about it in the Sandcastle team blog.

Yes!! Virtual Machine Manager (aka Carmine) available for download

7. August 2006 12:15 by Jaguilar in General  //  Tags:   //   Comments (0)

Carmine” (System Center Virtual Machine Manager (SCVMM) Beta 1) is available for download! You first need to register for the beta at http://connect.microsoft.com, and then login into http://connect.microsoft.com/vmm/downloads with your passport Id.

I just finished downloading it and will start playing with it soon. Too bad that calling into VMM from Powershell and the functionality to convert from a physical machine to a virtual machine are not included in this beta.

Virtualization

7. August 2006 08:53 by Mrojas in General  //  Tags:   //   Comments (0)
Some people here in Artinsoft is doing a great deal of work around virtualization. You should check out their posts.
I was preparing a test environment for an application and I needed to run my check in tests in several versions of windows and I found this article

Program Customized Testing Environments Without Trashing Your Machine 

which has been of great help for me in setting up a virtual test lab. I really recommend it. After you read it you will figure out great new test environments.
Like database tests. where you setup a virtual disk with your database, or diferrent images with diferent driver versions.

Good Luck!

AS400 from .NET

4. August 2006 05:19 by Mrojas in General  //  Tags:   //   Comments (0)

You might encounter certain scenarios where you have either VB6 applications that used information from an AS400 box or new .NET applications that need to get information in or out the AS400 box.

Usually this is done by creating RPG programs that generate plain text files that are transfered to PCs and processed by the VB6 or VB.Net application.

But would't it be great to access the AS400 directly, perform queries, execute programs, even use the AS400 users print jobs and other services.

IBM has a project call JTOpen, this is an open source java implementation of objects that allow you to access the AS400 box.  http://www-03.ibm.com/servers/eserver/iseries/toolbox/downloads.html

So why is this useful to you? This is in Java, what help could it give you? Because there is another interesting project called  IKVM.
I already posted about this project see  my post on IKVM  for more details.
With IKVM you can generate an assembly and use it in your projects.
You can start using this functionality directly in any of your VB.NET or C# projects.
If you have a VB6 applications, what are you waiting for: upgrade it now to VB.NET or expose this functionality thru a simple COM object and use it in VB6.
I'll post about this technique one this days.

And now enjoy accessing your AS400 from .NET

Regards

Taken Advantage of Java Open Source in .NET

4. August 2006 04:56 by Mrojas in General  //  Tags:   //   Comments (0)

We must recognize that there is a great amount of Java Open Source projects. It would be great to have access to all that code also in .NET but sometimes the migration of that functionality can take a while and you just need it right away.

For simple things you can use the J# implementations, and share your assemblies with C# and VB.NET applications. For medium things you might also think in using the JLCA so you will get a C# implementation ;) but some big projects could take more time that what you have available or taking a long time just does not worth it.

Well some guys have an superinteresting project. It is called IKVM. It allows you to compile your Java projects for .NET. IKVM.NET is an implementation of Java for Mono and the Microsoft .NET Framework.

This is an extract from their site http://www.ikvm.net/index.html:

Use Java libraries in your .NET applications

IKVM.NET includes ikvmc, a Java bytecode to .NET IL translator. If you have a Java library that you would like to use in a .NET application, run ikvmc -target:library mylib.jar to create mylib.dll.

For example, the Apache FOP project is an open source XSL-FO processor written in Java that is widely used to generate PDF documents from XML source. With IKVM.NET technology, Apache FOP can be used by any .NET application.

Develop .NET applications in Java

IKVM provides a way for you to develop .NET applications in Java. Although IKVM.NET does not include a Java compiler for .NET, you can use the open source Jikes compiler to compile Java source code to JVM bytecode, then use ikvmc -target:exe myapp.jar to produce a .NET executable. You can even use .NET API's in your Java code using the included ikvmstub application.

So if there was a Java Project that you were crying to use, stop now, wipe your tears and start using IKVM now.

Regards

.NET and the Virtual Server 2005 COM API

3. August 2006 09:00 by Jaguilar in General  //  Tags:   //   Comments (0)

Accessing Virtual Server’s COM objects from .NET is not as direct as just including the references to the COM classes. In order to instantiate to the Virtual Server object, you need to have the proper COM permissions. For Virtual Server, the required impersonation level must be Impersonation or higher.

There are two ways to achieve this:

  1. The first one is to use Component Services to change the Default Impersonation Level to Impersonate. To do this in the Component Service console, go to Computers->My Computer->Properties, and the setting is in the Default Properties tab. This has obvious security implications, though.
  2. The second method is to do it programatically. This can be a bit painful if you’re not familiar with COM and COM Security. You have basically two options:
    • Use the method described in the Virtual Server Programming Guide, that you can find here: .
    • You can also use an alternative method, described by Virtual PC Guy in his blog as a solution to connect to Virtual Server from Powershell. You can check the link to review the code, which consists in using the CoSetProxyBlanket function, that according to the documentation “Sets the authentication information that will be used to make calls on the specified proxy.” Implementing a class similar to the one described on the linked page should work and is much simpler than the recommended approach descrbied in the Programming Guide.

Virtual Server Script Center repository

2. August 2006 10:01 by Jaguilar in General  //  Tags:   //   Comments (0)

Scripting allows you to automate common tasks very easily, even if you’re not an experienced developer. One of the best resources for scripters in the Windows world is definitely MSDN Technet’s Script Center. If you’re looking for common scripts, chances are you’ll find one there, or one that you can quickly modify to suit your needs. There’s a large selection of scripts that have to do with Virtual Server – from automatically installing Virtual Machine additions, to modifying the properties of a Virtual Machine. You can check out the complete list here: Virtual Machine and Virtual Server Properties

Running scripts on a remote Virtual Server installation

2. August 2006 09:46 by Jaguilar in General  //  Tags:   //   Comments (0)

If you need to connect to a Virtual Server 2005 installation to execute remote scripts, because of security, you can do one of two things. The first one is to use the “ConnectServer” method in your scripts, in order to provide the necessary credentials to connect to the server. To do this, you should have these lines on your script:

Set objWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objwbemLocator.ConnectServer(<Computer>, "\\root\vm\virtualserver", <user>, <password>)

Then you can use the normal methods to query the information from Virtual Server

The second one is to configure the Virtual Server DCOM object so that it allows a remote connection. This has obvious security risks, but can be configured so that only certain groups have the necessary priviledges to execute the code. To do this, you first need to open the Component Services console, and navigate to the node Console Root->Component Services->Computer->My Computer->DCOM Config. There, you need to locate the Virtual Server node, and select properties from the context menu:

DCOM1

On the properties page, go to the Security tab, and you need to customize the permission on the Launch and Activation Permissions box by clicking Edit…:

DCOM2

On that page, you can add groups or users that will be able to launch or activate Virtual Server’s COM objects, as well as fine-tune what each user will be able to do:

DCOM3

This second approach works better with servers that are in an Active Directory domain. On a stand-alone machine, the remote host may have issues providing the credentials to obtain the remote activation and launch permissions required.

Something like sprintf in C# or VB.NET

31. July 2006 11:11 by Mrojas in General  //  Tags: , , ,   //   Comments (0)

Recently I was wondering how to format  an output string like I used in C or C++ where we had the infamous and powerful sprintf but I could not find a good refence until I found this page.

http://blog.stevex.net/index.php/string-formatting-in-csharp/ I think it will be very useful to print it and have it close as a good cheat code sheet.

 

WMI and Virtual Server 2005

28. July 2006 09:50 by Jaguilar in General  //  Tags:   //   Comments (0)

WMI (Windows Management Instrumentation) provides a mechanism to manage systems and applications in an enterprise environment. WMI is actually Microsoft’s implementation of Web Based Enterprise Management (WBEM), a unified mechanism used for managing networks.

With the release of Virtual Server 2005, Microsoft included new classes in WMI in order to manage and monitor VS2005 installations. These classes are represented through a namespace, in this case //root/vm/virtualserver. So, if you are new to WMI and Virtual Server, what can you do with this information?
Let’s start off by introducing you to two tools that can get you started.

The first one is WMI Explorer, a free tool from KS-Soft, that can show you the available classes and methods in a WMI namespace. When you first start up the application, you’ll see a class explorer that shows you all the classes available in the default namespace, root\cimv2 (CIM stands for Common Information Model, the data model of the WBEM standard). To connect to a different namespace, you need to select Action->Connect to Remote Host… , and then enter Virtual Server’s namespace:

wmi1

You can also enter the address of a remote host to connect to a remote instace of Virtual Server. Keep in mind that you need to enter a user with enough privileges.
Once you press enter, you’ll be presented with Virtual Server’s classes. Of particular interest are the last four: VirtualMachine, VirtualNetwork, VirtualServerProvider and VmWmiObject:

wmi2

With these four classes you can access virtually all information about a Virtual Server installation. Double clicking on them in WMI Explorer will show you all of its properties and the current state.
With this information, what things can you do? Well, that’s where the second tool comes into play. It is called Scriptomatic 2.0,  a WMI utility you can download from Microsoft’s website that helps you write WMI scripts. When you open this tool, you first need to select the correct WMI namespace:

wmi3

And after that, you can select any of the WMI classes declared within that namespace, and that will write a basic script for you that queries the class:

wmi4

Based on it, you can start querying the VMs, the Virtual Networks, the status of the server, etc… and you can even run the scripts from within Scriptomatic. From this point on, you can start exploring the information you can query, and write your own WMI scripts!

HP virtualization support for Itanium

27. July 2006 09:50 by Jaguilar in General  //  Tags: ,   //   Comments (0)

Last I week I posted about the Itanium 2 9000 Series being launched with hardware virtualization support (what was formerly known as Silvervale). I also mentioned that neither Windows 2003, Virtual Server, nor Longhorn will support virtualization on this platform. That much is true from Microsoft’s perspective, but HP is indeed planning to support Windows 2003 Server through its Virtual Server Environment.

The Virtual Server Environment has been available for a while, and also has an enterprise-class management tool in the HP Integrity Essentials Virtualization Manager. This is currently available for HP-UX, but will also be available for Linux and Windows in the near future. The Virtualization Manager has some interesting features, and is also integrated with HP’s Serviceguard product. From last month’s press release:

... For example, customers can use the capability to automatically allocate additional server capacity to financial applications during the month-end close.

For customers that are concerned about the availability of their mission-critical UNIX® environments when they consolidate using virtualization, HP has further integrated HP Serviceguard for HP-UX 11i with HP Integrity Virtual Machines. Available now with the latest release of HP Serviceguard, this functionality helps guard against failure by automatically moving the virtual machines between servers in a VSE. HP Integrity Virtual Machines also now enables easy manual migration of virtual machines, accelerating application qualification and deployment....

 Keep in mind that HP also offer Node Partitions (nPars) and Virtual Partitions (vPars) options on the high-end Integrity and 9000 lines of servers, with Instant Capacity on Demand (iCOD) capabilities. Depending on your requirements, these may be even better options than virtual machines pure virtual machines.

Install Virtual Server R2 SP1 on Longorn Server

24. July 2006 03:42 by Csaborio in General  //  Tags:   //   Comments (0)
Usually when you install a beta OS with a beta productivity app, things can go wrong, or at least that's what you expect. That was exactly what I thought when I tried to install the latest beta of Virtual Server on Longhorn Beta. I got an error telling me that I did not have IIS installed and could therefore could not install Virtual Server. After reading the an old blog entry from the Virtual PC Guy's weblog (this guy gets paid to test old games ;), the soulution is simply to install ALL the IIS 6 Management Compatibility components and you are good to go:



...welll...as far as installing goes. I am now having problems with other things for which I hope to post the solution pretty soon...ah the beauty of beta software!!

Sending Mail via MAPI using Outlook Office in 64-bits

23. July 2006 17:05 by Csaborio in General  //  Tags:   //   Comments (0)
We recently received an interesting mail detailing the problems faced when using MAPI to send mail via Office Outlook Express. Here are the symptoms (try and see if you can figure it out by the end of the post):

1. When using MAPI calls in a 32-bit application when Outlook Express is the default e-mail handler, the application creates a blank message (success)
2. When using MAPI calls in a 64-bit application when Outlook Express is the default e-mail handler, the application creates a blank message (success)
3. When using MAPI calls in a 32-bit application when Office Outlook is the default e-mail handler, the application creates a blank message (success)
4. When using MAPI calls in a 64-bit application when Outlook Express is the default e-mail handler, the application does not create a blank message (failure). When the program ran and tried to create an e-mail, the Outlook Express connection wizard showed up.

After comparing registry entries for hours trying to find why Office Outlook was not being recognized as the default e-mail client and why Outlook Express was, it then hit me. There is a 64-bit version of Outlook Express on every 64-bit Windows install, that is why scenarios 1 & 2 above were working! There is some MAPI calls via DLLs, and since there is a 64-bit version of Outlook Express, everything works fine when it is the default e-mail client.

The story with Office Outlook is different. Since it is only 32-bit, when it is registered as the default e-mail client, only the 32-bit section of the registry is affected. That is why when the 64-bit MAPI program tries to send mail, it only sees Outlook Express. This makes sense as the MAPI functionality to work with Office Outlook is a 32-bit DLL, which would not work when called from a 64-bit binary.

As far as what can be done to overcome this problem, you ask? I have not tested this, but if you could build yourself an out-of-process 32-bit COM LocalServer that was responsible for invoking the MAPI functionality of sending mails, you could (in theory) invoke it from a 64-bit application and be done with your bit-dependencies problem.

This link is a great place to start. I will be busy at an event here in Redmond, but if I have some free time I will try to come up with the solution and post it here,

Categories