Objective 5.1 – Create and deploy Virtual Machines
Understand Virtual Machine hardware maximums
Create a Virtual Machine
- 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.
|Name / Location||Name / Location|
|Guest OS||Virtual Machine Hardware version|
|Create a disk||Guest OS|
|Ready to complete||CPU|
|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.
- 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)
Determine the appropriate SCSI adapter
Determine the Virtual Disk type
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)
Create / Convert Templates
- 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.
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.