VMware Virtual Machine tips for hands-on labs

Using Virtual Machine technology for hands-on labs is a great solution. It enables you to provide attendees with a valuable learning experience containing multiple servers with a hardware independent setup containing a complete set of services. And it allows for easy and fast classroom setup. On this page we have compiled a list of tips to help you build the best virtual machine solution for your labs.

Before delivering the virtual machines to the technical team

  • Place your virtual machines in a folder with your lab-number (LAB1234)
  • Clean up your virtual machines. Do not leave unnecessary ISO files, downloads etc in your virtual machines. Remove folders from VM folder named Cache and Applications and remove .LCK folder.
  • If possible shrink your virtual machine disks. You can do this from the VMware Tools inside the virtual machine (right click the icon in the system tray in Windows or run the vmware-toolbox command on Linux.
  • Power off virtual machines, do not use suspend. If you would suspend then there can be problems when resuming to normal state because display settings and processor architecture can be different.
  • Disconnect any ISO-file references from your virtual machine if they are not used in the labs

Hardware and memory assignments

When creating a virtual machine some memory will be assigned to your operating system. Evaluate those defaults and verify if it is enough but also if it is not too much. 

Create a virtual machine with virtual disks that grow dynamically (this is default). Do not allocate all diskspace. And also use the default feature to split the virtual disk in multiple files. This creates multiple files in 2 gigabyte chunks that are easy to copy and can be placed on any type of file system.

create virtual machine disk

After creating a virtual machine delete hardware that you don't need.

  • Remove sound card
  • Remove USB controller
  • Remove printer
  • Disconnect CD-ROM devices and ISO-images if they will not be used in your lab

In the guest operating system please try to save diskspace. So do not install components you don't need. Don't add unnecessary ISO files, software downloads and other data to the virtual machine that you don't need for your labs.

Storage and naming conventions

Create a folder to store your virtual machines with your lab number as the folder name, for example LAB1234 and store the virtual machines or the virtual machine team in that folder. You can also name individual virtual machines with a prefix of the lab number and for the convenience of yourself and the attendees you can also add the assigned IP address to the virtual machine name. In the screenshot here you see a Windows virtual machine where this naming convention was used.

VM with naming convention

Working with snapshots

Only create snapshots of virtual machine if you will really be using them in you labs and/or if you want to be able to restore to a previous state when a student has created a problem. When creating a snapshot always create the snapshot when the virtual machine is powered off. If you create a snapshot of a running virtual machine the processor, memory and display state are stored and it is very likely that restoring to that state would fail on different hardware.

Converting virtual machines and virtual disks

When you have created a virtual machine with a hard disk that is too large or when you have created the disk in a pre-allocated format in stead of a growable format there are two tools that can be of help to change the virtual machine and disk format.

The first tool is the VMware Converter (www.vmware.com/products/converter). That utility can be used to convert virtual machines from any VMware format and version to any other VMware format and version. You can download it for free. (link)

The second tool is vmware-vdiskmanager. That command line utility can be used to change the format, type and size of individual virtual disks.