Linuxの開発環境を構築しているのですが、CentOSが起動できず、Private Key以降が進みません。 解決方法を教えて下さい。
解決したいこと
Linuxの開発環境を構築しているのですが、CentOSが起動できず、Private Key以降が進みません。
解決方法を教えて下さい。
開発環境
- OS : Windows 10 Home
- VirtualBox (7.1.8)
- vagrant (2.4.5)
発生している問題・エラー
C:\Vagrant>vagrant up --provision
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'CentOS65'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: Vagrant_default_1747486808701_37860
==> default: Fixed port collision for 22 => 2222. Now on port 2205.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2205 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2205
default: SSH username: vagrant
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.
自分で試したこと
とある教材内から学習中です。
centos65-x86_64-20140116.box
↑こちらのリンクが切れている?
古いタイプのものだった為、最新のものをダウンロードして使用しています。
ファイル名の指定を、ダウンロードしたものの名称に変更して、こちらに指定しています。
【教材内】
vagrant box add CentOS65 C:¥Vagrant¥centos65-x86_64-20140116.box
⇩
【こちらに変更】
vagrant box add CentOS65 C:\Vagrant\CentOS-Stream-Vagrant-10-20250506.2.x86_64.vagrant-libvirt.box
以下のサイトを参考に次のことを行いました。
・タイムアウト設定変更【Vagrantfileを、メモ帳で開き、追加して上書き保存】
config.vm.boot_timeout = 1200
・ネットワークアダプタの設定変更【Vagrantfileを、メモ帳で開き、追加して上書き保存】
config.vm.provider 'virtualbox' do |vb|
vb.customize ['modifyvm', :id, '--cableconnected1', 'on']
end
・vagrant upに--provisionオプションを付ける
・PCからVagrantをアンインストールし、再インストール
以下のサイトを参考にしましたが、手順がわからず実行できていません。
・SSH接続用鍵ファイルの初期化
IdentityFile プライベートキーの場所
不明です。エクスプローラーで検索すると処理中となり進まず、ヒットしません。
念のため、参考にエクスプローラー内の状況です。
こちらの、PowerShellへの操作手順(実行するコマンド)がよくわからず、試せていません。
⇩??????????????
PowerShellで管理者として以下のコマンド実行、Hyper-Vをoffにする
PowerShell > bcdedit /set hypervisorlaunchtype off
その後PC再起動
PowerShell>bcdeditコマンド
で確認してみると
PowerShell > hypervisorlaunchtype Off
(参照URL)