Contents
VMware VI Notes
VI allows dynamic mapping of compute, storage and network resources to business apps.
Not simulation or emulation (it is hardware virtualization).
VM composed of:
- Config File
- Virtual Disk
- NVRAM settings
- Log Files
Benefits:
- Encapsulation (files)
- Independence (HW)
- Isolation (from other VM's)
- Insulation (HW changes)
initrd -> linux loads VMKernel, which then takes over host
VM's stored in /vmfs/volumes/<dirname>/<VM>
Products:
- Server
- Player
- ACE
- Workstation
- ESX(i)
Vitualization white paper: http://www.vmware.com/files/pdf/VMware_paravirtualization.pdf
VI3 (VMware Infrastructure 3):
- ESX(i)
- Virtual SMP (max 4 cpus in VM)
- HA
- DRS
- VMotion
- VMFS (VM storage file system)
- VCB
- VUM
- Storage VMotion
- Converter
VirtualCenter (management)
ESX Server hypervisor is AKA the VMkernel.
(note - check out FastSCP for ESX->Windows)
Processor Check for 64-Bit Compatibility
The VMware "CPUID" tool provides a bootable ISO image that will do CPU compatibility checks for 64-bit guests, etc.
Supported systems for ESX server:
VI Components:
- ESX Server
- VI Client
- Datastore
- Host Agent
VirutalCenter (optional)
- DB
- Lic. Server
- Agent
- Shared Datastores
VCB: VMware Consolidated Backup
Command Line Tools:
- vcbVmName
- vcbSnapshot
- vcbMounter
- vcbExport
- mountvm
- vcbRestore
- vcbUtil
Command |
VCB Proxy |
Service Console |
vcb* |
yes |
yes |
mountvm |
yes |
no |
vcbRestore |
no |
yes |
vcbUtil |
no |
yes |
Security Consideration
- Must connect to VC or ESX Server, so root user not recommended. Instead, create a windows user "vcbuser", then create a custom role in VC named "VCB Proxy User" containing following privileges: Allow Virtual Machine Download, Create Snapshot, Remove Snapshot, Allow RO Disk Access and Disk Lease (Note: VC 2.5 has a predefined role already). Then assign this role to "vcbuser".
Identifying a VM
vcbVmName -h <VC-Server-IP> -u vcbuser -s ipaddr:<VM-IP>
One may also find a VM by its DNS Name, BIOS UUID (Universally Unique ID), or MoRef (Managed Object References). MoRef format is vm-#### (for VC) or moref:### (for ESX, where ### = VM ID).
However, do not use MoRefs to ID VM's because they change when VC or the hosting server restarts. Using them in a script is preferred however, as they cause less search overhead (just query for the current MoRef at the start of the script).
Full VM Backup
vcbMounter -h <VC-Server-IP> -u vcbuser -a name:<VM-Name> -t fullvm -r c:\Backups\<VM-Name>-full-1
Creates a full backup of the VM to the directory specified on the VCB Proxy. A catalog file will also be created, a text file containing restore information (eg: location & resource pool to restore to).
Individual Disk Backup
- Get VM ID:
vcbVmName <hup> -s ipaddr:<VM-IP>
where <hup> is -h <VC-Server-IP> -u vcbuser
- Create VM Snapshot:
vcbSnapshot <hup> -c moref:vm-#### <Snapshot-Name>
- Get list of disks in Snapshot:
vcbSnapshot <hup> -l moref:vm-### ssid:<from above cmd output> These commands are run in the Service Console.
- If snapshot already exists, use the following to find ssid:
vcbSnapshot <hup> -f moref:vm-#### <Snapshot Name>
- Export the desired disk:
cd /vmfs/volumes/<VM storage dir>
vcbExport -d export1.vmdk -s <VM dir>/<vmdisk>.vmdk
- Remove Snapshot
vcbSnapshot <hup> -d moref:vm-#### ssid:<from above>
Restore from VCB Backups
Individual Disk Restore
- Restore individual disk:
vmkfstools -i export1.vmdk restored.vmdk