esxcli software vib list
命令时,您会看到类似以下内容的错误: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
或esxupdate
相关的命令不起作用。General System Error
/var/log/
文件中出版物日志文件或日志文件未更新。/etc/vmware/locker.conf
配置文件中,以便在下次引导时使用。ScratchConfig.ConfiguredScratchLocation
。locker-ESXHostname
ScratchConfig.ConfiguredScratchLocation
配置选项对话,指定该目录的完整路径。/vmfs/volumes/DatastoreUUID/.locker-ESXHostname
/tmp/scratch
。如果不存在,请使用命令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
配置选项,指定在步骤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/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
配置选项,指定在步骤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-ESXHostname
ScratchConfig.ConfiguredScratchLocation
法定是否包含您在步骤6中配置的暂存设置。如果是,则重新引导主机。esxcfg-scsidevs -l
命令输出中的Is Local
标志:
/etc/vmware/locker.conf
配置选项设置的,在ScratchConfig.ConfiguredScratchLocation
配置文件中配置的位置。.locker/
目录中的VMFS数据存储。/tmp/scratch/.
处的ramdisk。