Every VMware administer should have this beautiful tool - VMware vSphere Health Check!! To set it up, you need to: 1) Install vSphere PowerCLI and PowerGUI, and download the Health Check PowerPack file. 2) Run PowerGUI Admin Console and import the Health Check PowerPack file. 3) Add the target vCenter address then click connect. 4) … Continue reading VMware vSphere Health Check
Category: Scripting
PowerCLI: Find Orphaned Virtual Machines Location
Very useful PowerCLI script – find the orphaned virtual machines in the VMware cluster. With ‘-delete’ option it will find then delete the orphaned virtual machines. #requires -version 2 function Remove-OrphanedData{<#.SYNOPSIS Remove orphaned folders and VMDK files.DESCRIPTION The function searches orphaned folders and VMDK files on one or more datastores and reports its findings. Optionally … Continue reading PowerCLI: Find Orphaned Virtual Machines Location
ESXi 5.0 Host Backup Script
I wrote up a batch script to backup the ESXi 5.0 host configuration every night, email the backup report and remove the old archive folders that is older than 7 days. To make it work, you need to: 1) install the vCLI and add its bin folder to the system PATH 2) Add all your … Continue reading ESXi 5.0 Host Backup Script
ESXi 5.0 PXE Install
ESXi PXE install has no differences from other PXE installs, you need DHCP server, tftp server and the installation ISO. In my example, I build the DHCP server and tftp server on CentOS 6.3 minimal installation. 1) Install and configure the DHCP Server yum –y install dhcp cd /etc/dhcp/ cp –a dhcpd.conf dhcpd.conf.bak Modify dhcpd.conf … Continue reading ESXi 5.0 PXE Install
vSphere 5.0 Security Hardening Recommended VM Settings Configure Script
1) Create 3 text files, one for each security profile: profile3_Low.txt RemoteDisplay.maxConnections,2 profile2_Med.txt RemoteDisplay.maxConnections,1floppyX.present,FALSEserialX.present,FALSEparallelX.present,FALSEusb.present,FALSEideX:Y.present,FALSEisolation.tools.unity.push.update.disable,TRUEisolation.tools.ghi.launchmenu.change,TRUEisolation.tools.memSchedFakeSampleStats.disable,TRUEisolation.tools.getCreds.disable,TRUEisolation.tools.autoInstall.disable,TRUEtools.guestlib.enableHostInfo,FALSE profile1_High.txt RemoteDisplay.maxConnections,1floppyX.present,FALSEserialX.present,FALSEparallelX.present,FALSEusb.present,FALSEideX:Y.present,FALSEisolation.tools.unity.push.update.disable,TRUEisolation.tools.ghi.launchmenu.change,TRUEisolation.tools.memSchedFakeSampleStats.disable,TRUEisolation.tools.getCreds.disable,TRUEisolation.tools.autoInstall.disable,TRUEtools.guestlib.enableHostInfo,FALSEisolation.tools.ghi.autologon.disable,TRUEisolation.bios.bbs.disable,TRUEisolation.tools.hgfsServerSet.disable,TRUEisolation.monitor.control.disable,TRUE 2) Create the ‘vSphere_Security_Configure.ps1’ script #Uncomment if this SnapIn has not been added#Add-PSSnapIn VMware.VimAutomation.Core CLS #Specify the VM name here$VM = Get-VM "DEV-LINUX-01" #Specify the security profile file$file = Import-Csv c:\powercli\profile3_Low.txt -Header Key,Value $creds = Get-VICredentialStoreItem -file “C:\powercli\credfile.xml”Connect-viserver -Server … Continue reading vSphere 5.0 Security Hardening Recommended VM Settings Configure Script