Posts

Showing posts from March, 2014

How to Add VMware PowerCLI to Standard PowerShell Enviroenment

1. create a file with name "Profile.ps1" under %windir%system32WindowsPowerShellv1.0profile.ps1 2. Add following content to the file. # Adds the base cmdlets Add-PSSnapin VMware.VimAutomation.Core # Add the following if you want to do things with Update Manager #Add-PSSnapin VMware.VumAutomation # This script adds some helper functions and sets the appearance. You can pick and choose parts of this file for a fully custom appearance. . "C:Program FilesVMwareInfrastructurevSphere PowerCLIScriptsInitialize-PowerCLIEnvironment.ps1" You need administrator permission to create file on the system32 location.

How to configure vSAN on nested ESXi hosts with SSD hard disk

There are lot of articles introduce vSAN feature and steps by steps guide. I referred William Lam's article & Duncan's article  to configure vSAN on my lab, I was true I exactly followed his steps to configure the vSAN, but I can not saw anything under disk field under Disk Management. Please note: Following steps does not work for ESXi 6.0 RC on VMware Workstation 10. You have to set scsix:y.virtualssd = 0 in vmx file to mark the disk as non-SSD. Please refer to William's article for detail. After looked into it deeper, I found something interesting: esxcli storage core device list I got that output: mpx.vmhba1:C0:T1:L0 Display Name: Local VMware, Disk (mpx.vmhba1:C0:T1:L0) Has Settable Display Name: false Size: 5120 Device Type: Direct-Access Multipath Plugin: NMP Devfs Path: /vmfs/devices/disks/mpx.vmhba1:C0:T1:L0 Vendor: VMware, Model: VMware Virtual S Revision: 1.0 SCSI Level: 2 Is Pseudo: false Status: on Is RDM Capable: false Is Local: true Is Removable: false I

How to setup NTP services by PowerCLI

NTP service is very important for troubleshooting, vmkernel log timestamp is incorrect if your NTP service is not running and ESXi system time is wrong. It can also impact to VM system time even you disable time synchronization on VMware Tools since VM still need to sync time with ESXi after awake from suspended status, finish vMotion, or revert from snapshot. I know it’s simple to configure NTP services on single how, what if you want to configure NTP service on massed hosts? Basically we have 3 steps to make sure NTP service working properly: Configure NTP server IP address. Bring up NTP service. Set services startup along with ESXi system. Let’s try PowerCLI: Get-VMHOST -Location Cluster Name | Add-VMHostNtpServer -NtpServer " NTP server address " Get-VMHOST -Location Cluster Name | Get-VMHostService| Where-Object {$_.key -eq "ntpd"} | Start-VMHostService Get-VMHOST -Location Cluster Name | Get-VMHostService| Where-Object {$_.key -eq "ntpd"} |