Month: October 2008

VBScript to change the default VHD / VM location

I have found numerous resources on the net to perform this using PowerShell scripting. However, doing the same in VBScript isn’t straight forward. I needed this piece of code for my HVS2008 UI project on Codeplex. I just worked on it and wanted to share the same here. You can download the script http://www.ravichaganti.com/blog/wp-content/uploads/2008/10/changevmssdata1.vbs

First release of HVS2008 Scripts / UI

A week after I created this Codeplex project, I made the first release this evening. This is a very initial release and will not have the complete functionality. For this release, I mostly concentrated on the presentation aspects. I have tried to use the same interface as HVConfig.CMD because I feel that is the best way you can create a text based menu interface. Coming to the design aspects of the whole project itself, there are currently 4 components in this. Here are some more details on the four components HVS2008CONFIG.CMD This file is the starting point. You need to run this file to access the scripts / UI. I have used this design to make sure that any environment changes required for the VBScript to function can be done. *Always* use this script to start the HVS2008 configuration scripts / UI HVS2008DISPLAY.VBS This VBScript will display the main menu interface and prompt the user for what he wants to do. This menu is generated dynamically from HVS2008MAIN.WSF and will mostly remain unchanged for a long time. This …

Removable drive notification Script for Server Core / Hyper-V Server 2008

I like the Windows Server Core OS for its foot print and performance compared to a full blown OS. You can enable what you want and get rid of everything else. The same holds good for Hyper-V Server 2008 as well. However, working with this stripped-down OS can be a real pain. Escpecially, when you connect a removable device like a flash key, there is no notification of the drive letter getting assigned to it, etc. On a full-blown OS, this isn’t a problem as we have the explorer process taking care of showing the notifications. Coming to the subject of this post, I have been using this script for getting notifications for USB key add/remove events. This script runs in the background and notifies the removable storage events. Install Instructions 1. Download the zip from here 2. Unzip the contents to C:\scripts folder 3. Open Registry Editor from command-line 4. Navigate to HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon and change the value of “Shell” to “cmd /c c:\scripts\InitLogon.bat” That is it. Next time onwards, whenever you login to the …

Hyper-V Server 2008 local management scripts / UI

Like I mentioned in my earlier post, I am planning to create a easy to use local interface for managing Hyper-V Server 2008. For the same purpose, I created a project on Codeplex. You can access the project @ http://www.codeplex.com/HVS2008UI I had chosen Codeplex to make sure the content is under better version control and better availability. Here is the intent of this project (as written in the description of the project) Hyper-V Server 2008 is based on Server Core and has no local management possible. One must have a second machine (either Windows Vista SP1 or Windows Server 2008) to manage this OS and the hypervisor. This project intends to develop various scripts and put them together in to a small user interface for easier / local management of hyper-v server. Most of the functionality (except VM console access / Guest Install) achieved using Hyper-V Management MMC will be mimiced here. I am planning to publish the first set of scripts by end of next week. Stay tuned.!