Home > Ask the Server Virtualization Experts > Virtualization management Questions & Answers > Automating VHD recognition in Microsoft Virtual Server 2005
Ask The Server Virtualization Expert: Questions & Answers
EMAIL THIS

Automating VHD recognition in Microsoft Virtual Server 2005

Anil Desai EXPERT RESPONSE FROM: Anil Desai

Pose a Question
Other Server Virtualization Categories
Meet all Server Virtualization Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 15 January 2008
I am using Microsoft Virtual Server 2005. I created one VHD test1.vhd and connected it to virtual machine VM1. I installed guest OS in test1.vhd and created another VHD test2.vhd and attached it to VM1. But the guest OS did not detect the test2.vhd unless it was formatted properly by using the disk management tool. Is there a solution to make the guest OS recognize the newly added VHD programmatically using C#, without using the disk management tool?


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   




It sounds like you have followed the proper process for adding a VHD to VM1. You can attach the VHD to either an available IDE channel or to an available SCSI channel (if you have added a SCSI adapter). I think the problem you're experiencing is that the disk is not formatted and therefore does not have a drive letter for use by the guest OS. If you're using Windows, you'll need to open the Disk Management tool (accessible via the System item in Control Panel or by right-clicking on the Computer icon and selecting Manage). Then, choose to format and partition the disk. That should make it available for use.

You can use Virtual Server's COM API to automate the creation and attachment of VHDs. I have written a book titled Scripting Microsoft Virtual Server 2005 that provides VBScript, VB.NET and C# source code. Also, see my scripting/automation article, using VBscript to automate Microsoft Virtual Server, on SearchServerVirtualization.com for an intro on getting started.

Finally, I have a sample C# application available for free download on my website anildesai.net. Good luck!




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



More Expert Analysis on Virtual Machines and Integrating Virtualization
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersEvents
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2006 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts