This blog was originally written by Dell engineer Sreeja Golui. For any feedback/suggestions please write them to WinServerBlogs@dell.com.
Nano Server is a new small-footprint option for installing Windows Server 2016. It is based on the concept of a minimal install similar to Microsoft Server Core. Unlike Server Core, Nano Server is intended to be a completely headless installation without any local UI or console.
A Nano server can be configured for kernel debug in more than one method.
Post the installation of Nano server, one can configure it for kernel debugging with the conventional methods by creating a PowerShell session.
Connect to the server with a remote PowerShell session:
Set-Item WSMan:\localhost\Client\TrustedHosts "x.y.z.w"
Enter-PSSession -ComputerName "x.y.z.w"-Credential "x.y.z.w\Administrator"
Net Debug
1. Obtain the bus, device and function of the network adapter to be reserved for kernel debugging by using PowerShell cmdlets.
- get-pnpdevice – Observe the output and select the network adapter to be used for Kernel debugging. Note the ‘FriendlyName’.
- get-pnpdevice -FriendlyName 'FriendlyName' | Select 'InstanceId' (Supply the friendly name from previous step and Note the Instance ID in the output)
- get-pnpDeviceProperty –InstanceId ‘Instance ID‘ (supply the Instance ID from previous step)
Note the value of the Device_LocationInfo to get the Bus, Device and Function.
2. Use the following commands to set up net debug
- bcdedit /debug on
- bcdedit /dbgsettings net hostip:a.b.c.d port:n
(This will generate a key, save that for connecting; optionally you can create your own key for connecting; hostip is the IP of the system from where debugger session will be run)
- bcdedit /set "{dbgsettings}" busparams b.d.f (supply the bdf from step 1)
- Reboot
For more information on this step, refer:
https://msdn.microsoft.com/en-us/library/windows/hardware/hh439346(v=vs.85).aspx
3. From the host, use the key in step 2, and the port number to connect with windbg.