Saturday, November 2, 2013

How to Create a CentOS 6 Minimal Virtual Machine with VMware Player

UPDATE: This tutorial was written for CentOS 6. Creation of a CentOS 7 minimal virtual machine is very similar, but there are some differences. For CentOS-7-specific instructions, see CentOS 7 Minimal on VMware Player.


Today, a lot of pre-built VM images for specific purposes (e.g., LAMP, Drupal, Moodle, Joomla, etc.) are available. They can save a ton of time since you don't have to start from scratch (assuming, of course, that the images come from a reputable source). However, bear in mind that whoever builds those images always makes certain assumptions. For example, it is almost always assumed that in a LAMP stack the web server and the database server should be on the same virtual machine, which may or may not be what you want. Of course, you could take two identical LAMP images, remove the MySQL-related software packages from the first and all the Apache-PHP-related packages from the second and make the two work together. Still, starting from scratch is also an option, and in some cases (when the requirements of your application are very unique) the best option.

There may be a whole bunch of specific reasons why one would want to start with a minimal installation of an operating system, so I am not going to speculate about those, but, generally speaking, it allows to avoid software bloat and, therefore, maximize utilization of resources and reduce security risks. Bear in mind that minimal installs of most Linux distributions are just that - just enough OS to boot the system or slightly more. So, in order for it to actually do something useful, you will have to install additional software (again, what software to install depends on your specific needs, of course).


This post provides step-by-step instructions how to
  • create a VMware virtual machine from a CentOS-6.4-x86_64-minimal.iso (or CentOS-6.4-i386-minimal.iso) using VMware Player 6.0.1 on Windows 7;
  • bring the virtual machine to a minimally usable state, i.e. to be able to connect to CentOS mirrors in order to update your new system and install additional software packages;
  • install VMware Tools 9.6.1.
Other versions of the software involved in all this may require slightly different steps, but the general principles are the same.