vagrant + virtualbox環境でvagrant up時に「default: SSH auth method: private key」で止まり、タイム・アウトする

vagrant
WSL2
windows
VirtualBox
Hyper-V

現象

こんな事言われる

default: SSH auth method: private key
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

タイムアウトの時間が短いからもうちょっとのばせばいいよ、とのことだが、
のばしたところでつながらない。

解決策

dockerをWSLで入れると、Hyper-VがONにしないと動かないが、
vagrant + virtualboxの環境のときは、Hyper-VがONのときは起動できないっぽい。

管理者モードで起動したコマンドプロンプトで以下のコマンドを実行し、Hyper-VをOFFにしてやる。

bcdedit /set hypervisorlaunchtype off

なお、Hyper-VをONにするときは以下のコマンド

bcdedit /set hypervisorlaunchtype auto

その後必ず再起動を行う

shutdown -r -t 0 -f