The intersection of technology and leadership

Category: Virtualisation

VDK all the way

After lots of research, I’m in favour of the Virtual Disk Driver program called VDK available from http://chitchat.at.infoseek.co.jp/vmware/vdk.html and distributed under the GPL licence. Here’s some of the features that attracted me to it:

  • VDK doesn’t require running an MSI for installation – In keeping with the principles of starting a new project (checkout and go), I can simply include this file as part of a code repostiory, and know that I’m not forcing every other developer yet another manual step. Although you do need to install VDK, it’s a command line registration that is as simple as: vdk.exe install.
  • VDK is fully executable via the command line – This allows me to wrap this in the language of my choice to help automate environment setup as needed for a particular test to run.
  • VDK supports VMDK (VMWare Disk) images – Using other tools to generate the files that I want, I can easily use VDK to mount them to a particular drive letter.
  • VDK supports mounting with different options – Including read-only, read-write, and write-block mode.
  • VDK has good documentation – I found it really easy to understand what commands to execute to install, remove, mount, unmount, all with different options because both the command line (vdk.exe help) and the readme.txt had plenty of information and examples. It also helps that it follows conventions with other command line programs (following the DOS conventions of parameters with slashes)
  • VDK is realiable – I did plenty of different tests mounting and unmounting and it just keeps going (though your Windows Explorer may need a refresh (F5) to keep up).

Using a VMWare Disk Image created by QEMU as discussed previously, I can now create a new virtual disk mounted in windows simply by using the following commands:

vdk install
vdk open 0 floppy_disk.vmdk /P:0 /RW /L:Y
format /fs:fat y:

See the image below:

VDK Example

RamDisk utilities for Windows

If you can’t tell from the latest series of posts, I’ve been working very closely with the file system, especially exceptional circumstances when certain conditions go wrong. I’ve found it really interesting to see how to automate some of the test scenarios since I’ve never done anything like this before. One of the things I’ve been looking at closely are RamDisk utilities for windows, especially for things I can manipulate programmatically.

Most of the utilities on the net seem really robust, with the most favoured being the freeware RamDisk that comes from MyDigitalLife. There are also plenty of other commercial alternatives. The freeware RamDisk has a simple user interface that makes it really easy to manually mount a drive though their instructions for command line execution must less user-friendly, with few examples available, and what help document there is very unintuitive. Even obvious attempts with class command line options (slashes, dashes, double dashes, colon-separate name-value pairs) failed and I ran out of patience.

Unfortunately most other RamDisk tools for windows are all GUI-based and, in general, cost some money to use.

VMWare Disk Minimum File Size

The current versions of both VMWare Fusion and VMWare Player limit the minimum capacity of virtual disks (*.vmdk) to 100MB (or 0.1GB). Even their command line utility for windows (vmware-vdiskmanager.exe) describes this limit despite the file format allowing other file sizes to be specified (see screenshot below)

VMWare File Minimum Size

If you want to create a smaller disk, then I suggest downloading the QEMU program that allows you to create VMWare compatible disk images. When you install QEMU (at least for windows), you should find a qemu-img.exe file in their folder that gives you the ability to create your disk image. Here’s the command we used to create a 1MB VMware compatible image.

qemu-img create -f vmdk smallfile.vmdk 1M

© 2024 patkua@work

Theme by Anders NorenUp ↑