Haftungsausschluss: Dieser Artikel ist eine Übersetzung des zugrundeliegenden Artikels Creating a persistent scratch location for ESXi 4.x/5.x/6.0 (1033696). Die Übersetzung des Artikels erfolgt auf einer Minimalbasis („Best Effort“), übersetzter Inhalt der Artikel kann veraltet oder inkorrekt sein. Schadenersatzansprüche sind vollständig ausgeschlossen.
esxcli software vib list
ausführen, wird eine Fehlermeldung ähnlich der Folgenden angezeigt:Traceback (most recent call last):
File "/usr/lib/vmware/esxcli-software", line 432, in module
setupLogging()
File "/usr/lib/vmware/esxcli-software", line 78, in setupLogging
handler = logging.handlers.SysLogHandler(address='/dev/log')
File "/build/mts/release/bora-504890/bora/build/esx/release/python-
2.6-lib-zip-stage/504890/visor/pylib/python2.6/logging/handlers.py",
line 704, in __init__
File "/build/mts/release/bora-504890/bora/build/esx/release/python-
2.6-lib-zip-stage/504890/visor/pylib/python2.6/logging/handlers.py",
line 719, in _connect_unixsocket
File "string", line 1, in connect
socket.error: [Errno 2] No such file or directory
esxcli software
oder esxupdate
funktionieren nicht. General System Error
/var/log/
oder werden nicht aktualisiert. /etc/vmware/locker.conf
geschrieben.locker-ESXHostname
ScratchConfig.ConfiguredScratchLocation
und geben Sie den vollständigen Pfad des Verzeichnisses an. /vmfs/volumes/DatastoreUUID/.locker-ESXHostname
Hinweis: So ermitteln Sie die UUID des Datenspeichers: vifs.pl connectoptions --listds
vifs.pl --server esx_hostname_or_IP --username root --listds
vifs.pl connectoptions --mkdir "[DatastoreName] DirectoryName"
vifs.pl --server esx_hostname_or_IP --username root --mkdir "[Datastore1] .locker-ESXHostname"
ScratchConfig.ConfiguredScratchLocation
:vicfg-advcfg.pl connectoptions -g ScratchConfig.ConfiguredScratchLocation
vicfg-advcfg.pl --server esx_hostname_or_IP --username root -g ScratchConfig.ConfiguredScratchLocation
Value of ScratchConfig.ConfiguredScratchLocation is /path/to/location
ScratchConfig.ConfiguredScratchLocation
und geben Sie den vollständigen Pfad des in Schritt 3 erstellten Verzeichnisses an:vicfg-advcfg.pl connectoptions -s /vmfs/volumes/DatastoreName/DirectoryName ScratchConfig.ConfiguredScratchLocation
vicfg-advcfg.pl --server esx_hostname_or_IP --username root -s /vmfs/volumes/Datastore1/.locker-ESXHostname ScratchConfig.ConfiguredScratchLocation
/tmp/scratch
existiert. Falls nicht, erstellen Sie es mithilfe des Befehls mkdir /tmp/scratch
. connect-viserver esx_hostname_or_IP
Get-Datastore
New-PSDrive -Name "mounteddatastore" -Root \ -PSProvider VimDatastore -Datastore (Get-Datastore "DatastoreName")
Set-Location mounteddatastore:\
New-Item "DirectoryName" -ItemType directory
New-Item ".locker-ESXHostname" -ItemType directory
ScratchConfig.ConfiguredScratchLocation
:Get-VMhost | Get-AdvancedSetting -Name "ScratchConfig.ConfiguredScratchLocation"
ScratchConfig.ConfiguredScratchLocation
und geben Sie den vollständigen Pfad des in Schritt 6 erstellten Verzeichnisses an:Get-VMhost | Get-AdvancedSetting -Name "ScratchConfig.ConfiguredScratchLocation" | Set-AdvancedSetting -Value "/vmfs/volumes/DatastoreName/DirectoryName"
Get-VMhost | Get-AdvancedSetting -Name "ScratchConfig.ConfiguredScratchLocation" | Set-AdvancedSetting -Value "/vmfs/volumes/Datastore1/.locker-ESXHostname"
.filename
handelt es sich um eine verborgene Datei. Verwenden Sie zum Anzeigen von verborgenen Dateien den Befehl ls -a
. ls /vmfs/volumes
mkdir /vmfs/volumes/DatastoreName/DirectoryName
mkdir /vmfs/volumes/Datastore1/.locker-ESXHostname
ScratchConfig.ConfiguredScratchLocation
:vim-cmd hostsvc/advopt/view ScratchConfig.ConfiguredScratchLocation
(vim.option.OptionValue) [
(vim.option.OptionValue) {
dynamicType = unset,
key = "ScratchConfig.ConfiguredScratchLocation",
value = "/path/to/location",
}
}
ScratchConfig.ConfiguredScratchLocation
und geben Sie den vollständigen Pfad des in Schritt 3 erstellten Verzeichnisses an:vim-cmd hostsvc/advopt/update ScratchConfig.ConfiguredScratchLocation string /vmfs/volumes/DatastoreName/DirectoryName
/bin/vim-cmd hostsvc/advopt/update ScratchConfig.ConfiguredScratchLocation string /vmfs/volumes/Datastore1/.locker-ESXHostname
# 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
ScratchConfig.ConfiguredScratchLocation
. ScratchConfig.ConfiguredScratchLocation
und legen Sie sie auf den vollständigen Pfad des Verzeichnisses fest./vmfs/volumes/DatastoreName/.locker-ESXHostname
ScratchConfig.ConfiguredScratchLocation
die in Schritt 6 konfigurierte Scratch-Option enthält. Wenn dies der Fall ist, starten Sie den Host neu.Is Local
in der Ausgabe des Befehls esxcfg-scsidevs -l
:/etc/vmware/locker.conf
konfigurierte Speicherort, festgelegt durch die Konfigurationsoption ScratchConfig.ConfiguredScratchLocation
(siehe Informationen in diesem Artikel). .locker/
-Verzeichnis. /tmp/scratch/.