AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-359643

Jules Clements's questions

Martin Hope
Jules Clements
Asked: 2017-03-20 22:38:41 +0800 CST

Vagrant Windows 超时配置设置无效

  • 4

我一直在 Vagrant 中构建和使用 Linux 映像,但最近才将覆盖范围扩展到 Windows。我已经处理了映像来满足 sysprep 的需要,但这会导致启动时间非常慢,并且随后的 WinRM 超时也有问题。我尝试设置非常高的超时值,但它们似乎没有效果,即双启动超时但它已经下降

Vagrant.configure(2) do |config|
  config.vm.boot_timeout = 1200
  config.vm.guest = "windows"
  config.vm.communicator = 'winrm'
  config.winrm.timeout = 120
  config.winrm.retry_limit = 10

在这个例子中,我打印了系统时间

Mon Mar 20 18:14:21 NZDT 2017

预计等待 20 分钟

==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'WindowsDocker'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: cbe_default_1489986988330_5366
==> 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: 3389 (guest) => 13389 (host) (adapter 1)
    default: 5985 (guest) => 15985 (host) (adapter 1)
    default: 5986 (guest) => 15986 (host) (adapter 1)
    default: 5985 (guest) => 55985 (host) (adapter 1)
    default: 5986 (guest) => 55986 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: WinRM address: 127.0.0.1:15985
    default: WinRM username: vagrant
    default: WinRM execution_time_limit: PT2H
    default: WinRM transport: negotiate
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.

4分钟后退出

Mon Mar 20 18:18:42 NZDT 2017

平台详情

  • 主机是 Windows 10
  • 流浪者 1.9.2
  • 虚拟盒子 5.1.18
  • 来宾 Windows Server 2016
vagrant
  • 1 个回答
  • 7244 Views
Martin Hope
Jules Clements
Asked: 2017-03-20 20:18:48 +0800 CST

新的 Vagrant Packaged Windows Server 2016 返回身份验证失败。重试

  • 1

我正在使用 Windows Server 2016 创建一个基本映像。该映像已完全修补并应用了所有正常配置,但是当我对其进行测试时,它无法以 vagrant 用户身份连接,并带有一条来自 Google 搜索的消息,暗示它正在尝试使用 SSH,尽管对话框中列出了 WinRM。

我已将构建文档放在github中以供参考。

vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'WindowsDocker'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: temp_default_1489982222856_48671
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 5985 (guest) => 55985 (host) (adapter 1)
    default: 5986 (guest) => 55986 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: WinRM address: 127.0.0.1:55985
    default: WinRM username: vagrant
    default: WinRM execution_time_limit: PT2H
    default: WinRM transport: negotiate
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...

注意:一旦盒子启动,我可以手动连接到使用 WinRM 吗?

$securePassword = ConvertTo-SecureString 'vagrant' -asplaintext -force
$cred = New-Object System.Management.Automation.PSCredential ('vagrant', $securePassword)
enter-pssession 127.0.0.1 -port 55985 -Auth CredSSP -credential $cred
[127.0.0.1]: PS C:\Users\vagrant\Documents> exit

平台详情

  • 主机是 Windows 10
  • 流浪者版本是 1.9.2
  • 甲骨文虚拟机 5.1.18
  • 来宾是 Windows Server 2016 标准评估

注意:在 Vagrant 1.9.1 中,来宾被摧毁了...

    default: WinRM transport: negotiate
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-1.8.1/lib/winrm/http/response_handler.rb:57:in `raise_if_auth_error': WinRM::WinRMAuthorizationError (WinRM::WinRMAuthorizationError)
virtualbox
  • 1 个回答
  • 1181 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve