VCP 4 prep objective 5.1 – Create and deploy Virtual Machines

Objective 5.1 – Create and deploy Virtual Machines

Understand Virtual Machine hardware maximums

The latest configuration maximums can be found here

Create a Virtual Machine

Virtual Hardware

  • 8 vCPUs
  • 255GB vRAM
  • 4 IDE devices
  • 4 SCSI controllers (15 devices on each)
  • 2 Floppy drives
  • 3 Parallel devices
  • 4 Serial ports
  • 10 vNetwork adapters
  • 6 PCI adapters (5 usable)

You create or deploy a virtual machine from within vCenter; you can either choose File > New > Virtual Machine or right click a host > New Virtual Machine.

The first option you’re prompted with is whether to create a typical or custom Virtual Machine.

Typical Custom
Name / Location Name / Location
Datastore Datastore
Guest OS Virtual Machine Hardware version
Create a disk Guest OS
Ready to complete CPU
  SCSI Controller
  Select a disk
  Create a disk
  Ready to complete

Name / Location

Ideally this should not contain any unusual characters such as punctuation or symbols or spaces; please not this is a recommendation not a must do.


The datastore that the guest should reside on. When you create a Virtual Machine expect to see the following:
  • VMX – Virtual Machine configuration file
  • VMDK – Virtual Machine virtual hard disk metadata
  • -FLAT.VMDK – Virtual Machine virtual disk
  • NVRAM – Virtual Machine BIOS state
  • VSWP – Virtual Machine VMKernel swap file (Allocated virtual memory minus any memory reservation)
  • LOG – Virtual Machine logs (generally you’ll ten generations of log files)

Guest OS

This is a important configuration to get right, as this selection will determine the configuration of the VMX configuration file. 

CPU (Custom)

By default this is one vCPU and should be left as such unless absolutely necessary. 

Memory (Custom)

The Wizard will provide recommendations as per the operating system selected in an earlier step. 

Network (Custom)

Default will be the Intel E1000; change as required. 

Determine the appropriate SCSI adapter

The default will be dependent on the operating system selected in an earlier step. The paravirtual SCSI controller is only benefical in heavy I/O situations. For other situations it is recommended you stick with whatever VMware recommended for your operating system. 

Determine the Virtual Disk type

The virtual hard disk can be a minimum of 4MB and a maximum of 2TB; the default is 8GB.
The thin provisioning and cluster / fault tolerance support options are mutually exclusive; if you do want to change the between thin and thick provisioning you can do so using storage vMotion; NOTE: you’ll need more than one datastore. Thin provisioning encourages block fragmentation on the disk array and the VMFS will incur a SCSI reservation each time the vmdk grows. Apparently the SCSI reservation using optimistic locking so the performance hit should be minimal.
Big gotcha! – If you provision a thin provisioned virtual disk but format the disk without the quick option specified (In Windows quick format is default) then the format will inflate the disk to the allocated size.
If you configure the disk mode as independent then that disk will not be affected by snapshots. It is also possible to specify whether changes should be written immediately or discarded when the virtual machine is powered off.

Install / Upgrade / Configure VMware Tools

VMware Tools should always be installed if you’re following best practice and as such you receive the following benefits:

  • Tuned device drivers
  • Additional power options
  • Virtual Machine monitoring using VMware HA
  • Balloon driver (memory reclaimation)
  • Disk I/O buffering (used when you initiate a snapshot/ merge a snapshot / use some form of snapshot backup technology)
  • Virtual Machine / Guest clock synchronisation (If you’re virtual machine is a domain member have it synchronise its time with a domain controller instead)
 The installation of VMware Tools is pretty straightforward; right click the virtual machine > install / upgrade VMware Tools, alternatively go to the VM menu > Guest > Install / Upgrade VMware Tools.
A Windows based installation will more than likely start the installer if autorun is enabled. A Linux based installation will more than likely require you mount the filesystem then run the perl installation script. NOTE: probably worth running the installer from the console as the network driver installation will disconnect any remote sessions.
Upgrading of VMware Tools is only ever required if you have upgraded the host ESX version; automatic or manual?

Create / Convert Templates

Templates can be created by either converting an existing powered off virtual machine or cloning an existing virtual machine (ideally the virtual machine would be turned off whilst you’re cloning it). The main differences are:
  • Conversions are instantaneous
  • Converted VMs are unusable
  • Clones take more time to duplicate the content
  • Clones can be compacted i.e. the virtual disks can be set to thin provisioned at clone time

Customise Windows / Linux virtual machines

Guest customisation allows you to customise a templates or quickly, this is ideal when bringing server online quicker to serve an increased workload.

Windows customisation uses sysprep and as such is very extensive; whereas Linux customisation is limited to computer name, domain name, IP addressing and DNS.

Manage customisation specifications

Customisation setttings can be modified via the vSphere client.

UI: Home > Customisation Specifications Manager.

You can then edit or create new customisation specification settings.

Deploy a virtual machine from a template

Browse to the VMs and Templates view > Right click the template > deploy virtual machine from this template; follow the wizard.

Deploy a virtual machine using VMware vCenter Converter Enterprise

vCenter converter has two cloning modes: disk or volume based; disk based cloning is used when you’re cold cloning (this transfers all the sectors and volume data to get an exact copy). Volume based cloning is used for either cold or hot clones but uses either file or block level; file level is used when the virtual disk will be smaller than the source and block level is used when the virtual disk will be the same size or larger.

The source server will require either a vCenter converter agent to be installed or will have to have been booted from a vCenter converter boot CD.  

The clone is started by right clicking a datacenter or host object > selecting import machine.

Perform a Hot Clone

In order to perform a hot clone you must have the following configuration:

  • Administrative privileges on the source
  • vCenter and Windows networking ports must be open (TCP 445, 139, 9089, 902, 903, 443 / UDP 137, 138)
  • Software mirroring must not be configured

A hot clone uses VSS (Volume Shadow Copy Service) to duplicate the storage.

Perform a Cold Clone

In order to perform a cold clone you must have the following configuration:

  • A network route between the source and vCenter
  • Administrative credentials on the vCenter server
  • Minimum 264MB of RAM (preferably 364MB)

A cold clone copies the source hard disk blocks one by one.

Perform System Reconfiguration

Deploy a virtual machine using guided consolidation

Guided consolidation facilitates discovery, analysis and migration of physical machines into vCenter. Guided consolidation works with Windows environments only. The services used by guided consolidation are:

  • vCenter collector – discovers domains and systems within those domains; will only collect from one domain at a time.
  • vCenter provider – feeds data into the vCenter collector service.
  •  vCenter guided consolidation – saves and analyses the collected performance data.

Perform discovery

Discovery can be performed in several ways:

  • Computer name (individual or CSV)
  • IP address (individual or CSV)
  • Domain membership

IP addressing is limits to one subnet; domains is limited to one and only 100 systems can be analysed at any one time.

Rescanning of Windows systems is every 30 minutes; domain rescannning is every 24 hours.

Analyse discovered virtual machines

Discovered systems will show the following:

  • Physical computer name
  • CPU info (CPUs and clock speed)
  • Memory info (RAM)
  • Status (analysis progress)
  • Confidence (Virtualisation candidate?)
  • CPU usage (Avg. CPU usage)
  • Memory usage (Avg. Memory usage)

The analysis stage uses performance monitor counters to collect CPU, Memory, Disk and Network statistics.

Consolidate selected virtual machines

Once a analysed system has a confidence level of satisfactory you’ll be able to select the system and initiate a conversion; the conversion is handled by vCenter converter enterprise.

Clone a virtual machine

Virtual machine clones are a carbon copy of the original with the exception of the MAC address and any customisations you make. NOTE: Make sure the virtual machine you’re cloning has no outstanding / uncommitted snapshots.

Import a virtual machine from a file/folder

Virtual machines can be imported into vCenter by firstly uploading the virtual machine files to a datastore then double clicking (or right clicking) its .vmx file.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.