Last active
April 5, 2017 09:11
-
-
Save stknohg/dca269f96c2e1521c466a0557ed31773 to your computer and use it in GitHub Desktop.
VirtualBoxの仮想マシンの時刻同期をオン・オフするスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ゲスト側で実行してVirtualBox Guest Additions Serviceの設定を変える。 | |
sc.exe config VBoxService binPath= "C:\Windows\System32\VBoxService.exe --disable-timesync" | |
Restart-Service -Name VBoxService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ゲスト側で実行してVirtualBox Guest Additions Serviceの設定を変える。 | |
sc.exe config VBoxService binPath= "C:\Windows\System32\VBoxService.exe" | |
Restart-Service -Name VBoxService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# VBoxManage コマンドでホスト側から時刻同期の設定をする(要ゲストの再起動) | |
$VMName="VM01" # 大文字小文字は区別される | |
# 時刻同期をオフ | |
VBoxManage setextradata $VMName "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1 | |
# 時刻同期をオン | |
VBoxManage setextradata $VMName "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment