为 VMware 环境添加时间同步支持

This commit is contained in:
Ing 2025-05-14 21:59:36 +08:00
parent 4bfbe81105
commit b692f27ea7
2 changed files with 11 additions and 0 deletions

View File

@ -234,6 +234,11 @@ CMDLINE['nowatchdog']=""
CMDLINE['modprobe.blacklist']="${MODBLACKLIST}"
CMDLINE['mev']="${MEV:-physical}"
if [ "${MEV:-physical}" = "vmware" ]; then
CMDLINE['tsc']="reliable"
CMDLINE['pmtmr']="0x0"
fi
if [ "${HDDSORT}" = "true" ]; then
CMDLINE['hddsort']=""
fi

View File

@ -12,6 +12,12 @@ set -e
. "${WORK_PATH}/include/functions.sh"
. "${WORK_PATH}/include/addons.sh"
if type -p vmware-toolbox-cmd; then
if [ ! "Enabled" = "$(vmware-toolbox-cmd timesync status 2>/dev/null)" ]; then
vmware-toolbox-cmd timesync enable >/dev/null 2>&1 || true
fi
fi
[ -z "${LOADER_DISK}" ] && die "$(TEXT "Loader is not init!")"
checkBootLoader || die "$(TEXT "The loader is corrupted, please rewrite it!")"