0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

qemu内のwindowsの時刻自動修正

Posted at

内容

qemuでwindowsを起動すると
ホストの時間が自動的に取得されて
時刻設定されるが、9時間ずれて表示される

例えば、ホストの時間がMon Feb 10 11:37:09 AM JST 2025だとすると
qemuにはUTCのMon Feb 10 02:37:09 AM UTC 2025が渡って
それがJSTとして解釈されて02:37で表示される
これを11:37で表示する

環境

  • fedora 40
  • QEMU 8.2.8

手順

起動時のコマンドに -rtc clock=vm,base=$(date +"%Y-%m-%dT%H:%M:%S")を含める

例)

sudo qemu-system-x86_64 -M q35,smm=on -smp 2 -m 8G /opt/vdisk/win11.qcow2 -net nic -net user,smb=/opt/share,hostfwd=tcp::445-10.0.2.15:445 -enable-kvm -usb -device usb-host,vendorid=0x0403,productid=0x6001 -device usb-host,vendorid=0x0403,productid=0x6015 -rtc clock=vm,base=$(date +"%Y-%m-%dT%H:%M:%S")

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?