我正在使用 Vagrant 2.3.4 和 Virtual Box 7.0.8 在 Windows 10 上设置 VM 盒 eurolinux-vagrant/centos-stream-9 9.0.37。
使用后vagrant up
,我遇到了以下日志中的 SSH 问题:
Net::SSH::ConnectionTimeout>
INFO subprocess: Starting process: ["D:\\Virtual Box\\VBoxManage.exe", "showvminfo", "6ac2bff0-d050-49b1-a801-a426ffa39c9f", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
DEBUG virtualbox_7_0: Searching for SSH port: 22
DEBUG virtualbox_7_0: read_forward_ports: uuid=6ac2bff0-d050-49b1-a801-a426ffa39c9f active_only=false
INFO subprocess: Starting process: ["D:\\Virtual Box\\VBoxManage.exe", "showvminfo", "6ac2bff0-d050-49b1-a801-a426ffa39c9f", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
DEBUG virtualbox_7_0: - [1, "ssh", 2200, 22, "127.0.0.1"]
INFO ssh: Attempting SSH connection...
INFO ssh: Attempting to connect to SSH...
INFO ssh: - Host: 127.0.0.1
INFO ssh: - Port: 2200
INFO ssh: - Username: vagrant
INFO ssh: - Password? false
INFO ssh: - Key Path: ["C:/Users/ADMIN/.vagrant.d/insecure_private_key"]
DEBUG ssh: - connect_opts: {:auth_methods=>["none", "hostbased", "publickey"], :config=>false, :forward_agent=>false, :send_env=>false, :keys_only=>true, :verify_host_key=>:never, :password=>nil, :port=>2200, :timeout=>15, :user_known_hosts_file=>[], :verbose=>:debug, :logger=>#<Logger:0x00000261b8144e68 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x00000261b8144e40 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00000261b8144df0 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<StringIO:0x00000261b8144eb8>, @binmode=false, @mon_data=#<Monitor:0x00000261b8144dc8>, @mon_data_owner_object_id=184780>>, :keys=>["C:/Users/ADMIN/.vagrant.d/insecure_private_key"], :remote_user=>"vagrant"}
INFO subprocess: Starting process: ["D:\\Virtual Box\\VBoxManage.exe", "showvminfo", "6ac2bff0-d050-49b1-a801-a426ffa39c9f", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO subprocess: Starting process: ["D:\\Virtual Box\\VBoxManage.exe", "showvminfo", "6ac2bff0-d050-49b1-a801-a426ffa39c9f", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO subprocess: Starting process: ["D:\\Virtual Box\\VBoxManage.exe", "showvminfo", "6ac2bff0-d050-49b1-a801-a426ffa39c9f", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO subprocess: Starting process: ["D:\\Virtual Box\\VBoxManage.exe", "showvminfo", "6ac2bff0-d050-49b1-a801-a426ffa39c9f", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO subprocess: Starting process: ["D:\\Virtual Box\\VBoxManage.exe", "showvminfo", "6ac2bff0-d050-49b1-a801-a426ffa39c9f", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO subprocess: Starting process: ["D:\\Virtual Box\\VBoxManage.exe", "showvminfo", "6ac2bff0-d050-49b1-a801-a426ffa39c9f", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO subprocess: Starting process: ["D:\\Virtual Box\\VBoxManage.exe", "showvminfo", "6ac2bff0-d050-49b1-a801-a426ffa39c9f", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO subprocess: Starting process: ["D:\\Virtual Box\\VBoxManage.exe", "showvminfo", "6ac2bff0-d050-49b1-a801-a426ffa39c9f", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO subprocess: Starting process: ["D:\\Virtual Box\\VBoxManage.exe", "showvminfo", "6ac2bff0-d050-49b1-a801-a426ffa39c9f", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO subprocess: Starting process: ["D:\\Virtual Box\\VBoxManage.exe", "showvminfo", "6ac2bff0-d050-49b1-a801-a426ffa39c9f", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO subprocess: Starting process: ["D:\\Virtual Box\\VBoxManage.exe", "showvminfo", "6ac2bff0-d050-49b1-a801-a426ffa39c9f", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO subprocess: Starting process: ["D:\\Virtual Box\\VBoxManage.exe", "showvminfo", "6ac2bff0-d050-49b1-a801-a426ffa39c9f", "--machinereadable"]
INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
DEBUG ssh: == Net-SSH connection debug-level log START ==
DEBUG ssh: D, [2023-12-16T22:25:27.621115 #18544] DEBUG -- net.ssh.transport.session[2d1e0]: establishing connection to 127.0.0.1:2200
DEBUG ssh: == Net-SSH connection debug-level log END ==
ERROR warden: Error occurred: 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.
我尝试卸载 vagrant 和 virtualbox 软件,或者在使用“vagrant destroy”后使用“vagrant up”,但它们不起作用。我甚至为此搜索了解决方案,但都不起作用。请帮帮我,我在那里呆了 3-4 天 :<。谢谢。