Thursday, June 16, 2005

vmware-vdiskmanager

Alas, another sleepness night... anyway, a quick note on extending vmware disks.

vmware comes with a command-line disk utility called 'vmware-vdiskmanager'. You can use this to do a number of things, but the main things are creating disks before you create a new vm, or extending existing vmdk's. I like to use it to create disks for any new vm I'm configuring, and then hitting the resulting -flat.vmdk file with contig.exe (from sysinternals) to ensure my vm is being built on a contiguous file. I'm also in the habit of creating fixed size disks so they don't become fragmented at a later date. I think it's a good practice to just create smallish primary disks for your OS (2Gb-4Gb, depending on your pagefile requirements), and then adding a second disk for whatever else you want to install. This is in line with how most enterprises would like to run their servers - not with such a tiny system drive, but segregating the OS disk from any application / data disks (even if that separation is only based on logical volumes). It also helps with fitting more vm's onto one physical disk. Quite often you're not using vm's for big installs anyway - more likely messing around with additonal OS components like DNS/DHCP/IIS/clustering/ etc or testing GPO's or other OS level config changes.

So anyway, to create a 2Gb IDE fixed-size disk, you issue the following command from the shell vmware-vdiskmanager -c -s 2Gb -a ide -t 2 "Windows XP Professional + SP2.vmdk" and then run contig -v "Windows XP Professional + SP2-flat.vmdk" after the disk is created. To see all the available parameters, just run vmware-vdiskmanager on it's own.

BTW, if you want to use the LSI Logic SCSI adapter with Windows 2000, you need this driver.

Thats about it for now... I'm feeling sleepy again.

No comments: