A quick check of the Host via SSH confirmed the erorr messages generate in vCenter Update Manager.
# vdu -h |tail -n 1
ramdisk upgradescratch: 300M ( 100 inodes)
Since update manager was copying over the files and it was failing when trying to run the script, I went ahead and took a look at the bootbanks. There are 2 bootbanks in ESXi; /bootbank and /altbootbank. This document describes boot banks as the following.
I could have messed around cleaning up the bootbanks and the ramdisk but an easier solution was to just create a new persistent scratch location and reboot the Host. Once the new scratch locations were configured and the Hosts rebooted vCenter Upgrade Manager was able to push ESXi 5.5 to the blades without any issues.
Configuring a persistent scratch location using the vSphere Client
To configure persistent scratch space for ESXi using the vSphere Client:
- Connect to vCenter Server or the ESXi host using the vSphere Client.
- Click the ESXi host in the inventory.
- Click the Configuration tab.
- Click Storage.
- Right-click a datastore and click Browse.
- Create a uniquely-named directory for this ESXi host (for example,
.locker-ESXHostname
). - Close the Datastore Browser.
- Click Advanced Settings under Software.
- Select the ScratchConfig section.
- Change the
ScratchConfig.ConfiguredScratchLocation
configuration option, specifying the full path to the directory. For example:/vmfs/volumes/DatastoreUUID/.locker-ESXHostname
Note: To determine the Datastore UUID:- Navigate to Configuration > Storage.
- Select the datastore.
- View Location under Datastore Details.The Datastore UUID appears similar to /vmfs/volumes/51dda02d-fade5016-8a08-005056171889 where51dda02d-fade5016-8a08-005056171889 is the UUID.
- Click OK.
- Put the ESXi host into maintenance mode and reboot for the configuration change to take effect.
Configuring a persistent scratch location using the vCLI
To configure persistent scratch space for ESXi using the vSphere Command-Line Interface:
Note: For more information on usage, see the vSphere Command-Line Interface Documentation.
- Open a command prompt at the location where the vCLI is installed.
- Obtain a list of datastores reachable from this ESXi host using the command:
vifs.pl connectoptions --listds
For example:vifs.pl --server esx_hostname_or_IP --username root --listds
- Create a uniquely-named directory for this ESXi host using the command:
vifs.pl connectoptions --mkdir "[DatastoreName] DirectoryName"
For example:vifs.pl --server esx_hostname_or_IP --username root --mkdir "[Datastore1] .locker-ESXHostname"
- Check the current value of the
ScratchConfig.ConfiguredScratchLocation
configuration option using the command:vicfg-advcfg.pl connectoptions -g ScratchConfig.ConfiguredScratchLocation
For example:vicfg-advcfg.pl --server esx_hostname_or_IP --username root -g ScratchConfig.ConfiguredScratchLocation
Value of ScratchConfig.ConfiguredScratchLocation is /path/to/location - Change the
ScratchConfig.ConfiguredScratchLocation
configuration option, specifying the full path to the directory created in step 3, using the command:vicfg-advcfg.pl connectoptions -s /vmfs/volumes/DatastoreName/DirectoryNameScratchConfig.ConfiguredScratchLocation
For example:vicfg-advcfg.pl --server esx_hostname_or_IP --username root -s /vmfs/volumes/Datastore1/.locker-ESXHostname ScratchConfig.ConfiguredScratchLocation
- Put the ESXi host into maintenance mode and reboot for the configuration change to take effect.
Configuring a persistent scratch location using PowerCLI
To configure persistent scratch space for ESXi using the vSphere PowerCLI interface:
Notes:
- Before proceeding, ensure that
/tmp/scratch
exists. If it does not exist, use the commandmkdir /tmp/scratch
to create it. - For more information on vSphere PowerCLI usage, see the vSphere PowerCLI documentation.
- Open a command prompt where the PowerCLI is installed.
- Connect to the ESXi host using the command:
connect-viserver esx_hostname_or_IP
- Obtain a list of datastores reachable from this ESXi host using the command:
Get-Datastore
- Mount a datastore read/write as a PSDrive using the command:
New-PSDrive -Name "mounteddatastore" -Root \ -PSProvider VimDatastore -Datastore (Get-Datastore "DatastoreName")
- Access the new PSDrive using the command:
Set-Location mounteddatastore:
- Create a uniquely-named directory for this ESXi host using the command:
New-Item "DirectoryName" -ItemType directory
For example:New-Item ".locker-ESXHostname" -ItemType directory
- Check the current value of the
ScratchConfig.ConfiguredScratchLocation
configuration option using the command:Get-VMHostAdvancedConfiguration -Name "ScratchConfig.ConfiguredScratchLocation"
Note:VMHostAdvancedConfiguration
has been deprecated in PowerCLI 5.1 and replaced withAdvancedSetting
. For more information, see the vSphere PowerCLI documentation. - Change the
ScratchConfig.ConfiguredScratchLocation
configuration option, specifying the full path to the directory created in step 6, using the command:Set-VMHostAdvancedConfiguration -Name "ScratchConfig.ConfiguredScratchLocation" -Value "/vmfs/volumes/DatastoreName/DirectoryName"
For example:Set-VMHostAdvancedConfiguration -Name "ScratchConfig.ConfiguredScratchLocation" -Value "/vmfs/volumes/Datastore1/.locker-ESXHostname"
- Put the ESXi host into maintenance mode and reboot for the configuration change to take effect.
Configuring a persistent scratch location using Tech Support Mode
To configure persistent scratch space for ESXi using Tech Support Mode on ESXi:
Notes:
- This can be done either via the local console or SSH.
- A
.filename
is a hidden file. To view hidden files, use thels -a
command.
- Open a console to the ESXi host. For more information, see Using Tech Support Mode in ESXi 4.1 and 5.0 (1017910).
- Obtain a list of datastores reachable from this ESXi host using the command:
ls /vmfs/volumes
- Create a uniquely-named directory for this ESXi host using the command:
mkdir /vmfs/volumes/DatastoreName/DirectoryName
For example:mkdir /vmfs/volumes/Datastore1/.locker-ESXHostname
- Check the current value of the
ScratchConfig.ConfiguredScratchLocation
configuration option using the command:vim-cmd hostsvc/advopt/view ScratchConfig.ConfiguredScratchLocation
Example output:(vim.option.OptionValue) [
(vim.option.OptionValue) {
dynamicType = <unset>,
key = "ScratchConfig.ConfiguredScratchLocation",
value = "/path/to/location",
}
} - Change the
ScratchConfig.ConfiguredScratchLocation
configuration option, specifying the full path to the directory created in step 3, using the command:vim-cmd hostsvc/advopt/update ScratchConfig.ConfiguredScratchLocation string /vmfs/volumes/DatastoreName/DirectoryName
For example:/bin/vim-cmd hostsvc/advopt/update ScratchConfig.ConfiguredScratchLocation string /vmfs/volumes/Datastore1/.locker-ESXHostname
- Put the ESXi host into maintenance mode and reboot for the configuration change to take effect.
Configuring a persistent scratch location during scripted install using kickstart scripts
You can configure persistent scratch space for ESXi during kickstart installation by adding commands to your kickstart scripts which create the directory and change the configuration option. For more information on ESXi scripted deployments, see the ESXi Installable and vCenter Server Setup Guide.
Append these commands to your custom kickstart script:
# Generate a new scratch directory for this host on a Datastore
scratchdirectory=/vmfs/volumes/DatastoreName/.locker-$(hostname 2> /dev/null)-$(esxcfg-info -b 2> /dev/null)
# Create the scratch directory
mkdir -p $scratchdirectory
# Change the advanced configuration option
vim-cmd hostsvc/advopt/update ScratchConfig.ConfiguredScratchLocation string $scratchdirectory
Note: The configured scratch location is activated during startup of the ESXi host. A reboot is required after performing the preceding commands.
Configuring a persistent scratch location using the vSphere Web Client for ESXi 5.1
To configure persistent scratch space for ESXi using the vSphere Web Client:
- Log in to the vCenter Server using the vSphere Web Client.
- Click Hosts and Clusters, then click the specific host.
- Click the Manage tab.
- Click Settings.
- Under System, click Advanced System Settings.
- Locate
ScratchConfig.ConfiguredScratchLocation
. - Click Edit and add the path to the scratch directory.
- Reboot the host for the changes to take effect.
No comments:
Post a Comment