Once I had built my Hyper-V Server I still had a few to resolve. I thought I had better document the solutions I found to my 3 disk related problems from this entry.
So the 3 issues covered are:
- How to get an existing disk to be available inside Hyper-V
- How to install RAID Management tools
- How to shrink a non-Dynamic VHD
How to get an existing disk to be available inside Hyper-V (called a pass-through disk)
Just to give you some background, I was moving a non-VM OS inside a Hyper-V system. I had created the VM, but I could not get it to just “boot” from the old boot disk – the disk was not showing. I’d read that this type of disk was a pass-through (or pass-thru) disk, but I could not find out how to configure it easily. The solution turned out to be very simple. Run DISKPART on the Hyper-V server, identify the disk and mark it offline. It would then appear in the list of disks that could be installed. What is more, if I ran out of disks I could install a SCSI controller and continue to add disks there too.
So, the commands for DiskPart:
- List Disk
- Select disk n – pick the disk you want, replace n with the disk number from the List Disk output
- Offline Disk
You then need to add the disk inside Hyper-V -
How to install RAID Management tools
I don’t have pictures for this, but you should get the idea. I put in the CD for the RAID software and I found some EXE and MSI files (DIR /s /a *.exe *.msi from a command prompt will do that). I ran these (using common sense to work out which ones to try first) until the drivers were installed and also the raid configuration software. I then looked in the C:\Program Files and C:\Program Files (x86) folders for exe’s, cpl and jar files (DIR /s /a *.exe *.cpl *.jar). The exe’s can be services or tools to run, the cpl are control panel files and the jar files are Java modules. It turns out that the configuration tools are Java based on my e-sata card.
How to shrink a non-Dynamic VHD
Finally I had my disks and I created some large VHD disk, but now I wanted to change the size of the 500GB disk to a 100GB disk. It was not empty, but had about 50GB of data on it and I had created a Fixed sized disk to make things run smoother. Easy I thought, boot up Windows Server 2008 or Vista setup routines, select repair, get to a command prompt, start DISKPART again and shrink the volumes in there. Alas that did work, but it did not help as the fixed disks were still fixed and large. I then found a great VHD shrinking tool - http://vmtoolkit.com/files/folders/converters/entry87.aspx, however it required .Net, which is NOT on Hyper-V.
The solution would have been to copy the 500GB file across the network or onto a USB drive, adjust it and put it back again. The solution turned out to convert the disk type to Dynamic, which produced a much smaller VHD file that I could then move around. This is done by choosing Edit Disk within Hyper-V Manager.
Sun, Dec 7 2008 10:14 PM