Month: June 2009

Shell Extensions for VHD files – Updated

I just made another release of VHDShellExt.vbs on MSDN Code Gallery. In this new release, I mostly concentrated on some error checking around the input boxes and added “Merge VHD” feature. Also, enabled all the shell extensions for AVHD files also. So, after you update this release, you will have to run setup once again. cscript.exe VHDShellExt.vbs /action:Setup Once the setup is complete, you should see the below context menu on every right-click on a VHD or a AVHD file.   Word of caution AVHD files are the snapshot files. You should manually merge snapshots in to a VHD file only when it is extremely necessary. The manual merge of snapshots in to a VHD of a functional VM will cause the VM to fail. This is because the references to VM snapshots are still left in the XML files while a manual merge option deletes the AVHD files after a merge. If you are trying to merge the snapshots of a functional VM, it is recommended that you select “No” when prompted to merge …

Hyper-V: Notes on differencing disk usage

I came across a few issues while doing some scripting work related VHDShellExt project. In this series, I will list a few issues I found around differencing disk usage. First one: Adding differencing disk as a new VHD to an existing VM If that section title is too complex to understand, here is the step-by-step of what I tried. One assumption: You have integration components installed inside the guest OS. Right-click on a VM and select settings Select “IDE Controller 0”, select “Hard drive” on right pane and click “Add” In the subsequent window, click on “New” In the “New Virtual Hard disk” wizard, select “differencing disk” and click “next” Give it a name and location and click “Next” On the “configure Disk” screen, click on “Browse”, locate the VHD connected to this VM and click on “Open” Click “Finish” Now, when you try to power-on this virtual machine, you will see a nice error message like below Now, let us try one more experiment. Let us remove the previously attached differencing VHD from the …

Bing developer APIs – A VBScript demonstration

Bing – the most talked about and the most innovative decision engine. There is lot of talk on the Internet about this already. I am not going to write a review on that here. I want to show how developers can use — using a simple VBScript — the power of Bing in their applications. Bing API offers open, flexible options for building or enhancing your site or applications. Developing an application with the new API is straightforward: Choose a SourceType (or SourceTypes—Search, Spell, Translation, etc), choose an output protocol (JSON, SOAP, or XML) and then customize according to your needs. Before getting started with BING APIs, you need to get a APPID from Bing. For more information on how to create a appid, refer to http://www.bing.com/developers. You will have to login using your live ID and create an APPID for the application you are creating. There is a nice API basics guide to get you started. Now, to the more interesting stuff..! [Code][/Code] First example: Spell check [Code lang=”vb”] Set http = CreateObject(“Microsoft.XmlHttp”) strURL = “http://api.search.live.net/xml.aspx?AppId=Your_APPID&Query=coffee&Sources=Spell” …

eBook: Windows Server Virtualization – Virtual Storage

In this release — Chapter 4: Virtual Storage — I wrote quite a bit on what all is supported under Hyper-V and talked about some best practices when using various types of virtual storage. This chapter focuses on how to create and manage virtual storage using various methods available. These methods include Hyper-V MMC, Diskpart.exe, Diskmgmt.msc and Hyper-V WMI interfaces. I have tested all the scripts on a Windows Server 2008 R2 system with Hyper-V role.