Thursday, June 11, 2009

VMWare: Defrag or convert your 2nd virtual hard disk

In order to defrag or convert the 2nd disk, you need to reference or create the corresponding disk descriptor file that points to your 2nd disk. A disk descriptor file is simply a plain text file with the same extension as your virtual disk (vmdk). Its file size is usually about 1 or 2 KB.

  • Go VMware Server Console (VMware Server v1) or VI (VMware Server v2).
  • Select the VM.
  • Stop/shutdown the VM if it is running.
  • Select Edit Virtual machine settings.
  • Swap your 2nd disk node with the first HD node. Make sure the end result of your 2nd disk is at (0:0) node position:
    • In the Hardware tab, select Hard Disk at (0:0) node if you are using VMware Server v1; or select Hard Disk 1 for VMware Server v2.
    • Change it to other node. For Server v1, click Advance for selection. For Server v2, the selection should be at the right pane and named with Virtual Device Node.
    • Select your 2nd hard disk and change it to (0:0) node position.
  • Click OK and exit Virtual Machine Settings.
  • A new disk descriptor file in plain text is produced and named under your 2nd HD name with a VMDK extension, e.g., W2008My2HD.vmdk.
  • For Server v1, you can directly defrag the VM via the console. Or like v2, you can use virtual disk manager for defragmentation. With VMDK text file, you can do whatever you want with Virtual Disk Manager.

Don't forget to change it back to the original setting when you're done; otherwise, your VM won't boot.

Please remember that there is no need to use virtual disk manager to defrag a virtual machine (VM) if it is created in one big flat file or a set of preallocated 2GB files. Such a VM is only needed to defrag at the Windows level.

I would recommend to use flat or preallocated 2GB type for your 2nd, 3rd, ...and etc hard disk so that you don't have go through this hassle.

1 comment:

  1. This is fabulous creation on this particular subject, i am impressed with the style of the post. Keep up the right thing.
    pst file repair

    ReplyDelete