
esxcli software vib list命令时,您会看到类似以下内容的错误:Traceback (most recent call last):File "/usr/lib/vmware/esxcli-software", line 432, in modulesetupLogging()File "/usr/lib/vmware/esxcli-software", line 78, in setupLogginghandler = 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_unixsocketFile "string", line 1, in connectsocket.error: [Errno 2] No such file or directoryesxcli software或esxupdate相关的命令不起作用。General System Error/var/log/ 文件中出版物日志文件或日志文件未更新。/etc/vmware/locker.conf配置文件中,以便在下次引导时使用。ScratchConfig.ConfiguredScratchLocation。locker-ESXHostnameScratchConfig.ConfiguredScratchLocation配置选项对话,指定该目录的完整路径。/vmfs/volumes/DatastoreUUID/.locker-ESXHostname/tmp/scratch。如果不存在,请使用命令mkdir /tmp/scratch创建一个。connect-viserver esx_hostname_or_IPGet-DatastoreNew-PSDrive -Name "mounteddatastore" -Root \ -PSProvider VimDatastore -Datastore (Get-Datastore "DatastoreName")Set-Location mounteddatastore:\New-Item "DirectoryName" -ItemType directoryNew-Item ".locker-ESXHostname" -ItemType directoryScratchConfig.ConfiguredScratchLocation配置选项的当前值:Get-VMhost | Get-AdvancedSetting -Name "ScratchConfig.ConfiguredScratchLocation"ScratchConfig.ConfiguredScratchLocation配置选项,指定在步骤6中创建的目录的完整路径: 例如: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是隐藏文件。要查看隐藏文件,请使用ls -a命令。ls /vmfs/volumesmkdir /vmfs/volumes/DatastoreName/DirectoryNamemkdir /vmfs/volumes/Datastore1/.locker-ESXHostnameScratchConfig.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配置选项,指定在步骤3中创建的目录的完整路径: 例如: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注意:配置的暂存位置会在ESXi主机启动期间激活。执行上述命令后,必须进行重新引导。# 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配置选项,将其设置为该目录的完整路径。/vmfs/volumes/DatastoreName/.locker-ESXHostnameScratchConfig.ConfiguredScratchLocation法定是否包含您在步骤6中配置的暂存设置。如果是,则重新引导主机。esxcfg-scsidevs -l命令输出中的Is Local标志:
/etc/vmware/locker.conf配置选项设置的,在ScratchConfig.ConfiguredScratchLocation配置文件中配置的位置。.locker/目录中的VMFS数据存储。/tmp/scratch/. 处的ramdisk。