clong / DetectionLab

Automate the creation of a lab environment complete with security tooling and logging best practices
MIT License
4.59k stars 979 forks source link

When building a DC image, the network fails #858

Closed vonjk closed 1 year ago

vonjk commented 1 year ago

Please verify that you are building from an updated Master branch before filing an issue.

Description of the issue:

When building a DC image, the network fails

Link to Gist Containing Build Logs:

vagrant up dc
Bringing machine 'dc' up with 'vmware_desktop' provider...
==> dc: Cloning VMware VM: 'detectionlab/win2016'. This can take some time...
==> dc: Checking if box 'detectionlab/win2016' version '1.8' is up to date...
==> dc: Verifying vmnet devices are healthy...
==> dc: Preparing network adapters...
WARNING: The VMX file for this box contains a setting that is automatically overwritten by Vagrant
WARNING: when started. Vagrant will stop overwriting this setting in an upcoming release which may
WARNING: prevent proper networking setup. Below is the detected VMX setting:
WARNING:
WARNING:   ethernet0.pcislotnumber = "33"
WARNING:
WARNING: If networking fails to properly configure, it may require this VMX setting. It can be manually
WARNING: applied via the Vagrantfile:
WARNING:
WARNING:   Vagrant.configure(2) do |config|
WARNING:     config.vm.provider :vmware_desktop do |vmware|
WARNING:       vmware.vmx["ethernet0.pcislotnumber"] = "33"
WARNING:     end
WARNING:   end
WARNING:
WARNING: For more information: https://www.vagrantup.com/docs/vmware/boxes.html#vmx-allowlisting
==> dc: Fixed port collision for 22 => 2222. Now on port 2200.
==> dc: Starting the VMware VM...
==> dc: Waiting for the VM to receive an address...
==> dc: Forwarding ports...
    dc: -- 5985 => 55985
    dc: -- 5986 => 55986
    dc: -- 22 => 2200
==> dc: Waiting for machine to boot. This may take a few minutes...
    dc: WinRM address: 127.0.0.1:55985
    dc: WinRM username: vagrant
    dc: WinRM execution_time_limit: PT2H
    dc: WinRM transport: plaintext
==> dc: Machine booted and ready!
==> dc: Setting hostname...
==> dc: Waiting for machine to reboot...
==> dc: Configuring network adapters within the VM...
==> dc: Configuring secondary network adapters through VMware
==> dc: on Windows is not yet supported. You will need to manually
==> dc: configure the network adapter.
==> dc: Configuring proxy environment variables...
==> dc: Enabling and configuring shared folders...
    dc: -- /Users/jk/Desktop/DetectionLab/Vagrant: /vagrant
==> dc: Running provisioner: shell...
    dc: Running: scripts/fix-second-network.ps1 as C:\tmp\vagrant-shell.ps1
    dc: [01:54] Running fix-second-network.ps1...
    dc: [01:54] No VirtIO adapters, moving on...
    dc: [01:54]
    dc: Setting IP address and DNS information for the Ethernet1 interface
    dc: If this step times out, it's because vagrant is connecting to the VM on the wrong interface
    dc: See https://github.com/clong/DetectionLab/issues/114 for more information
    dc: [01:54] Set IP address to 192.168.56.102 of interface Ethernet1
    dc:
    dc: [01:54] Set DNS server address to 8.8.8.8 of interface Ethernet1
    dc:
==> dc: Running provisioner: shell...
    dc: Running: scripts/provision.ps1 as C:\tmp\vagrant-shell.ps1
    dc: [01:55] Setting timezone to UTC...
    dc: [01:55] Checking if Windows evaluation is expiring soon or expired...
    dc: [01:55] 10 days remaining before expiration
    dc: [01:55] Less than 30 days remaining before Windows expiration. Attempting to rearm...
    dc: Microsoft (R) Windows Script Host Version 5.812
    dc: Copyright (C) Microsoft Corporation. All rights reserved.
    dc:
    dc: Activating Windows(R), ServerStandardEval edition (9dfa8ec0-7665-4b9d-b2cb-bfc2dc37c9f4) ...
    dc: Product activated successfully.
    dc:
    dc: [01:55] Disabling the Invoke-WebRequest download progress bar globally for speed improvements.
    dc: [01:55] See https://github.com/PowerShell/PowerShell/issues/2138 for more info
    dc: [01:55] Lowering the interface metric (increasing priority) for the interface with the 192.168.56.x address
    dc:
    dc: ifIndex InterfaceAlias                  AddressFamily NlMtu(Bytes) InterfaceMetric Dhcp     Connec
    dc:                                                                                             tionSt
    dc:                                                                                             ate
    dc: ------- --------------                  ------------- ------------ --------------- ----     ------
    dc: 4       isatap.{0A00358B-4710-411A-9... IPv6                  1280              25 Enabled  Con...
    dc: 5       Ethernet0 2                     IPv6                  1500              25 Enabled  Con...
    dc: 7       Local Area Connection* 3        IPv6                  1280              75 Enabled  Con...
    dc: 6       isatap.localdomain              IPv6                  1280              25 Enabled  Con...
    dc: 2       Ethernet1                       IPv6                  1500              15 Enabled  Con...
    dc: 1       Loopback Pseudo-Interface 1     IPv6            4294967295              75 Disabled Con...
    dc: 5       Ethernet0 2                     IPv4                  1500              25 Enabled  Con...
    dc: 2       Ethernet1                       IPv4                  1500              15 Disabled Con...
    dc: 1       Loopback Pseudo-Interface 1     IPv4            4294967295              75 Disabled Con...
    dc: [01:55] Unable to connect to ping.detectionlab.network
    dc: The remote name could not be resolved: 'ping.detectionlab.network'
    dc: [01:55] Disabling IPv6 on all network adatpers...
    dc:
    dc: Caption              : MSFT_NetAdapterBindingSettingData 'Intel(R) PRO/1000 MT Network Connection'
    dc: Description          : Internet Protocol Version 6 (TCP/IPv6)
    dc: ElementName          : ms_tcpip6
    dc: InstanceID           : {0A00358B-4710-411A-9281-041C2D3571D4}::ms_tcpip6
    dc: InterfaceDescription : Intel(R) PRO/1000 MT Network Connection
    dc: Name                 : Ethernet1
    dc: Source               : 1
    dc: SystemName           : dc
    dc: BindName             : Tcpip6
    dc: Characteristics      : 132
    dc: ComponentClassGuid   : {4D36E975-E325-11CE-BFC1-08002BE10318}
    dc: ComponentClassName   : Transport
    dc: ComponentID          : ms_tcpip6
    dc: DisplayName          : Internet Protocol Version 6 (TCP/IPv6)
    dc: Enabled              : False
    dc: PSComputerName       :
    dc: ifAlias              : Ethernet1
    dc: InterfaceAlias       : Ethernet1
    dc: ifDesc               : Intel(R) PRO/1000 MT Network Connection
    dc:
    dc:
    dc: Caption              : MSFT_NetAdapterBindingSettingData 'Intel(R) PRO/1000 MT Network Connection
    dc:                        #2'
    dc: Description          : Internet Protocol Version 6 (TCP/IPv6)
    dc: ElementName          : ms_tcpip6
    dc: InstanceID           : {D64464EB-388C-4532-8EF3-5DBC1ED28DAD}::ms_tcpip6
    dc: InterfaceDescription : Intel(R) PRO/1000 MT Network Connection #2
    dc: Name                 : Ethernet0 2
    dc: Source               : 1
    dc: SystemName           : dc
    dc: BindName             : Tcpip6
    dc: Characteristics      : 132
    dc: ComponentClassGuid   : {4D36E975-E325-11CE-BFC1-08002BE10318}
    dc: ComponentClassName   : Transport
    dc: ComponentID          : ms_tcpip6
    dc: DisplayName          : Internet Protocol Version 6 (TCP/IPv6)
    dc: Enabled              : False
    dc: PSComputerName       :
    dc: ifAlias              : Ethernet0 2
    dc: InterfaceAlias       : Ethernet0 2
    dc: ifDesc               : Intel(R) PRO/1000 MT Network Connection #2
    dc:
    dc: The operation completed successfully.
    dc:
    dc: [01:55] Current domain is set to 'workgroup'. Time to join the domain!
    dc: [01:55] Installing bginfo...
    dc: [01:55] Installing BGInfo...
    dc:
    dc: PSPath            : Microsoft.PowerShell.Core\FileSystem::C:\Program Files\sysinternals
    dc: PSParentPath      : Microsoft.PowerShell.Core\FileSystem::C:\Program Files
    dc: PSChildName       : sysinternals
    dc: PSDrive           : C
    dc: PSProvider        : Microsoft.PowerShell.Core\FileSystem
    dc: PSIsContainer     : True
    dc: Name              : sysinternals
    dc: Parent            : Program Files
    dc: Exists            : True
    dc: Root              : C:\
    dc: FullName          : C:\Program Files\sysinternals
    dc: Extension         :
    dc: CreationTime      : 10/3/2022 1:55:43 AM
    dc: CreationTimeUtc   : 10/3/2022 8:55:43 AM
    dc: LastAccessTime    : 10/3/2022 1:55:43 AM
    dc: LastAccessTimeUtc : 10/3/2022 8:55:43 AM
    dc: LastWriteTime     : 10/3/2022 1:55:43 AM
    dc: LastWriteTimeUtc  : 10/3/2022 8:55:43 AM
    dc: Attributes        : Directory
    dc: Mode              : d-----
    dc: BaseName          : sysinternals
    dc: Target            : {}
    dc: LinkType          :
    dc:
    dc: powershell.exe : Exception calling "DownloadFile" with "2" argument(s): "Unable to connect to the remote server"
    dc:     + CategoryInfo          : NotSpecified: (Exception calli... remote server":String) [], RemoteException
    dc:     + FullyQualifiedErrorId : NativeCommandError
    dc: At C:\vagrant\scripts\install-bginfo.ps1:10 char:3
    dc: +   (New-Object Net.WebClient).DownloadFile('http://live.sysinternals.c ...
    dc: +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    dc:     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    dc:     + FullyQualifiedErrorId : WebException
    dc:
    dc: [01:56] My hostname is DC
    dc: [01:56] Installing RSAT tools
    dc:
    dc: Success       : True
    dc: RestartNeeded : No
    dc: FeatureResult : {Remote Server Administration Tools, Active Directory Administrative Center,
    dc:                 Active Directory module for Windows PowerShell, AD DS and AD LDS Tools...}
    dc: ExitCode      : Success
    dc:
    dc: [01:56] Creating domain controller...
    dc:
    dc: The task has completed successfully.
    dc: See log %windir%\security\logs\scesrv.log for detail info.
    dc: Completed 5 percent (0/18)  Process Security Policy area
    dc: Completed 22 percent (3/18)     Process Security Policy area
    dc: Completed 44 percent (7/18)     Process Security Policy area
    dc: Completed 61 percent (10/18)    Process Security Policy area
    dc: Completed 77 percent (13/18)    Process Security Policy area
    dc: Completed 100 percent (18/18)   Process Security Policy area
    dc:
    dc: The task has completed successfully.
    dc: See log %windir%\security\logs\scesrv.log for detail info.
    dc:
    dc: Success       : True
    dc: RestartNeeded : No
    dc: FeatureResult : {Active Directory Domain Services}
    dc: ExitCode      : Success
    dc:
    dc: WARNING: Windows Server 2016 domain controllers have a default for the security setting named
    dc: "Allow cryptography algorithms compatible with Windows NT 4.0" that prevents weaker cryptography
    dc: algorithms when establishing security channel sessions.
    dc:
    dc:
    dc:
    dc: For more information about this setting, see Knowledge Base article 942564
    dc: (http://go.microsoft.com/fwlink/?LinkId=104751).
    dc:
    dc:
    dc: WARNING: This computer has at least one physical network adapter that does not have static IP
    dc: address(es) assigned to its IP Properties. If both IPv4 and IPv6 are enabled for a network
    dc: adapter, both IPv4 and IPv6 static IP addresses should be assigned to both IPv4 and IPv6
    dc: Properties of the physical network adapter. Such static IP address(es) assignment should be done
    dc: to all the physical network adapters for reliable Domain Name System (DNS) operation.
    dc:
    dc:
    dc: WARNING: A delegation for this DNS server cannot be created because the authoritative parent zone
    dc: cannot be found or it does not run Windows DNS server. If you are integrating with an existing DNS
    dc:  infrastructure, you should manually create a delegation to this DNS server in the parent zone to
    dc: ensure reliable name resolution from outside the domain "windomain.local". Otherwise, no action is
    dc:  required.
    dc:
    dc:
    dc: WARNING: Windows Server 2016 domain controllers have a default for the security setting named
    dc: "Allow cryptography algorithms compatible with Windows NT 4.0" that prevents weaker cryptography
    dc: algorithms when establishing security channel sessions.
    dc:
    dc:
    dc:
    dc: For more information about this setting, see Knowledge Base article 942564
    dc: (http://go.microsoft.com/fwlink/?LinkId=104751).
    dc:
    dc:
    dc: WARNING: This computer has at least one physical network adapter that does not have static IP
    dc: address(es) assigned to its IP Properties. If both IPv4 and IPv6 are enabled for a network
    dc: adapter, both IPv4 and IPv6 static IP addresses should be assigned to both IPv4 and IPv6
    dc: Properties of the physical network adapter. Such static IP address(es) assignment should be done
    dc: to all the physical network adapters for reliable Domain Name System (DNS) operation.
    dc:
    dc:
    dc: WARNING: A delegation for this DNS server cannot be created because the authoritative parent zone
    dc: cannot be found or it does not run Windows DNS server. If you are integrating with an existing DNS
    dc:  infrastructure, you should manually create a delegation to this DNS server in the parent zone to
    dc: ensure reliable name resolution from outside the domain "windomain.local". Otherwise, no action is
    dc:  required.
    dc:
    dc:
    dc:
    dc: Message        : You must restart this computer to complete the operation.
    dc:
    dc: Context        : DCPromo.General.2
    dc: RebootRequired : True
    dc: Status         : Success
    dc:
    dc: [02:02] Setting DNS
    dc:
    dc: __GENUS          : 2
    dc: __CLASS          : __PARAMETERS
    dc: __SUPERCLASS     :
    dc: __DYNASTY        : __PARAMETERS
    dc: __RELPATH        :
    dc: __PROPERTY_COUNT : 1
    dc: __DERIVATION     : {}
    dc: __SERVER         :
    dc: __NAMESPACE      :
    dc: __PATH           :
    dc: ReturnValue      : 0
    dc: PSComputerName   :
    dc:
    dc: [02:02] Setting timezone to UTC
    dc: [02:02] Excluding NAT interface from DNS
    dc: ListenAddresses reset successful.
    dc:
    dc: Command completed successfully.
    dc:
    dc:
    dc:
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

powershell -ExecutionPolicy Bypass -OutputFormat Text -file "C:\tmp\vagrant-shell.ps1"

Stdout from the command:

[01:55] Setting timezone to UTC...
[01:55] Checking if Windows evaluation is expiring soon or expired...
[01:55] 10 days remaining before expiration
[01:55] Less than 30 days remaining before Windows expiration. Attempting to rearm...
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

Activating Windows(R), ServerStandardEval edition (9dfa8ec0-7665-4b9d-b2cb-bfc2dc37c9f4) ...
Product activated successfully.

[01:55] Disabling the Invoke-WebRequest download progress bar globally for speed improvements.
[01:55] See https://github.com/PowerShell/PowerShell/issues/2138 for more info
[01:55] Lowering the interface metric (increasing priority) for the interface with the 192.168.56.x address

ifIndex InterfaceAlias                  AddressFamily NlMtu(Bytes) InterfaceMetric Dhcp     Connec
                                                                                            tionSt
                                                                                            ate
------- --------------                  ------------- ------------ --------------- ----     ------
4       isatap.{0A00358B-4710-411A-9... IPv6                  1280              25 Enabled  Con...
5       Ethernet0 2                     IPv6                  1500              25 Enabled  Con...
7       Local Area Connection* 3        IPv6                  1280              75 Enabled  Con...
6       isatap.localdomain              IPv6                  1280              25 Enabled  Con...
2       Ethernet1                       IPv6                  1500              15 Enabled  Con...
1       Loopback Pseudo-Interface 1     IPv6            4294967295              75 Disabled Con...
5       Ethernet0 2                     IPv4                  1500              25 Enabled  Con...
2       Ethernet1                       IPv4                  1500              15 Disabled Con...
1       Loopback Pseudo-Interface 1     IPv4            4294967295              75 Disabled Con...
[01:55] Unable to connect to ping.detectionlab.network
The remote name could not be resolved: 'ping.detectionlab.network'
[01:55] Disabling IPv6 on all network adatpers...

Caption              : MSFT_NetAdapterBindingSettingData 'Intel(R) PRO/1000 MT Network Connection'
Description          : Internet Protocol Version 6 (TCP/IPv6)
ElementName          : ms_tcpip6
InstanceID           : {0A00358B-4710-411A-9281-041C2D3571D4}::ms_tcpip6
InterfaceDescription : Intel(R) PRO/1000 MT Network Connection
Name                 : Ethernet1
Source               : 1
SystemName           : dc
BindName             : Tcpip6
Characteristics      : 132
ComponentClassGuid   : {4D36E975-E325-11CE-BFC1-08002BE10318}
ComponentClassName   : Transport
ComponentID          : ms_tcpip6
DisplayName          : Internet Protocol Version 6 (TCP/IPv6)
Enabled              : False
PSComputerName       :
ifAlias              : Ethernet1
InterfaceAlias       : Ethernet1
ifDesc               : Intel(R) PRO/1000 MT Network Connection

Caption              : MSFT_NetAdapterBindingSettingData 'Intel(R) PRO/1000 MT Network Connection
                       #2'
Description          : Internet Protocol Version 6 (TCP/IPv6)
ElementName          : ms_tcpip6
InstanceID           : {D64464EB-388C-4532-8EF3-5DBC1ED28DAD}::ms_tcpip6
InterfaceDescription : Intel(R) PRO/1000 MT Network Connection #2
Name                 : Ethernet0 2
Source               : 1
SystemName           : dc
BindName             : Tcpip6
Characteristics      : 132
ComponentClassGuid   : {4D36E975-E325-11CE-BFC1-08002BE10318}
ComponentClassName   : Transport
ComponentID          : ms_tcpip6
DisplayName          : Internet Protocol Version 6 (TCP/IPv6)
Enabled              : False
PSComputerName       :
ifAlias              : Ethernet0 2
InterfaceAlias       : Ethernet0 2
ifDesc               : Intel(R) PRO/1000 MT Network Connection #2

The operation completed successfully.

[01:55] Current domain is set to 'workgroup'. Time to join the domain!
[01:55] Installing bginfo...
[01:55] Installing BGInfo...

PSPath            : Microsoft.PowerShell.Core\FileSystem::C:\Program Files\sysinternals
PSParentPath      : Microsoft.PowerShell.Core\FileSystem::C:\Program Files
PSChildName       : sysinternals
PSDrive           : C
PSProvider        : Microsoft.PowerShell.Core\FileSystem
PSIsContainer     : True
Name              : sysinternals
Parent            : Program Files
Exists            : True
Root              : C:\
FullName          : C:\Program Files\sysinternals
Extension         :
CreationTime      : 10/3/2022 1:55:43 AM
CreationTimeUtc   : 10/3/2022 8:55:43 AM
LastAccessTime    : 10/3/2022 1:55:43 AM
LastAccessTimeUtc : 10/3/2022 8:55:43 AM
LastWriteTime     : 10/3/2022 1:55:43 AM
LastWriteTimeUtc  : 10/3/2022 8:55:43 AM
Attributes        : Directory
Mode              : d-----
BaseName          : sysinternals
Target            : {}
LinkType          :

[01:56] My hostname is DC
[01:56] Installing RSAT tools

Success       : True
RestartNeeded : No
FeatureResult : {Remote Server Administration Tools, Active Directory Administrative Center,
                Active Directory module for Windows PowerShell, AD DS and AD LDS Tools...}
ExitCode      : Success

[01:56] Creating domain controller...

The task has completed successfully.
See log %windir%\security\logs\scesrv.log for detail info.
Completed 5 percent (0/18)  Process Security Policy area
Completed 22 percent (3/18)     Process Security Policy area
Completed 44 percent (7/18)     Process Security Policy area
Completed 61 percent (10/18)    Process Security Policy area
Completed 77 percent (13/18)    Process Security Policy area
Completed 100 percent (18/18)   Process Security Policy area

The task has completed successfully.
See log %windir%\security\logs\scesrv.log for detail info.

Success       : True
RestartNeeded : No
FeatureResult : {Active Directory Domain Services}
ExitCode      : Success

WARNING: Windows Server 2016 domain controllers have a default for the security setting named
"Allow cryptography algorithms compatible with Windows NT 4.0" that prevents weaker cryptography
algorithms when establishing security channel sessions.

For more information about this setting, see Knowledge Base article 942564
(http://go.microsoft.com/fwlink/?LinkId=104751).

WARNING: This computer has at least one physical network adapter that does not have static IP
address(es) assigned to its IP Properties. If both IPv4 and IPv6 are enabled for a network
adapter, both IPv4 and IPv6 static IP addresses should be assigned to both IPv4 and IPv6
Properties of the physical network adapter. Such static IP address(es) assignment should be done
to all the physical network adapters for reliable Domain Name System (DNS) operation.

WARNING: A delegation for this DNS server cannot be created because the authoritative parent zone
cannot be found or it does not run Windows DNS server. If you are integrating with an existing DNS
 infrastructure, you should manually create a delegation to this DNS server in the parent zone to
ensure reliable name resolution from outside the domain "windomain.local". Otherwise, no action is
 required.

WARNING: Windows Server 2016 domain controllers have a default for the security setting named
"Allow cryptography algorithms compatible with Windows NT 4.0" that prevents weaker cryptography
algorithms when establishing security channel sessions.

For more information about this setting, see Knowledge Base article 942564
(http://go.microsoft.com/fwlink/?LinkId=104751).

WARNING: This computer has at least one physical network adapter that does not have static IP
address(es) assigned to its IP Properties. If both IPv4 and IPv6 are enabled for a network
adapter, both IPv4 and IPv6 static IP addresses should be assigned to both IPv4 and IPv6
Properties of the physical network adapter. Such static IP address(es) assignment should be done
to all the physical network adapters for reliable Domain Name System (DNS) operation.

WARNING: A delegation for this DNS server cannot be created because the authoritative parent zone
cannot be found or it does not run Windows DNS server. If you are integrating with an existing DNS
 infrastructure, you should manually create a delegation to this DNS server in the parent zone to
ensure reliable name resolution from outside the domain "windomain.local". Otherwise, no action is
 required.

Message        : You must restart this computer to complete the operation.

Context        : DCPromo.General.2
RebootRequired : True
Status         : Success

[02:02] Setting DNS

__GENUS          : 2
__CLASS          : __PARAMETERS
__SUPERCLASS     :
__DYNASTY        : __PARAMETERS
__RELPATH        :
__PROPERTY_COUNT : 1
__DERIVATION     : {}
__SERVER         :
__NAMESPACE      :
__PATH           :
ReturnValue      : 0
PSComputerName   :

[02:02] Setting timezone to UTC
[02:02] Excluding NAT interface from DNS
ListenAddresses reset successful.

Command completed successfully.

Stderr from the command:

powershell.exe : Exception calling "DownloadFile" with "2" argument(s): "Unable to connect to the remote server"
    + CategoryInfo          : NotSpecified: (Exception calli... remote server":String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
At C:\vagrant\scripts\install-bginfo.ps1:10 char:3
+   (New-Object Net.WebClient).DownloadFile('http://live.sysinternals.c ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException
vagrant reload dc --provision
==> dc: Attempting graceful shutdown of VM...
==> dc: Checking if box 'detectionlab/win2016' version '1.8' is up to date...
==> dc: Verifying vmnet devices are healthy...
==> dc: Preparing network adapters...
==> dc: Fixed port collision for 22 => 2222. Now on port 2200.
==> dc: Starting the VMware VM...
==> dc: Waiting for the VM to receive an address...
==> dc: Forwarding ports...
    dc: -- 5985 => 55985
    dc: -- 5986 => 55986
    dc: -- 22 => 2200
==> dc: Waiting for machine to boot. This may take a few minutes...
    dc: WinRM address: 127.0.0.1:55985
    dc: WinRM username: vagrant
    dc: WinRM execution_time_limit: PT2H
    dc: WinRM transport: plaintext
==> dc: Machine booted and ready!
==> dc: Setting hostname...
==> dc: Configuring network adapters within the VM...
==> dc: Configuring secondary network adapters through VMware
==> dc: on Windows is not yet supported. You will need to manually
==> dc: configure the network adapter.
==> dc: Configuring proxy environment variables...
==> dc: Enabling and configuring shared folders...
    dc: -- /Users/jk/Desktop/DetectionLab/Vagrant: /vagrant
==> dc: Running provisioner: shell...
    dc: Running: scripts/fix-second-network.ps1 as C:\tmp\vagrant-shell.ps1
    dc: [09:12] Running fix-second-network.ps1...
    dc: [09:12] No VirtIO adapters, moving on...
    dc: [09:12]
    dc: Setting IP address and DNS information for the Ethernet1 interface
    dc: If this step times out, it's because vagrant is connecting to the VM on the wrong interface
    dc: See https://github.com/clong/DetectionLab/issues/114 for more information
An error occurred executing a remote WinRM command.

Shell: Elevated
Command: powershell -ExecutionPolicy Bypass -OutputFormat Text -file "C:\tmp\vagrant-shell.ps1" -ip 192.168.56.102 -dns 8.8.8.8 -gateway 192.168.56.1
Message: Bad HTTP response returned from server. Body(if present): (502).
image
clong commented 1 year ago

Likely caused by this change, I've since reverted it: https://github.com/clong/DetectionLab/commit/f919a02133f586cc276f491b8f2931cd9f89d68d