VMWare: Installing ESXi on HP ProLiant DL360e Server with RAID Controller B120i

Scenario: New HP ProLiant server Gen8 with B120i RAID controller, logical drive created on a RAID 1 array

Installing from a stock ISO, I came up against the error that “one or more disks have the same UUID” – this was after installing successfully and rebooting. Using the boot parameter “overrideDuplicateImageDetection” I was able to boot and use the vsphere client – this showed that both disks were visible to ESXi and were not being presented as a single logical drive.

After much wailing and gnashing of teeth and references to the controller not being supported, I came across a post suggesting that VMware has custom images. Indeed, I found the below:

HP Custom Image:

https://my.vmware.com/group/vmware/details?productId=327&downloadGroup=HP-ESXI-5.1.0U1-GA-25APR2013

Lo and behold, we now have a single logical drive instead of 2 separate ones:

vmfs

Linux: Add a New HDD to a VM Without Rebooting

Add a New HDD to a VM Without Rebooting

This article describes how to add a new HDD to a VM without rebooting – handy if you need consistency of service and don’t have a redundant solution.

 

Solution:

Add a hard disk as usual through the VM settings. Check dmesg to see if the kernel has detected it automatically, if not:

echo "- - -" > /sys/class/scsi_host/host0/scan
fdisk -l

You should see something like:

Disk identifier: 0x00004fff

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    30076927    15037440   83  Linux
/dev/sda2        30078974    31455231      688129    5  Extended
/dev/sda5        30078976    31455231      688128   82  Linux swap / Solaris

Disk /dev/sdc: 429.5 GB, 429496729600 bytes
255 heads, 63 sectors/track, 52216 cylinders, total 838860800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a valid partition table

/dev/sdc is the disk you just added, all you need to do is “fdisk /dev/sdc” to partition it and “mkfs.ext3 /dev/sdc1” to format the partition.

Job done.

VMWare: Backup ESXi Host Config Using vCLI

This process uses the vmware command line interface tools to backup your ESXi host configuration – a must have for disaster recovery when your ESXi host has to be rebuilt / cloned etc. The tools from the link below have been tested on all versions of ESXi from 3.5  onwards.

Note: This *DOES NOT* back up your virtual machines!!

1. Download the vCLI:

The installer will install the tools and also the ActivePerl sdk – the download link is currently here:

https://my.vmware.com/web/vmware/details?downloadGroup=VSP510-VCLI-510&productId=285

2. Use the esxcfg-cfgbackup.pl to backup your host configuration:

vicfg-cfgbackup.pl –server <server_name> -s <backup_file_name>

Example:

C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>perl esxcfg-cfgbackup.pl — server 192.168.100.1 -s C:\Users\admin\Desktop\192.168.100.1.bin
Enter username: root
Enter password:
Saving firmware configuration to C:\Users\admin\Desktop\192.168.100.1.bin …

3. Use the esxcfg-cfgbackup.pl to restore your host configuration to a host:

esxcfg-cfgbackup.pl –server <server_name> -l <backup_file_name>

Note: this will cause the host to reboot once the process is complete.

Command Line Options

C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>perl esxcfg-cfgbackup.pl –help

Synopsis: esxcfg-cfgbackup.pl OPTIONS [<backupfile>]
Command-specific options:
–force
-f
Force the restore of the configuration.
–load
-l
Restore configuration onto the host
–quiet
-q
Do not prompt for user confirmation.
–reset
-r
Resets host, restore to factory settings.
–save
-s
Backup the host configuration.

Common VI options:
–config (variable VI_CONFIG)
Location of the VI Perl configuration file
–credstore (variable VI_CREDSTORE)
Name of the credential store file defaults to <HOME>/.vmware/credstore/vicredentials.xml on Linux and <APPDATA>/VMware/credstore/vicredentials.xml on Windows
–encoding (variable VI_ENCODING, default ‘utf8’)
Encoding: utf8, cp936 (Simplified Chinese), iso-8859-1 (German), shiftjis (Japanese)
–help
Display usage information for the script
–passthroughauth (variable VI_PASSTHROUGHAUTH)
Attempt to use pass-through authentication
–passthroughauthpackage (variable VI_PASSTHROUGHAUTHPACKAGE, default ‘Negotiate’)
Pass-through authentication negotiation package
–password (variable VI_PASSWORD)
Password
–portnumber (variable VI_PORTNUMBER)
Port used to connect to server
–protocol (variable VI_PROTOCOL, default ‘https’)
Protocol used to connect to server
–savesessionfile (variable VI_SAVESESSIONFILE)
File to save session ID/cookie to utilize
–server (variable VI_SERVER, default ‘localhost’)
VI server to connect to. Required if url is not present
–servicepath (variable VI_SERVICEPATH, default ‘/sdk/webService’)
Service path used to connect to server
–sessionfile (variable VI_SESSIONFILE)
File containing session ID/cookie to utilize
–url (variable VI_URL)
VI SDK URL to connect to. Required if server is not present
–username (variable VI_USERNAME)
Username
–verbose (variable VI_VERBOSE)
Display additional debugging information
–version
Display version information for the script