VMWare Workstation How-To

1. Increase Hard Disk Size

This can be done with vmware-vdiskmanager, located in VMWare Workstation installation folder (e.g. C:\Program Files\VMware\VMware Workstation):

vmware-vdiskmanager -x [size]GB [file path].vmdk

A VM shall have no snapshots, and there’s no possibility to rollback this operation. So the best strategy is creating a full clone of a VM, for which the hard disk needs to be increased, and increasing the size on the clone. This solution, however, doesn’t alter the size of the existing partitions, which are also OS specific. Some solutions suggest using a third-party tool, mostly commercial, like Partition Magic, or a boot CD, which is pretty complicated and cumbersome… For Linux (or other non-Windows) partitions this is the only option unfortunately. For Windows, however, there’s a better solution –

2. Increase or decrease Windows partition size

VMware Converter – is one of the greatest VMWare inventions. And it’s FREE. So VMware Converter, the main purpose of which is converting physical machines to virtual, or converting different formats of VMs (e.g. MS Virtual Server) into VMWare VM, алсо allows converting an “old” VMWare Virtual Machine into a “new” one, with larger (or smaller) partitions. Steps: power off the original machine, follow the Import Machine wizard. After selecting a source type and location, Source Data step allows resizing (enlarging or shrinking) the volumes.

3. Backup a Machine Before And After Changing It

In ESX and VMWare server, the only way to backup a VM is by cloning or copying the original machine. VMWare Workstation, starting from version 5, has a better solution: it allows creation of multiple labeled snapshots (“images” of the machine: its memory, hard disks and settings at the moment the snapshot is taken). I am a big fan of VMWare Workstation specifically because of this feature. Creation of a snapshot takes up to a few minutes, and is done on background, so no need to sit and wait for it. And each snapshot is independent: it can be cloned or deleted, regardless of its position in the chain. Snapshots also take less space than a full backup or a clone, so they are the best way for backing up a machine state, before making any changes, and after the changes were successfully applied. The only feature I am missing, is an ability to create a synchronous snapshot of multiple machines, which can be really useful for distributed applications and environments (i.e. snapshot machines A, B, C at the same time, and be able to restore all three of them to the same snapshot in one mouse click). I’m sure there’s some software out there that can do it, I just didn’t find it yet.

4. Use static MAC address

A VM’s MAC address will change if the location of the VM changes, even if a VM was just moved to a different location on the same machine. This can create a problem for software that depends (or is licensed to) specific MAC address. Steps:

  1. Shutdown the VM and open its .VMX file (e.g. in notepad)
  2. Find the line

    (where {Number} is the one present in adapter name, e.g. ethernet0) and change it to

  3. Find the line

    for the same adapter and change it to


    where “XX is a valid hex number between 00 and 3F, and YY and ZZ are valid hex numbers between 00 and FF. The value for XX must not be greater than 3F in order to avoid conflict with MAC addresses that are generated by the VMware Workstation and VMware GSX Server products” (source)

  4. After booting up the VM, verify the MAC address correctness (e.g. ipconfig /all)

5. Improve VM I/O

I assembled this list from different sources (don’t remember which one came from where now), and left only those that noticeably changed I/O performance of a VM or a host machine:

1. Exclude .vmdk (VMware virtual disk) and .vmem (VMware virtual memory) files from automatic file protection in anti-virus software.

2. Separate VM files from other host machine files. This includes several options:

  • At minimum a separate (non-system) partition for virtual machines storage
  • Or a separate HD for storing all VM files
  • Or splitting virtual disks among several physical disks
  • If an application that runs on VM is I/O hungry (i.e. database server), placing the “high traffic” files on separate HD is yet another option.
  • For all of those options, ideally use SCSI or SAN with RAID0 (or more complex and expensive alternative, depending on redundancy needs)

3. Pre-allocate virtual disk space: in “Specify Disk Capacity” dialog, check the "Allocate all disk space now" option.

4. Allocate enough memory for the VM, to avoid swapping

5. Disable memory page trimming and Page sharing

6. Periodically defragment a host machine and a VM. VMWare recommends the following procedure:

  • Defragment guest VM, by running disk defragmentation utility inside the virtual machine
  • Defragment VM’s virtual disks from the virtual machine settings editor (VM > Settings). Select the virtual disk you want to defragment, then click Defragment
  • Run disk defragmentation utility on host machine
VMWare Workstation How-To