msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

15 Jul 2015 VMware ESXi host tips

Some of my VMware notes in short form, just publishing it since it has been in my drafts folder too long.

Remove virtual adapter ala vmk0
# esxcli network ip interface remove -i vmk1

Configure IP on vmk
# esxcli network ip interface ipv4 set -i vmk3 -I 10.255.2.37 -N 255.255.255.0 -t static

List vmk
# esxcli network ip interface ipv4 get

# esxcfg-route

# esxcli software vib list

Remove vib on VMware host
# esxcli software vib remove -n=”vcloud-agent”

Removing of inaccessible NFS datastore
# esxcli storage nfs list

On the ESXi host
# /etc/init.d/storageRM stop

In the vSphere Client
“Rescan All” storage på host

# /etc/init.d/storageRM start

In vSphere Client
Remove inaccessible datastore

Check MTU values on ESXi host
# esxcli network nic list
Name PCI Device Driver Link Speed Duplex MAC Address MTU Description
—— ————- —— —- —– —— —————– —- —————————————————————-
vmnic0 0000:002:00.0 bnx2 Up 1000 Full a4:aa:aa:ab:aa:33 1500 Broadcom Corporation Broadcom NetXtreme II BCM5709 1000Base-T
vmnic1 0000:002:00.1 bnx2 Up 1000 Full a4:ae:aa:ab:aa:35 1500 Broadcom Corporation Broadcom NetXtreme II BCM5709 1000Base-T
vmnic2 0000:003:00.0 bnx2 Down 0 Half a4:ae:aa:ab:aa:37 1500 Broadcom Corporation Broadcom NetXtreme II BCM5709 1000Base-T
vmnic3 0000:003:00.1 bnx2 Down 0 Half a4:ae:aa:ab:aa:39 1500 Broadcom Corporation Broadcom NetXtreme II BCM5709 1000Base-T
vmnic4 0000:045:00.0 ixgbe Up 10000 Full a0:ae:aa:ab:aa:4c 1500 Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection
vmnic5 0000:045:00.1 ixgbe Up 10000 Full a0:ae:ba:ab:aa:4d 1500 Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection
vmnic6 0000:046:00.0 ixgbe Up 10000 Full a0:ae:aa:ab:aa:e0 1500 Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection
vmnic7 0000:046:00.1 ixgbe Up 10000 Full a0:ae:aa:ab:aa:e1 1500 Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection

Install NetApp plugin on ESXi host
# cd /vmfs/volumes/
# esxcli software vib install -d file://$PWD/NetAppNasPlugin.v20.zip

VAAI
On ESXi 5.x hosts, to determine if VAAI is enabled, run these commands and check if Int Value is set to 1 (enabled):

# esxcli system settings advanced list -o /DataMover/HardwareAcceleratedMove
# esxcli system settings advanced list -o /DataMover/HardwareAcceleratedInit
# esxcli system settings advanced list -o /VMFS3/HardwareAcceleratedLocking

DELL
Dell support: generate DSET file. Requires that DELL OpenManage is installed on the ESXi host
C:\Program Files (x86)\Dell\AdvDiags\DSET\bin>DellSystemInfo.exe -s 10.255.2.3 8 -u root -p password -d hw,sw -r c:\temp\dell\dset-20131115.zip

DELL OpenManage (ESXi host)
# /opt/dell/srvadmin/bin
# ./dataeng status

Tags: , , , ,

Posted by

05 Sep 2014 Backup VMware ESXi using BazaarVCB

This post describes how you can backup your VMware ESXi home installation with free license using BazaarVCB if you do not have a vCenter Server available. Bazaarvcb is the fastest backup solution I have used on the free VMware hypervisor.
Download the latest version from the download page.

The backup script is run by crontab every night and looks like this

#!/bin/bash
bazaarvcbPath="/media/backup/bazaarvcb-0.9.7b-linux-i386/bazaarvcb"
backupsPath="/media/backup"
hostname="192.168.0.222"
username="root"
password="password"
rollOut="30"
vmNames="vm-guest1 vm-guest2 vm-guest3"

for VM in $vmNames; do
        `$bazaarvcbPath backup -H $hostname -u $username -p $password --roll-out $rollOut $VM $backupsPath/$VM`
done

The backups are full so make sure you have enough disk space available.

bazaarvcb options

$ bazaarvcb -h
usage: bazaarvcb [-h]  ...

optional arguments:
  -h, --help   show this help message and exit

valid commands:
    checkhash  check .hsh files integrity in one directory
    listvm     list registered VMs on the ESXi host
    queryvm    display VMs informations
    listbackup
               search for backups in local and remote directories
    querybackup
               display report file of one particular
    backup     backup a VM
    restore    restore a backup

Open TCP port 31031 in your firewall to ensure that you have a high transfer rate, otherwise the backup will be transferred over SSH protocol and will be capped in speed to about 7MB/s (on the free hypervisor).
Bazaarvcb cannot backup a VM with snapshot(s).

Warning!
I have not tested this on a host connected to a vCenter server and can not confirm that it will work or not.

Tags: , , ,

Posted by

04 Jul 2013 Install free VMware 5.1 Hypervisor on HP Z600

This is just some short notes on how you can manage to install the free VMware 5.1 Hypervisor on a HP Z600 Workstation.
I assume you have already downloaded the installer from http://vmware.com

As always when you would like to utilize virtualization in your CPU you have to enable the following BIOS settings

  • Advanced Chipset settings > Intel VT-D > Enabled (Allows passthrough of hardware to a VM)

 

  • Update your BIOS to the latest version
  • Disable “Max CPUID Value Limit” option in BIOS

Without making this change in BIOS the installer would stop with the Purple Screen Of Death (PSOD) and the error message “can’t detect the last level cache”.

If you have a old BIOS that does not support booting from a GPT partition then you need to change this at the beginning of the installation.

Press Shift+O during and type in space and

formatwithmbr

The boot option will now look like

runweasel formatwithmbr

You should now be able to install ESXi 5.1 on you HP Z600.
This might work on other HP models as well.

Tags: , , , ,

Posted by

17 May 2013 Howto enter VMware ESXi license key after it has expired

vmware-esxi-5-license-has-expired“Disable VMware ESX” is the warning message that is displayed when you open your VMware vSphere Client after the 60-day evaluation period has expired without typing in a new license key for your free VMware vSphere Hypervisor 5 install. You cannot type in the license key in the vSphere Client after the evaluation period has expired. If you do not type in the key before it expires you will not be able to power on VMs after they have been powered down.

This is a short howto describing how you can type in the license key for you free VMware Hypervisor after it has expired, since you cannot use the vSphere Client.
This requires that you have enabled the SSH service on your host before it expired and you can access it using your favourite SSH client to your ESXi host.
The file should look something like this if you have not entered any license information 00000-00000-00000-00000-00000.
This key should be replaced with the key you have gotten from VMware http://www.vmware.com/products/vsphere-hypervisor/ when you downloaded the installer file.

This is a step by step description of how you can update the license file

  1. Start a SSH session to your ESXi host using your favourite SSH client like Putty
  2. Log in with the username root (unless you have changed it to something else)
  3. Open the file /etc/vmware/vmware.lic using the vi editor
    ~# vi /etc/vmware/vmware.lic
    vmware-esxi-5-license-has-expired
  4. Delete the old license key with the dd command
    vmware-esxi-5-license-has-expired-putty02
  5. Insert a new license key by with the i command
    vmware-esxi-5-license-has-expired-putty03
    vmware-esxi-5-license-has-expired-putty04

    The key above is just an example and is not a valid key. Replace the key used above with the evaluation license key you received from VMware.

  6. Save the file using the write command w
    vmware-esxi-5-license-has-expired-putty05
  7. Now you can open a new vSphere Client window and see if the license warning windows appears again. If it does not, then you have successfully updated the license key. If not, then you need to check if the license key is typed in correctly.

All this can be done without a reboot of the ESXi host.

Tags: , , , , , , ,

Posted by

20 Sep 2012 VMware Tools one-liners using PowerCli

This short post is about VMware Tools on VM guests running in a vSphere 5.x cluster/hosts.

This PowerCli one-liner creates a list of VM guests where the VMware Tools CDROM/ISO is mounted:

(Get-VM | Get-View | Where {$_.Runtime.ToolsInstallerMounted}) | % {$_.Name}

Unmount the VMware Tools installer CDROM on all VM guests. This is useful to run before you try to put at ESXi host in maintenance mode because VM guests thatare installing VMware Tools will not migrate because the VMware Tools is not on a shared storage. You will get the error message “The virtual machine is installing VMware Tools and cannot initiate a migration operation”.

(Get-VM | Get-View | Where {$_.Runtime.ToolsInstallerMounted}) | % {Dismount-Tools

This last one finds all VM guests running Windows as guest OS and upgrades VMware Tools without a reboot at the end

Get-VM | Where {$_.PowerState -eq "PoweredOn" -and $_.Guest.OSFullName -match "Win*"} | % {Update-Tools -VM $_ -NoReboot}

Tags: , , , , , ,

Posted by