VMWare cheatsheet
Table of Contents
Running Vmware console from command line
Got this from http://www.glenbecker.com/2011/03/launching-vmware-remote-console-from-a-batch-script/
C:\Program Files\VMware\Infrastructure\Virtual
Infrastructure Client\4.0\vmware-vmrc -h <host addr/ip>
"[datastore] machdir/mach.vmx"
Linux:
vmware-vmrc -h [] [-u  -p ] [-M  | ]
Windows:
vmware-vmrc.exe -h  [-u  -p ] -M  | 
MOID are in vmInventory.xml in /etc/vmware/hostd/ under Linux or
%ALLUSERSPROFILE%\Application Data\VMware\VMware Server\hostd under
Windows.
Running vsphere client from command line
C:\Program Files\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\VpxClient -h <hostname\ipaddr>
C:\Program Files\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\VpxClient.exe. -passthroughAuth -s %VCservername%.
This allows you to passthrough your logged-on username credentials.
terms
- OVF (Open Virtualization Format) - from Open Virtualizatoin Format Specification, v1.10 and wikipedia
- An OVF package always contains exactly one OVF descriptor (a file
with extension .ovf). The OVF descriptor is an XML file which describes
the packaged virtual machine; it contains the metadata for the OVF
package, such as name, hardware requirements, references to the other
files in the OVF package and human-readable descriptions. In addition
to the OVF descriptor, the OVF package will typically contain one or
more disk images, and optionally certificate files and other auxiliary
files.
- VMDK (Virtual Machine Disk) - file format used for vitual
applieances developed for VMWare products. Container formate for
virtual hadr disk drives. Open format.
- VMotion (from http://www.vmware.com/files/pdf/VMware-VMotion-DS-EN.pdf)
- enables the live migration of running virtual machines from one
physical server to another with zero downtime, continuous service
availability, and complete transaction integrity.
- vRAM - virtual RAM shared between images?
vSphere 5 licensing / editions / kits
- Essentials - all-in-one targetted at SMBs. Entirely self contained
and cannot be used with other versions. Limited to 3 hosts, 192GB
pooled vRAM.
- Essentials Plus - as above, but adds vMotion, HA, VMware Data Recovery features.
- Standard Acceleration
- Enterprise Acceleration
- Enterprise Plus Acceleration
vCenter Server
editions
- for Essentials - used with both Essentials kits
- Foundation - used for centralized mgmt of up to 3 ESXi hosts. Not
sold as part of kit. ALlows purchase of individual component of
vSCenter Server
- Standard - used for Standard, Enterprise, and Enterpise plus kits.
No limits on restrictions of hosts that can be managed except for
supported max of 1000 hosts. Includes Orchestrator and Linked Mode as
additional features
install and sizing notes
Can no longer install Guided Consolidation or Converter.
Choose correct size for vCenter JVM and change after install via http://kb.vmware.com/kb/1039180.
    You can size via Administration / vCenter Server Settings in vCenter Server Settings Statistics window, 
    or via www.vmware.com/support/vsphere4/doc/vsp_4x_db_calculator_oracle.xls (oracle)
    or via www.vmware.com/support/vsphere4/doc/vsp_4x_db_calculator.xls (MS SQL)
    bundled SQL2K8R2Express can handle up to 5 hosts and 5 virtual machines in inventory.  
    max size is 10GB
    Cannot be installed as part of vCenter Server upgrade (latter needs to be manually 
    installed prior to running vCenter Server Installer
Reqs
- Appliance - deployed via OVF, supported only when deployed on
ESX/ESXi 4 or 5 - needs vspher client - 7GB - 80GB diskspace req - VMDK
and OVF must be downloaded
- vCenter Server on Windows - if you need SQL Server - .net 3.5 SP1 -
2 64 bit CPUs or 1 64 bit dual-core CPU, 4GB Mem, 4GB free disk space,
supported db, dns entries resolving svr, no NAT from server to ESXi
hosts, remote db must have 64-bit DSN, preferably svr that is member of
domain, 15 char name or less, do not install on DC, static IP addr
- designate an account to run vCenter Svr services, system or user
- install account must have access to db (or admin for bundled SQL2K8R2 Express
default pw
root/vmware
vSPhere Client
Can manage ESXi hosts and vCenter Server instances.
suggest getting from vcenter.domain.com or ESXi.domain.com where domain.com is your domain
vSphere Web Client
cross-platform web app that allows you to connect to vCenter Svr to manage ESXi host (no direct connect to ESXi host)
useful if you are not using Windows OS
Cannot connect directly to ESXi host
licensing report says what RAM utilization is
suggest registering URL of vCenter Server as https://vcenter.domain.com where domain.com is your domain
access vSphere Web Client from http://vcenter.domain.com where domain.com is your domain.
***
well suited for help desk, op cntr, virt mach owners, non-windows users
Reqs
membership in admin group on system
64-bit OS
IE7, IE8, Firefox 3.6+
Flash Player 10.1.0+
vSphere Client Plug-ins
registered with vCenter Server, available to vSphere client
verify enabled via Plug-ins menu in vSphere Client/Manage Plug-ins
examples
- vCenter Storage Monitoring
- vCenter Service Status
- vCenter Hardware Status
- Vmware Syslog Collector (syslog svr for windows)
- VMWare Auto Deploy - simplifies deployment and patching of ESXi hosts
Licensing
25 chars grouped 5 at a time separated by dashes
soft licenses allow ops that would result in exceding licenses cap.  hard licenses do not.
if ESX/ESXi 3.5 hosts to be managed, separate license svr req to supp theses hosts
upgrading from vSphere 4 to vSphere 5 requires new license
from vCenter Svr (via vSPhere Client) - Home / Administration options / Licenses / Management tab
vSphere/vCenter Availability reqs
Installing vCenter in virt mach allows entire image to be backed up
With exception of vSPhere Essentials, all versions can leveaage HA and vMotion
Enterprise and Enterprise plus can also leverage VMware Distributed Resource Scheduler (DRS)
Clustering vCenter Server using Microsoft Cluster Services (MSCS) or
Veritas Cluster Services (VCS) can provide HA to vCenter Server
- Most attractive option besides HA, vMotion, and/or DRS, might be VMWare vCenter Svr Heartbeat application
- protects app, cfg, OS, net, and hw-realted probelsm.  Allows failover/failback on phy and virt platforms
ESXi
bare-metal hypervisor used to run virt machines on x86 hw.
- ESXi Installable - install on compatible x86 svrs
- ESXi Embedded - install on USB / SD cards in svrs by OEM
Installing manually
- Make sure UTC is set in BIOS, not time zones
- If using Fibre Channel or iSCSI SAN storage, consider disconnecting cables to make sure not to install on wrong disk
Installing using auto-deploy
- PXE
- Make sure vSPhere Auto Deploy is installed
- install VMWare PowerCLI
- need a tftp svr, and DHCP, and vCenter Server
- TFTP zip file should be downloaded from Auto Deploy page in vCenter Svr, and extracted on directory on TFTP svr
- DHCP scope include option 66 specifying TFTP svr
- DHCP scope option 67 specify boot file undionly.kpxe.vmw-hardwired.
- set each ESXi host to be provissioned with Auto Deploy to PXE boot
- Use Image Builder to create image profile
- Write rules to assign image profile and optional host profile to ESXi hosts provisioned with Auto Deploy
additional cfg steps
NTP on ESXi host
From vSphere client, connect to ESXi host or vCenter Server managing host
select ESXi host, click cfg tab in right pane, choose Time Cfg link in
software panel, click Propertieslink, manually set time and date,
select NTP client enabled, click options button to put in NTP server
(s), restart NTP service, for general settings of NTP Daemon Otpoins,
select Start Automatically if any ports are open, and stop when all
ports are closed.
DNS and routing
Inventory screen, select host, click cfg link,
choose DNS and ROuting from software panel, click properties link to
modify, modify DNS entries in DNS COnfiguration tab (if necessary),
click routing tab, change default gw if necessary, update DNS or IP
Route Cfg tsk may start, wait until complete.
You can also configure DNS and routing from ESXi Direct Console User Interface (DCUI).
CLASS
VCenter preferable
- more mgmt capabilities,more control forcing login via AD credentials
Terms
- HA- minimal down time
- Vmotion
- SANstorage
- vMotion - move
- DRS Dist Resource Sche -uses vMotiont automatically load balance machines from host to host.
- DPM - Distributed Power Mgmt - Bring host instances up / down based on CPUandMemory...
- FT - Fault Tolerance - Primary machine, hidden secondary
- storage vMotion - move files from san to san or Local Disk to SAN
- VM Profile - where everything is set up (for each profile
- Storage DRS - canmonitor availablespace,and move things based on storage available
- vSwitch - virtual switch - virtual uplink connected to physical port - created on host
- Hot Add - can be added on the fly
- 2008 can add vCPUs and vMemory on the fly
- Memory Overcommitment - provide more memory than available (swapping?)
- VMFS
- Virtual Machine File System - needed to store (LARGE) files -block
sizes in 4.x 8MB - do not create on NAS (use NFS mount) create onother 
- Thin Provisioning - grow into storage requirements - NAS already do thin storaging
- Distributed Switch - create one switch, and replicate to all hosts
Thinking about taking vcp5
www.vmware.com - 
- Services/ Get Certified / VCP5 / ExVCP5 Exam Blueprint / VCP5 MockExam
- Test King
- Support & Downloads /Data Center / VSphere ESXI/Configuration Maximums for VMware vSphere 5.0( & documentation)
- review Basics Guide & Resource Mgmt Guide
Sizing
minimum - 64-bit x86 CPU,2GB RAM, 1 or more ethernetVCP4 8 cpus vcp5 32 cpus
assume we don't enable hyperthreading on box
Virtual machine - 
Easy to move/copy files
easy to manage virtual machines insulated fom hw chgs
provides ability to support legacy apps
allows svr to be consolidated
- old rule of thumb - #vCPU x 2 = # of logical cpus
ESXI 5.0 supports 160 LCPUs EXAM QUESTION
- # Sockets * #cores/socket x 2
Configuring machine
- Creates .vmx file
- .log files kept (up to 8)
- .vmdk (small) descriptor file
- flat.vmdk (Large)- logical disk
- .NVRAM file for bios/uefi
- .vswp (Swap file for memory = amount of memory configured for windows - don't necessarily read real memory - don't want to use)
- separate from windows swap file
- .vswp (2nd) for overhead of file (resources machine uses when running (e.g. kernel?))
- snapshot files
- template file
- .vmss suspend state file
- .vvmsd snapshot files
vSphere User Interfaces
Get vSphere CLient from ESXi host or vCenter
- Use vCenter and remote lock down mode
Web client
enable ssh - console - remember to disable after you do work
new firewall in kernel - able to enable ssh from firewall
- vCLI - set of cmds run fom remote linux or windows system adnexecuted on an ESXi host, packaged as an app
- vSphere Management Assistant (vMA) - 
- platform running vCLI, vSphere SDK for PERL, VMware vSphere API
- Packaged asvirt app based onLinux
- vSphere PowerCLI - automation tool for admin vsphere env, distributed as a snap-in to Windows Powershell
Logs
Export SystemLogs
ESxi overview
Comin Info Mgmt (hw mgmt)
Virtual Machine Module (VMM)
Phys mach - Disks NICs, HD, RAM
1 vCPU
gets scheduled by kernel
VMM - virtual machine manager
newere processes - recognize virtualization
- VMM will automatically recognize to run better
- 1 place to manually set to force direct to physical process
Windows uses pages active, free, idle
- if kernel runs short on memory, kernel contacts baloon driver (installed with vmware tools
Memory Mgmt Unit - MMU - EXAM QUESTION
vnic ties to vsw ties to phys nic
vSCSI works with HBA and SAN or HD
DCUI
F2 from console
- Cfg root password
- cfg lock down mod
- cfg mgmt network
- vswitch0 wil have vmk0
- Restart Mgmt Net
- Test MGmt net
- restore net settings
- config keyboard
- troublshooting options (enable ssh here)
- view system logs
- view support info
- Reset sys cfg
VCenter will create vpxuser account EXAM QUESTION
Configuration / Networking tab Firewall at Configuration \/ SecurityProfile
NTP/DNS Routing
ESXi can be NTP client
best practices
create alternate accounts for admin/root privelages
VDI subscription 100 / year
Creating Virtual Machine
recommended to keep machine name simple
Virtual Machine Hardware (v8)
- keyboard
- mouse
- 1-2 flopy drive s 1 floppy controller
- 1 usb controller, upt to usb drives
- hd audio
- up to 4 ports - serial/com ports
- up to 3 ports
- / paraellel port
- 1 IDE controller , up to 4 devices
- 3d graphics
- video
- up to 1 TB RAM
- VM Chipset 1 CPU (up to 32 CPUs with virtual SMP)
- 41-4 SCSI adapters w/ 1-15 devs each
- 1-10 nics
Virtual Disk
stored in Server1.vmdk (description) and Server1-flat.vmdk
- Change windows 2008 to LSI Logic SASsnapshots allowed
custom installation mode choices disk- independent disk - persistent or nonpersistent (disk is read only, sets asside delta file
- thick
provisioned lazy zerioed (only zero out space used (on-demand)),thick
provisioned eagered zeroed (zero outwhole image) or thin provisioined
(only use when needed)
NIC
- Flexible - canfunction as either vlance (PCNET32 driver) or vmxnet (used to be work after installing vmtools)
- e1000 (w2k3 defaultedto this ) became e1000e (better performance
- vmxnet, vmxnet2, vmxnet3 (best today)availalbe only with VMware tools)
- whenver possible choose vmxnet3
- vmxnt2 (enahnced vmxnet) adapater with enhanced performance
- vmxnet3 builds on vmxnet2 adapater
Other Devices
- Connect to CDRom
- SCSI devices up to 60
Custom Cfg
Virt machine version (e.g. v8)
number of cpus, number of cores per cpu and size of memory
number ofnics, network to connectto, network adapter type
SCSI controller type
whether to creatdisk use existing disk oruse raw device mapping (RDM) or use nodisk
Other disk-provisioning settings
    wther to store virt disk with virt mach or in different datastore
virt device noe (for examplw (SCSI(0:0)
Mode-independent (persistent andnonperistent
thin provisioning
            
Raw Device Mapping
RDM enables you to store virt machine directly on Logical unit Number (LUN)
maping file storedon VMFS datastore that points to raw LUN
(normalllly virtual disk stored on VMFS or NFS.
this allows raw LUN (e.g. NTFS or ext3 - phyxical mode compatability (direct), virtual mode compatability (vmware manages))
    
installing Guest OS
installing
VMWare tools (adds SVGA,vmxnet,vmxnet3, balloon driver formemory
mgmt,improved mouse, virt machine heartbeat, time sycnh, ability to
shut down virt machine, adds additional choices to perfmondll
advise to synch time with NTP on vmware host OS
- remember that clock does not have ability to slow down when you enable.  set time ahead of time a little b
- vmware has white paper on best practices on time synch...
- when you do this - disable windows time service - kill in registry (?)
Virtual Appliance
down load OVF Templates from VA Marketplace
http://www.vmware.com//appliances
VCenter
Up to 1000 hosts managed per instances
up to 10,000 powered-on virtual machines per vCenter Server instance
linked mode (linking multiple vCenters)
up to 15,000 registered
vCenter svr has to have db (bundled sqlw2k express)
VMware vSphere Client logs into hostd daemon on host EXAMQUESTION
80 and 443 need to be open between vsphere client and vCenter ServerEXAMQUESTION
vCenter Server talks to ESXi host using vpxa user id 256 character serverEXAMQUESTION
vcenter server talks to host via vpxa daemonEXAMQUESTION
vpxa talks to hostd? 
vcenter core services 
addiitonal modules - update manager, orchestrator, site recofery manager, data recovery appliance
every module installed has server component and client component
initially installed modules - storage , hardware status, service status, auto deploy
inventory
root is initially created, build datacenters
- each datacenter has its own hosts virt machinees, templates, etc
- set up folder/file structure under to store guest installs
sections
inventory
admin
mgmt 
solutions andapplications
hosts and clusters inventory view
vms and templates inventory view
    when you create folders in one view, you don't see them in other view
datastores and datastore cluster inventory view
network inventory view
licensing - 25 char string 
product, license key, asset
events
listed in events tab
Networking
VMkernel ports needed for - exam question?
MGmt - VMK0 - vswitch0
IP Storage -iSCS /NAS / FCOE
vMotion
FT
vswitch
L2 device - virtual switch
can't communicate with another virtual switch
can combine bwonmultiple net adapters andbalance traffic
some portuplink,others vmkernal,othersvirtualmachine ports
can set up vlans (8-4088 ports (120 default) exam question
- hostcan have 4096 - 8 for host =4088
- can create256 switches per host
- may want to do this for security or redundancy purposes
- 802.1Q VLAN tagging supported
- stripped before going to virtual machines
- 802.3AD for NIC teaming supported
- network port security
- CDP
TYpes
- vNetwork standard
- vnetwork distributed
3 things show up in VM Network Properties/Securit
- Promiscuous Mode
- Mac Address Changes - normally set by kernel - affect traffic coming towards vm guest os 
- Forged Transmits - allows outbound - affects traffic coming from vm guest OS
Security
Traffic Shaping
- only on outbound traffic not incoming
Load Balancing options
- Originating Virtual Port ID (Default)
- Source MAC Hash
- IP Addr (Src/Dest) Hash
NIC Teaming
- defaultRoute based onoriginating virtual port ID
Detect Network failure
- Link state
- LInk state and Beacon
    
Storage Concepts
Disk Drive Companies
Compellent
Left Hand
Equalogic
NetApp
Considerations
Cost
Availability
Latency
BW
IOPS
Multi Pathing
PUT IN CHART 6-8
iSCSI - remote boot supported
Fibre Channel
FCoE
Direct Attached (DAS)
- only support RDM and virtual swap files
NAS (Use NFS not VMFS on this one)
- NFS doesn't support Raw device Map (RDM) or ability to remote boot
VM -> Q -> HBA -> SAN -> LUN
Queue stacks up to 32 commands / LUN
VMFS
VMFS3 
- 256G  - 1MB block size
- 512 G 2MB block size
- 1T - 4 MB block size
- 2T - 8MB block size
- block sizes broke into 64kb chuncks
VMFS5
- Can only upgrade to VMFS5 if all guest OSes are in VSphere 5
- Allows concurrent access storage
- cnan be dynamic expand
- 1MB block size
- subblock size 7kb
- on-disk,block-level locking
NFS
- NFS v3 over TCP Supported EXAM QUESTION
- storage shared over network at file system level
Storage Device Naming Conventions
- SCSI ID
- Canononical name - Net Addr Auth ID is unique LUN id, garaanteed to be peristent across reboots
- can also be ided wiht mpx or t10 ids
- runtime name - uses convention vmhbaN:C:T:L.  Not persisten through rebooots
- LUNs can be presented differently to different hosts
Physical Storage Considerations
- LUN sizes
- I/O BW
- Disk cache paams
- zoning and masking
- Identical LUN presentationsto each ESXi host
- Active/Active or Active/Passive arrays (# of controllers and paths are active)
- Path Selection Policy (PSP) - fixed/preferred for active active
- if you set this to MRU yuo can caus array thrashing
- PSP is Most recently used (MRU) or Round Robin (RR)
- Export properties for NFS datastores
- administrator has to change attributes to allow root access to exported folder
iSCSI
iSCSI storage system
physical HDs
-> LUNs
-> Storage processors (SPs)
-> TDCPIP net
-> HBA or iSCSI
Names
iqn (iSCSI qualified name
iqn.(year-month alias licensed).mycompany.stor1-47cf3c25 
    or
eu.fedcba9876543210
iSCSI alias : stor1
ip addr : <ipadddr>
    
iSCSI initiator
iqn.1998-01.com.vmware:train1-64ad4c29
    or
eui.12345677890123456
iscsi alias: train1
IP addr:
- software iSCSI (iSCSI initator, TCP/IP, NIC Driver all in kernel...NIC is only HW componenet
- dependent hardware iSCSI (shares responsibilites with VMkernal) - iSCSInet cfg, NIC driver
- independent hardware iSCSI (vmware 5 no longer needed to remote boot fromindependent hw iSCSI)
Configuring
- Cfg VMkernel port
- enable sw adaptor
- cfg IQN and alias
- cfg iSCSI sw adapter properties, such as static/dynamic discovery addrs and iscsi port binding
- cfg iSCSI security (eg.g. CHAP)
2 discovery mehthods
- static
- Dynamic
initiator sends out SendTargets request, & get back SendTargets response over IP network (EXAM Question)
options for CHAP
- do notuse CHAP
- DO not use CHap unless target requires
- use CHAP unless prohibed by target
- use chap
HW iSCSI
NAS/NFS
NFS svr 00 NIC/ IP net - NIC - virt sw - host
create vmkernael port for better perf and security, separte from iSCSI network
Gist s and Clusters / Cfg tab / storage link
datastores view / storage views tab
multipathing
- cfg 1 vmkernel port
- use adapters tattached to same phys switch to cfg NIC teaming
- cfg NFS svr with mult ip addrs (can be on same sub)
- mult links cfg NIC teamswith IP hash load-balancing policy
Fibre Channel SAN with ESXI
storage system -> HDs - LUNS - SPs - Fibre Channel ) switches "the fabric"...
WW name (WWN) 64 bit adddr assigned to Fibre Channel node (8 bytes)
LUNs
can be hidden or masked (maskedmakes LUN invisible " when target is
scanned (can't do from vSphere client, can do at command prompt or
sorage processor end
- install fibre channel adapters in ESXi host
- adapters are recognized by host during boot sequence
Create VMKernel port - can only have one 1 to 1 relationsihp
multipathing means need multi ways to get to dat astore
multipathing with SW FCoE (can't run over regular Ethernet switch)
VMFS Datastore
- optimized for storing / accessing large files
- maxvol size 64TB
- NFS stores greatforstoring virt machines, but some functions no suppeorted
- use RDMs if virt machin
- performing SAN snapshotting
- clusttering to a phys mach
- large amounts of data that you do not  want to convert intoa virt disk
VM4 2TB Extends (32 of the) get you up to 64TB total
no extens can be 64 TB (tstill 32 of them if necessary)
Increasing size
VMS4 used to be volume grow, VMS5 expanding (withing extent)
Virtual machinepower state 
multipathing algorithms
Pluggable Storage Architecture (PSA)
- NMP (NativeMultipathingPlugin)
    - SATP (Storage Array Type Plugin)
    - SATP-xx
 Mfg can create their own modules, and should work better (?)
Multi Storage Paths
- Manage Paths (choose path selection policy
    
VSA - vSPhere Storage Appliacne
vSphere Storage Appliance
Allows hardware on ost to be shared storage
supports vmotion HA, DRS
take localdrives,create images on other machines 1->2 2->3 3-1, etc
export these as NFS mounts
install VSA Manager in vcenter server 5.0
vsa cluster service
recommended 24GB RAM, 4 hard disks, RAID controller, Gigabit Ethernet switches
- need 2 physical nics for appliance
vsamgr ip
nfs vol ip
vmotion ip
esxi host ip
new for 5.0
need separate cluster from existing production cluster
Clones
Templates
master copy of virtual machine (never powered on)
have to convert to machine to power on.
to create - right click on virt machine and template/cloned/convert to template
clone to template can happen powered on or off, convert must be powered off
.vmtx extension
VM and templates inv vie
hosts view\to deploye - right click on template and deploy
Virtual Machine Options
VMware tools
check and upgrade tools during power cycling
Boot options
- Delay power on
- Boot into BIOS
- Retry afterfaild boot
- CPU/MMU Virtualization
- Swapfile locations - use defaultsettings (with guest's files)
Migrating Virt Machines
- cold - poweredoff
- suspended 
- vMOtion - migrate virt machine that is powered on
- Storage vMotion - migrate virt machines files, while virt machine is powered onto a different datastore
max of 8 simultaneous vmotion, cloning,
Copy Comparison of Migration Types Chart
good to have separate network for vMotion from Production
- guest OS quiesc'ed (sp) during vmotion, but users will not notice...
reqs:
- must not have connection to internal (lonly vSwitch)
- must not have conn to virt device (such as CD-ROm or flopy) with local image mounted
- must not hvae CPUaffinity cfg'ed
- 128 concurrent vMotion migrations per VMFS datastore
- at least 1Gbps network (4 concurrent migrations), 8 in 10Gbpps
- Identical named port groups connected to same physical networks
- Compatible CPUs
- CPU feature sets of both source and desthost must be compatible
- Some features can be hidde using Enhanced vMotion Compatibility (EVC) of compatibilty masks
CPU Constraints on vmotion
- cont care about clock speeds cach sizes,number of cores
- do care about Mfg, family, presencs of multimedia sinstrucgtions (e.g. SSE3, SSSE3, SSE4.1)
- do care abuot Virt HW assist codes in cpu
- do care about NX/XD bit disabled/enabled
- can reset hiding or exposing in Guest settings 
To check if CPUs are similar, use VMware CPU identification utilty.
ToDo
- Look at Maps tab under machine
- red x - make sure vmotion enabled in settingsand both machines can see shared disk
- if it doesn't work, will get error msg indicating problem
StoragevMotion 
moving between shared storage locations
- initiate storage migration
- copy data usigng VMkernel data mover or vSPhere Storage APIs - Array Integration (VAAI
- start virt machin process
- mirror IO calls to fileblocks that havealready been copied to virt disk on dst data store
 
Snapshots
allow preservation of state ofvirt machin so can return to same state repeatedly.
don't use for backups, every snapshop relies on parent
snapshots are differential (?)
- freeze flat vmdk file,keep delata vmdk file
- snapshot list  (.vmsd) keeps track of virt machines snapshots
you can take a snapshot whil virt machin running or suspended or powered off
delet/delete all less problem in VMWare 5.0
- will only delete snapshot (even if snapthot in middle of chain)
- delete all deletes everything below 'you are here'
- no longer keeps all when deleting all from end of chain
- snapshot
consolidation - method used to commit chain of snapshots to original
machine when snapshot mgr shows no snapshots exist, but desta files
still remain onthe datastore
- will show up on summary tab ' virtual machinedisks consolidation is needed'
- machine right-click - Snapshot/consolidate
vApp
- iscontainerfor one or more virtual machines
- group control
Remove Virtual machine
remove from inventory 
delete from disk
Converter Standalone
convertvirtmachine to virt machine
- convert hyperv to vsphere
- move from data cntr to 2nd data cntr
- windows /linux sources
- hyperV 
- 3rdparty image formats
- can export the other way
- enables
- reduce time to set up new virt machines
- migrate legacy svrs to new hw wout reinstall
- migrate across hetero hw
- ...
- put on separate desktop from vmware
- install on Windows w/ min 525MB disk space for components.
- sourcemachine reqs 350MB
- steps
- clone
- install sysprep if necessary
- install converter agent
- volume shadow copy/shapshot
- create new hsot and start copying disk image to new datastore
- hw changes
- cpu mod / serial
- mac addr
- graphc card
- ...
- can do hot clone (while OS is running).
roles and permissions
Reserved resources
CPU
- shares -low/normal/high/custom/500/1000/2000 only works if there is contention for resources
- Reservation (how muc MGHZ of processor) up to 1 core
- memory shares, reservation (MB), Limit
- reservation up to allocated memory
- Allocated memory can use swap
- reserved memory guarantees memory rest can swap
- 1Gig allocatd 512MB Reserved, can power 8 machines in 4 gig of memory
- 1Gig
allocated 512 Reserv, 724 MB limit (latter can come from phys ram or
swap, but above limit must come from shares or vswap or balloon
activitiy)
- Resource Pool
- CPU Shares Reservation, Limit
- Memory resources - Normal
Balloondriver can recover 65% by default
    free, than idle, than in use
if you keep reservatino at 35%, neverhave to use swap file, but ha can get messed up
FT 1GB becomes reserved
Carl Waldspurger designed memory swapping for vmware...
Resource Mgmt and Monitoring
memory
can overcommit memory due to swap and share
create a default virtual machine 384MB (swap space equals)
Virt machines power on only if
- minimum mem avail is overhead memory
- swap file size equals the diff between allocated and reserved mem
Transparent page sharing - allows pages with identical contents to bestorednly once
Baollooning mechanism, adctivewhen memory is scarce forces virtual machines use their own paging areas
memory compression - compressed to 2KBand stored in per-virtual machine compression cache
- mem pages that are candidates for swap to disk are targetted for compression
- decompressing acomprfessedpageinmemory is faster than reading from disk
 
Virtual SMP
hyperthreading =- doubles # of threads or ccpus
cpu loadbalancing can load balance across threads
max is 160 logical cpus (including hyper threading
- sockets * cores * 2 if hyperthreading
 
Resource Contention
Virt machine will only poweron if reservatino can be guaranteed
Shares
- 1000 3000 1000 (2nd item will get 3/5ths of resource)
- kernel will try tokeep svcpu on same core, as NUMA nodes try to tyie to same RAM
- vmmemctl (baloon driver from vmware tools)
Chart
Resource Pool
logical abstract for hhierarchicaclly managing CPU and memory resources
used on standalong hosts or clusters
isolation between pools and sharing within pools
access control anddelegation
separation of resoruces frohw
mgmt ofsets of virt machines running on multitier svc
- not contentian based- guaranteeing at the pool level
- expandable reservation might allow a rogueapplication to claim all unreservedcapacity
- expandable
reservation - allows pool to grabmoreresourcethanreserved can be
grabbed from chjild resource and direct parent resource pool
admission control for VM
- are resoruces available, or can they be gained or borrowed
WHere do you go to find memory info - Resource Allocation tab EXam question
Resrource monitoring
- Task Manager
- Perfmon
- resoruce charges in vCenter Server
- if CPU constantly high, may beCPUconstriained
- check CPU Ready graph of virtual machine - (ready is vCPU waiting for real core)
- memory issues
- check to see if balooning (under performance tab)
- look on host for lots of swapping
- check virt machine for active memory
- disk latency
- kerneel command latency- avg tim spent inVMkernael per SCSI command
- high numbers (> than 2-3 ms) represent either overworked array or overworked host
- phys device command latency
- avg timefor phys device 
- > 15-20 seconds bad
- VMware performance charts - OVerview panel
- advanced performance charts (under performance tab)
- rollups conv funct betw statistic intervals(e.g. 5 minutes of past hour stats converted to1 past-day value)
- Setting Log levels (none, error, warning, info, verbose, trivia)
- save chart as graphics
Alarms
- Condition based trigger (number based)
- event based trigger (something happened)
- default alarms for everything
- to create alarm, right click on inventory obj, select Alarm/Add Alarm
- General tab - monitor for specific conditions or events
- trigger 
- econtdition trigger -virt machine currentsnapthot over 2GB
- e.g. host using 90% of total mem
- datastore hasbeen disconnected fromall hosts
- reporting tab
- range, (repeat when condition exceeds range) 
- repeat every ?? minutes
- actions
- email, snmp trap, run command
- EXAM question - SMTP server, back-end sender account
- Alarms stored in alarm tab
 
HA
vCenterServer relies on database and AD structure
- cluster the db
- set up multiple redundantADsvrs
- use vspher HA to protech vcenter virtualmachine
- use vcenter server heartbeat
vCenter Server can be virtual or physical
- minimal downtime
- works with all supported guest operating systems
- workswith all supported sxi hw
- provide protection against failure ofa nESXi host
in v4 vmware cluster (whole set of hosts)
- 1st 5 hosts becomes primary (knows about all hosts, cfgs, etc.)
- rest of hosts start out as secondary
- you can promote secondary to primary
leaves virtual machine powered on if it thinks others- isolation response mode - 
- files are locked
- ha agent loses heartbeat
- ha agent looks at files,and doesn't see time stamp
in v5
- 1st host becomes master, restare secondary, if master fails, election for new master occurs...
- vcenter critical to functionality
- ha can restart hosts or application via vmwaretools
- applications need VMware tools andinstalledpiece from mfg
- relies on SAN/NAS/ shared storage to function
- HA is a cluster feature
- enable HA
- Host Montitoring sttaus
- Admission control (power on operations that violate availability constraints (e.g. cpu or chassis running guest OS rules)
- Admission control policy 
- (how many host failures cluster tollerate)
- % of cluster resources reserved as failover spare capacity
- slot
size is avg # of resources to meet requirements (used to be 256MHz and
256 MB default) HA will monitor and look at avgCPU/Memory requirements
- reservations will make HA assume everyone needs this reservation size
remember can only monitor application
if doing maintenance disable host monitoring
host monitoring separate from vmware told monitoring (VM monitoring or application monitoring)
Heartbeat Datastores
master contacts vcenter for connectivity to lost vm
looks on datastore for same
can set min/max for slot size
Neverfail application copies LUNs et. al. over to new locations
vcenter svr talks to vpxa which talks to host d wand FDM(Fault Domain Mgr?)
rememeber master uses datastore heartbeats as well as machine and guest and app heartbeats
- can have up to 5 datastore heartbeat locations (?)
- if host get's olatded, goes into isolation response mode(as set)
- can implement redundant heartbeat networks
- implement redundant isolation addresses
vcenter can only talk to 1 master
- insplit network situation,will never talk to 2nd (locally elected) master
Fault Tolerance
- hidden guest running
- does not work with all hw supported - needintel vt or amdv instruction sets
- one becomes primary, secondary hidden running onsecondary
- vLockstep technology coordinates EXAM QUESTION
- ideally 2x2 physical nics for mgmt and heartbeat and other
- any writes on primary get buffer duplicated tosecondary (which r/o link to shared storage)
- when primary goes down, secondary becomes primary, and another instance comes up as secondary
- guidelines
- make sure you have enough hosts
- disable power mgmt features running in BIOS
- Fault Tolerance reacquires only one CPU
- everything has to be done from primary.
- DRS will always puts primary and secondary on different machines
Host Profiles
- quick way to make changes to many hosts
- CPU
- memofry
- storage
- networking
- licensing
- (something else)
- force hosts to look at host profile and update
- cluster scans againsthost profile
- tab is cluster / profile compliance (CHekck Compliance Now)
- Apply profile - forces compliance
- host has to be in maintenance mode - 
- create/check/update/import answerfile
WHAT IS MAINTENANCE MODE?
DRS - Distributed Resource Schedule
set under cluster settings- manual - suggests recs you move
- partially automated - auto place hosts at power on,andvcenter migration recs for virt machines
- fully automated - automattically placed at power on and auto migrated
- can
be conservative to aggressive (aggressive does everything, conservative
does less - recommend leave in center between - default)
- aggressive doesn't always work as it by default moves most heavily used machine
- EVC turn on will exclude nonEVCed hosts out of the cluster
- all CPUsfrom single vendor (Intel or AMD)
- use IntelCPUswith core 2 micro architecture andnewer
- use amd 1st gen opteron cpus ornewer
- chost must be hw virt enabled
- hosts...
- swap files can be insame dir as virt,or in datastore specified by host
- affinity rules - can keep machines on same hosts
- anti-affiinity rules
- preferential rules aresoftly enforced nd can be violated if necessary
 
Adding Host to Cluster
- cannot create resource pool under host if added to cluster
- Grafted from is when you add host and drag resource pools
- DRS tab on cluster to look at recommendations, edit cluster properties, etc.
- any recs that can't be applied after attempting to apply, will show up in the Faults tab/button
 
Removing host from cluster
- put host in maintenance mode
Improveing virt machin pedrf
- fine- usic taffic shaping through broad usea DRScluster,use storage multipathing
HA might no be able to fail over machines
- HA admision congtrol is disabled
- reqquired virt machines to hosts affinity rule prevents HA from fialoing over
- Sufficient aggregated resources exist, bu t they are fragmented across hosts
- HA uses DRS to try to adjust cluster by migrating virtual machines to defragment the resources
DPM (Distributed Power Mgmt)
set under cluster setting- Operates
on ESXI - hosts can be awakened from standby mode with WOL packets or
IPMI based remote power on (WOL send from antoher esxi chost in cluster
- will poweroffhost if cluster load is low - considers a 40 minuteload history
- all virt machines on selected host migrated to other hosts
- if loadishight,considers 5 minute load history
- suggested that Intel SpeedStep and AMD PowerNow are powered off
Distributed Switch
template that rolls out hidden standard switches
NEED ENTERPRISE PLUS LICENSE
port mirroring netwflow
dviPortGroup
portbindingtype
up to 350 hosts
vcenter owns cfg, consistent across all hosts
has to happen within data center 
may not want to put distributed switch on mgmt ports (e.g. vswitch 0)
benefits
simplified datacenter admin
provide support for private VLANs
enable net statistics and plicies to migrate with virtual machins during a migration with vMotion
provide for customization andthird development
home/inventory/networking
can put one physical link in uplink
Connecgt VItrt Mach to Dist Port Group
right-click edit settings, put port into port group
IO Plane is control plane
adds inbound traffic shaping
vm networkport block
private vlans
load-based teaming
datacenter-level management
network vmotion
vnetwork switchAPIs
per-port policy settings
Port binding
- configured at port gorouplevel in settings
- static- defined directly agsinst vm, don't give port up when powered up - Default
- Dynamic port 1st virtual machines powered on grab port
- ephemeral - ports power on as you power on virtual machines
VLANs and PVLANs
 pvlan anextensionof VLAN standard - furhter 
secondary VLAN only exists within primary
Need to have physical switch that understandsPVLANs
types
- promiscuous - can communicate together and outside
- isolated - cannot communicate together, can connect out thtrough promiscous
- community 0can talk together , but cannot go outside - must connect out through promiscous
standard 802.1Q tagging,no double encapsulation
Packets travel tagged with secondary id
phys switch can be confused by fact that each macaddr is visible on vlan tag
CDP or LDLLDP can listen advertise or do both
Network I/O Control
group traffic into network resourcepool, set share a sn limits to control traffic priority
set from resource allocation tab
# of traffic types defined
NetFlow
net analysis tool for monitoring traffic and for gaining visibiltiy into virt
sends summary packets to netflow collector
Port mirroring
source and destination info entered
Storage APIs
array integration, storage awareness, cfg and use profile-driven storage
VAAI - VMware API Array Intration
vendors provide plogins for IO operations sothatarrays do alot offunctions formerly relegated to the host
- HW Accelerations APIs
- Array thin provisioning APIs
VASA -VMware API storage Awareness- plugins for vcenter todetermine capabilities of SAN
- home/storageproviders
profile driven storage
- classify datastores based on levels of capabilit
- can have multiple vm storage profiles per machine
- matches up with host compliance to drs make complieant
 
Storage I/O Control
cluster wde storageI/O prioritization
allows for betterworkloadconsolidation
helps reduce extra costs associatedwith overprovisioning
- Datastoresmust bemanaged by single vCenter 
- no extents
Datastore cluster
collection of datastores grouped together to take advantageof things at a cluster level
storage drs can be enabled to control
- do not mix VMFS and NFS
- can mix vmfs3 and vmfs4
- do notmix replicatd datastores
- relationships - any host to any data store cluster
- storage drs can manage using storage vMotion
- when virt machines created cloned or migrated
- you select datastore cluster, and DRS takes care of the rest taking into account default affinity and anti-affinity rules
- Migration recs are executed
- when IOPS response time is exceeded
- when space util threshold exceeded
- ....
- space util threshold checkedevery 5minutes
- IOPS laod history checked every 7 hours
- storage DRS selects datastore based on util and IOPS response...
- afffinity and anti-affinity rules kick in
- recommendations show up in storage DRS tab, and you can apply from there
- storage DRS maintenance mode, means put datatstore out o f use in order to service it.
- don't schedule during backups
- everything supported, but ESXi5(+) onlyl
Patch Management
centralize,automated patch and version for ESXI hosts virt mach hw,vmware tools, and virt appliances
- automated patch downloading
- begins with info only downloading
- scheduled at regualr intervals
- contacts sources for patching (e.g. hostupdate.vmware.com, 3rd party patch location
- Creation of baseline andbaseline groups
- Scanning
- inv systems scanned for baseline compliance
- remediation
- inv systems thatare not current can be auto patched
- reduces number of reboots required after VMware Tools updates
Components
- db, update mgr svr, vcenter,...
- must be in stalled onwindows 64-bit machine
- to install, start vmwarevcnterinstaller,and click vmwaer vspheere update manager
- info needed during the instlalation
- settings
- networkconnectivity
- downloadsettings
- downloadschedule
- notification check schedule
- virtual machine settings
- ESX HostCluster Settings
- vApp
Creating baseline
- fixed (static),Dynamic (alwayscurrent)
Attaching baseline tocluster
- all elements scan against baseline
- remediate on scheduledbasi
- can manually scan
- version 5 can do multiple hosts at one time
Can remediate virtual machine, templates, hosts
- at host consider disableingDPM,HA,andFT
- if patch is recalled, binary stripped out of repository, ifyou've already installed it, you need to manually uninstall
- update mgr puts host into maint mode
- DRS moves virt machines to aviail host
- update mgr patches host and exist maint mode
- DRS moves virt machines back per rule
Checking physical MAC addresses
From the CLI:
# esxcfg-nics -l 
# esxcfg-vswitch -l
# esxcfg-vmknic -l