Windows Containers


Running Visual Studio Remote Debugger in Windows Container (Docker managed)


Originally asked on StackOverflow: http://stackoverflow.com/questions/36420337/running-visual-studio-remote-debugger-in-windows-container-docker-managed
I try to run the Visual Studio Remote Debugger in
a Windows Container on Windows
Server 2016 TP4. Since it runs inside a container, there is no UI.
I try to run the remote debugger via:
.\msvsmon.exe /nostatus /silent /nosecuritywarn /nofirewallwarn /noclrwarn /port 4020
I am executing the above as administrator user (nt authority\system). This works fine on the host computer, but it does not work inside the container. The Windows event log shows the following error event.
Msvsmon was unable to start a server named "`6D2D071453C5:4020`".
The following error occurred: The parameter is incorrect.
Complete event log:
Get-EventLog -LogName Application -EntryType Error | format-list
Index : 1718
EntryType : Error
InstanceId : 3221226473
Message : The description for Event ID '-1073740823' in Source 'Visual Studio Remote Debugger' cannot be found. The local computer may not have the necessary registry information or message DLL
files to display the message, or you may not have permission to access them. The following information is part of the event:'Msvsmon was unable to start a server named
'6D2D071453C5:4020'. The following error occurred: The parameter is incorrect.
View Msvsmon's help for more information.'
Category : (0)
CategoryNumber : 0
ReplacementStrings : {Msvsmon was unable to start a server named '6D2D071453C5:4020'. The following error occurred: The parameter is incorrect.
View Msvsmon's help for more information.}
Source : Visual Studio Remote Debugger
TimeGenerated : 05.04.2016 9:47:19 AM
TimeWritten : 05.04.2016 9:47:19 AM
UserName : NT AUTHORITY\SYSTEM
Now, here comes the confusing part:
6D2D071453C5 is
the container id of my Windows container (docker managed):
PS C:> docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6d2d071453c5 d9d15fbca6d7 "cmd /S /C 'C:\\myprg-" 6 days ago Up 3 days derrin
Usually, in Docker, this container id will also
be the hostname inside/of the container.
So, when I run docker
inspect 6d2d071453c5, I get this in the output:
"Config": {
"Hostname": "6d2d071453c5",
"Domainname": "",
But then, inside the container, I type "hostname"
in the command line and get:
PS C:> hostname
test2016
I think this is specific to Windows Server 2016 Containers running Windows containers at the moment and not sure if this is a bug.
The hostname should not be test2016 (the
name of the container host, my actual physical Win2016 server) but the container id (6d2d071453c5).
At least, this would be my expected behaviour and this is also the case when I run any other container, i.e. a Ubuntu container, on Windows that require a VM. I just re-checked it.
Nevertheless, to circumvent the issue, I adjust the host file, adding:
172.16.0.2 6d2d071453c5
Now I can ping my own hostname at least.
PS C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE\Remote Debugger\x64> ping 6D2D071453C5
Pinging 6d2d071453c5 [172.16.0.2] with 32 bytes of data:
Reply from 172.16.0.2: bytes=32 time<1ms TTL=128
Reply from 172.16.0.2: bytes=32 time<1ms TTL=128
Nevertheless, the remote debugger still does not start, and still says:
Msvsmon was unable to start a server named "`6D2D071453C5:4020`".
The following error occurred: The parameter is incorrect.
I don't see what's wrong with any of the parameters, according to the accompanied help file that lists all the parameters and options. The very same command works fine on the container host, just not inside the container.
Has anybody gotten the remote debugger to work inside a container?

Related Links

Issue with running containers on docker- windows server 2016 standard
How to add a network interface after a windows container running with ---network none?
Parameterizing web.config, etc.
Windows 10 Anniversary Update Container Feature Missing Install-ContainerOSImage
Windows authentication of an app hosted in Windows Container
File shares in a container
Can't run a container on Windows Server 2016 TP5: winapi error #3221227274 (0xc000070a)
Error starting Docker service
RUN powershell -Command C:\myfolder\Setup.exe /qn arg0 arg1 arg2
Can't run a container on Windows Server 2016 TP5: winapi error 0xc000070a
execute the command "docker run -it -p 80:80 microsoft/iis:windowsservercore cmd" and the container will exit right now
Unable to run nanoserver image on windows 10 anniversary update
can not get into the container using the command "docker exec -it xxx cmd" on the background container
Fix For Container Start Failures: Update Windows Container base OS images
TP5 : an error during CreateContainer failed in Win32: The parameter is incorrect. (0x57)
Aspnet into CentOS Docker

Categories

MSDN
Windows Phone Dev Center
Visual Studio Team Fou...
DevLabs
Microsoft Sync Framework
Windows Server
ScriptJunkie
WebsitePanel
Microsoft Research
Samsung PC
Open Specifications
Exchange Server
Archived Forums E-H
Archived Forums I-L
Archived Forums N-R
Archived Forums T-U
In-App Advertising (Ad...
Windows Phone Preview ...
MSDN and TechNet Profi...
Visual F#
Test Tools in Visual S...
Visual Studio Tools fo...
Application Insights (AI)
Developing Universal W...
Submitting and Publish...
Payouts and Reporting
Promote Your App
Application Compatibil...
DirectShow Development
Windows Desktop Search...
Windows Filtering Plat...
Windows Desktop Perfmo...
Windows Desktop Ribbon...
Outlook for Developers
SharePoint 2013 - Gene...
SharePoint 2013 - Usin...
Azure Cache
Azure Notification Hubs
Azure Key Vault
Azure Security Center
.NET Framework Class L...
Team Foundation Server...
Team Foundation Server...
LINQ to SQL
XML, System.Xml, MSXML...
Reactive Extensions (Rx)
JScript Native
Partnering with Microsoft
SQL Server Security
SQL Server Documentation
SQL Server Compact
Standard 7: Embedded E...
Windows Embedded 8.1 I...
Windows Forms General
ClickOnce and Setup & ...
Windows Live Messenger...
Bing Maps WPF, WP7/8/8...
SharePoint Server Prot...
Exchange Server Protocols
Office Protocols
Office XML, ODF, and B...
Project Server - Setup...
Microsoft Lync Client ...
Microsoft Lync Server ...
Hosting and Streaming ...
Expression Blend + Ske...
Expression Media
Microsoft Online Syndi...
Customer Care Framework
Visual Studio Report C...
Retired SharePoint Wor...
.NET Framework 4 setup...
.NET Remoting and Runt...
CAT.NET
Crystal Reports for Vi...
Doloto
Dryad, DSC, and DryadL...
Game Technologies: Aud...
Face Tracking – Kinect...
ISV Community Days
Microsoft adCenter: De...
Multimap API Developme...
Office Live Small Busi...
patterns & practices: ...
Search Server: Report ...
SyncFx - Feedback [Rea...
SQL Server 2014 Data Q...
Team Foundation Server...
Tellme Studio (retired)
TFS Deployment to Azure
Tools for Windows Stor...
Visual Studio 2008 IDE...
Visual Studio Database...
Visual Studio Online "...
Windows Live Search: D...
Windows MultiPoint Mou...
Windows SideShow Devel...
Building Windows Store...
Building Windows Store...
XML in Visual Studio 2...
XNA Framework
Windows Phone Preview ...
Windows Phone Preview ...
Windows Phone Preview ...
Microsoft R Open

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile