gusztavvargadr / packer

Packer templates for building Windows and Ubuntu images

Home Page:https://app.vagrantup.com/gusztavvargadr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

windows-11 image fails to provision: Digest initialization failed

splitbrain opened this issue · comments

I am using a minimal Vagrant file with Virtualbox on Linux:

$ cat Vagrantfile 
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "gusztavvargadr/windows-11"
end

Provisioning the machine fails:

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'gusztavvargadr/windows-11'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'gusztavvargadr/windows-11' version '2202.0.2310' is up to date...
==> default: Setting the name of the VM: vagrant-windows11_default_1702391514356_64437
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 3389 (guest) => 53389 (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: Running 'pre-boot' VM customizations...
==> 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
An error occurred executing a remote WinRM command.

Shell: Cmd
Command: hostname
Message: Digest initialization failed: initialization error

What am I missing?

Adding the following seems to be a working workaround:

  config.winrm.transport = :plaintext                                                                                   
  config.winrm.basic_auth_only = true

@splitbrain thanks for reaching out and for providing a workaround, much appreciated!

This seems to be a regression in Vagrant itself, it came up earlier for example at #404. Can you provide some information on your Vagrant and OS versions just to be sure where it happens?

There are still a couple of open issues at the Vagrant repo like hashicorp/vagrant#13229, hashicorp/vagrant#13242 or hashicorp/vagrant#13273. To me pinning the Vagrant version to 2.3.6 or using the latest 2.4.0 solved the problem (on Ubuntu and Windows hosts at least).

I'm on ArchLinux with

  • Vagrant 2.4.0
  • Linux 6.6.6-arch1-1 x86_64 GNU/Linux
  • VirtualBox v7.0.12
  • OpenSSL 3.1.4 24 Oct 2023 (Library: OpenSSL 3.1.4 24 Oct 2023)

@splitbrain thanks for the details. I'm afraid I cannot recommend anything else at this point beyond downgrading Vagrant itself, maybe try to add your details to to the above issues.

I will try to look into adding these options to the Vagrant box by default for the next release of my images.

My workaround is good enough for my use case. Feel free to close this.

Thank you for maintaining these box images btw 🙏