Java OpenResty Spring Spring Boot MySQL Redis MongoDB PostgreSQL Linux Android Nginx 面试 小程序 Arthas JVM AQS juc Kubernetes Docker 诊断工具


VirtualBox 虚拟机与宿主机时间同步

VirtualBox 大约 856 字

场景

VirtualBox中虚拟机在后台运行时,宿主机待机休眠,宿主机再次启动时发现虚拟机时间与宿主机时间不一致。

进入安装目录

cd "C:\Program Files\Oracle\VirtualBox"

查看虚拟机

.\VBoxManage.exe list vms

输出

PS C:\Program Files\Oracle\VirtualBox> .\VBoxManage.exe list vms
"AlpineLinux" {3130d03e-1168-4659-ac05-c0ccad671365}
"minikube" {dccbe560-da12-4d55-aec2-9cecb5a6b8e6}

开启时间同步

.\VBoxManage.exe guestproperty set <uuid|vmname> --timesync-set-start

示例

.\VBoxManage.exe guestproperty set AlpineLinux --timesync-set-start

关闭时间同步

.\VBoxManage.exe guestproperty set <uuid|vmname> --timesync-set-stop

示例

.\VBoxManage.exe guestproperty set AlpineLinux --timesync-set-stop

时间同步阈值

VirtualBox10秒钟执行一次时间查询操作。仅当时间差达到阈值(默认为20分钟)时,才会执行真实重新同步。

调整时间阈值

.\VBoxManage.exe guestproperty set <uuid|vmname> --timesync-set-threshold 10000

示例

.\VBoxManage.exe guestproperty set AlpineLinux --timesync-set-threshold 10000
阅读 2143 · 发布于 2022-09-09

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb

扫描下方二维码关注公众号和小程序↓↓↓

扫描二维码关注我
昵称:
随便看看 换一批