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:

Shutdown the VM and open its .VMX file (e.g. in notepad)

Find the line

ethernet{Number}.addressType="vpx"

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

ethernet{Number}.addressType="static"

Find the line

ethernet{Number}.GeneratedAddress

for the same adapter and change it to

ethernet{Number}.address=00:50:56:XX:YY:ZZ

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)

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: