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
- 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>
Vitualization white paper: http://www.vmware.com/files/pdf/VMware_paravirtualization.pdf
VI3 (VMware Infrastructure 3):
- Virtual SMP (max 4 cpus in VM)
- VMFS (VM storage file system)
- Storage VMotion
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:
- ESX Server
- VI Client
- Host Agent
- Lic. Server
- Shared Datastores
VCB: VMware Consolidated Backup
Command Line Tools:
- 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