Thursday, July 19, 2012

Force power off vmware virtual machine on ESXi 5

1/ Temporarily allow SSH on ESXi
2/ SSH to ESXi
3/ esxcli vm process list
4/ find world-id of vm you want to shutdown
5/ esxcli vm process kill --type=force --world-id=

More info:
http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=1014165

Saturday, June 30, 2012

Zerto DR & BC

 http://www.zerto.com/

Zerto’s hypervisor-based replication and recovery technology is a software-only solution for business continuity and disaster recovery of virtualized production applications deployed in data centers and the cloud.

Monday, June 25, 2012

impitools

POWER CONTROL

Power on server:

ipmitool -I lan -H 192.168.4.5 -U root -P calvin chassis power on

Power off server:

ipmitool -I lan -H 192.168.4.5 -U root -P calvin chassis power off


Server status:
ipmitool -I lan -H 192.168.4.5 -U root -P calvin chassis status


All chassis power Commands: 
status, on, off, cycle, reset, diag, soft 

SENSORS


List all sensors and their status:
ipmitool -I lan -H 192.168.4.5 -U root -P calvin sdr list

List temperature sensors and their status:
ipmitool -I lan -H 192.168.4.5 -U root -P calvin sdr type temperature

Get temperature from particular sensor id:
ipmitool -I lan -H 192.168.4.5 -U root -P calvin sdr get 'Ambient Temp'

All Sensor Types:    Temperature                 Voltage                 
    Current                     Fan                     
    Physical Security           Platform Security       
    Processor                   Power Supply            
    Power Unit                  Cooling Device          
    Other                       Memory                  
    Drive Slot / Bay            POST Memory Resize      
    System Firmwares            Event Logging Disabled  
    Watchdog                    System Event            
    Critical Interrupt          Button                  
    Module / Board              Microcontroller         
    Add-in Card                 Chassis                 
    Chip Set                    Other FRU               
    Cable / Interconnect        Terminator              
    System Boot Initiated       Boot Error              
    OS Boot                     OS Critical Stop        
    Slot / Connector            System ACPI Power State 
    Watchdog                    Platform Alert          
    Entity Presence             Monitor ASIC            
    LAN                         Management Subsystem Health
    Battery                     Session Audit           
    Version Change              FRU State



Other IPMI commands

Copy from http://www.openfusion.net/linux/ipmi_on_centos.html
 
# IPMI commands
ipmitool help
man ipmitool

# To check firmware version
ipmitool mc info
# To reset the management controller
ipmitool mc reset [ warm | cold ]

# Show field-replaceable-unit details
ipmitool fru print

# Show sensor output
ipmitool sdr list
ipmitool sdr type list
ipmitool sdr type Temperature
ipmitool sdr type Fan
ipmitool sdr type 'Power Supply'

# Chassis commands
ipmitool chassis status
ipmitool chassis identify [<interval>]   # turn on front panel identify light (default 15s)
ipmitool [chassis] power soft            # initiate a soft-shutdown via acpi
ipmitool [chassis] power cycle           # issue a hard power off, wait 1s, power on
ipmitool [chassis] power off             # issue a hard power off
ipmitool [chassis] power on              # issue a hard power on
ipmitool [chassis] power reset           # issue a hard reset

# Modify boot device for next reboot
ipmitool chassis bootdev pxe
ipmitool chassis bootdev cdrom
ipmitool chassis bootdev bios

# Logging
ipmitool sel info
ipmitool sel list
ipmitool sel elist                       # extended list (see manpage)
ipmitool sel clear

SOL - Serial over LAN (connect to console redirection)

ipmitool -I lanplus -U root -P calvin -H 192.168.2.62 sol activate

ipmitool -I lanplus -U root -P calvin -H 192.168.2.62 sol deactivate
 
 

Wednesday, June 13, 2012

vSphere SDK for Perl - Script Repository

NetWare Server Migration Physical to Virtual (P2V) using VMware

Master’s guide to VMware Fault Tolerance

Extending an EagerZeroedThick Disk

http://blogs.vmware.com/vsphere/2012/06/extending-an-eagerzeroedthick-disk.html

~ # vmkfstools -X 6G -d eagerzeroedthick  /vmfs/volumes/cs-ee-symmlun-001A/cormac.vmdk                                              
Grow: 100% done. All data on '/vmfs/volumes/cs-ee-symmlun-001A/cormac.vmdk' will be overwritten with zeros from sector <8388608> onwards.
Zeroing: 100% done. 

VAAI

The following outputs shows that Hardware Acceleration is enabled on ESX to take advantage of the storage primitives on ESX 4.1 and ESXi 5.x. Use the esxcfg-advcfg command to check that the options are set to 1 (enabled):

# esxcfg-advcfg -g /DataMover/HardwareAcceleratedMove
# esxcfg-advcfg -g /DataMover/HardwareAcceleratedInit
# esxcfg-advcfg -g /VMFS3/HardwareAcceleratedLocking

To check if the storage array supports VAAI primitives, you can use the following command:

esxcli storage core device vaai status get -d naa.60a98000572d54724a346a6170627a52
VAAI Plugin Name: VMW_VAAIP_NETAPP
ATS Status: supported
Clone Status: supported
Zero Status: supported
Delete Status: supported
 

Tuesday, June 12, 2012

Custom ESXi 5 ISO for UCS, Nexus 1000v and PowerPath VE

Get the maximum IOPS (PowerCLI)

http://www.lucd.info/2011/04/22/get-the-maximum-iops/

$metrics = "disk.numberwrite.summation","disk.numberread.summation"
$start = (Get-Date).AddMinutes(-5)
$report = @()

$vms = Get-VM | where {$_.PowerState -eq "PoweredOn"}
$stats = Get-Stat -Realtime -Stat $metrics -Entity $vms -Start $start
$interval = $stats[0].IntervalSecs

$lunTab = @{}
foreach($ds in (Get-Datastore -VM $vms | where {$_.Type -eq "VMFS"})){
  $ds.ExtensionData.Info.Vmfs.Extent | %{
    $lunTab[$_.DiskName] = $ds.Name
  }
}

$report = $stats | Group-Object -Property {$_.Entity.Name},Instance | %{
  New-Object PSObject -Property @{
    VM = $_.Values[0]
    Disk = $_.Values[1]
    IOPSMax = ($_.Group | `
      Group-Object -Property Timestamp | `
      %{$_.Group[0].Value + $_.Group[1].Value} | `
      Measure-Object -Maximum).Maximum / $interval
    Datastore = $lunTab[$_.Values[1]]
  }
}

$report

File Server Capacity Tool v1.2- (64 bit)

Tool for file server (cifs/smb/smb2) benchmark and capacity planning.

http://www.microsoft.com/en-us/download/details.aspx?id=27284

Monday, May 28, 2012

Fundamentals of vSphere Performance Management

http://www.doublecloud.org/2010/03/fundamentals-of-vsphere-performance-management/

Performance monitoring is a critical aspect of vSphere administration. This article introduces you the basic concepts and terminologies in vSphere performance management, for example, performance counters, performance metrics, real time vs historical statistics, etc. Much of the content is based on my book VMware VI and vSphere SDK by Prentice Hall.
Once you understand these basics, the related tools and APIs should be relatively easy. If you are already familiar with vSphere Client performance monitoring or esxtop, they help as well.

Performance Statistics (PowerCLI) 
http://www.sandfordit.com/vwiki/Performance_Statistics_(PowerCLI)

Performance Statistics (Perl SDK) 
http://www.vmware.com/vmtn/technology/developer/webinars/vi-perl-toolkit_webcast_2006-10-11.pdf

Thursday, May 17, 2012