Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Upcoming OSR Seminars:
Developing File Systems for Windows, Seattle, WA 4-7 November, 2014
Kernel Debugging & Crash Analysis Lab, Boston/Waltham, MA 10-14 November, 2014
Writing WDF Drivers: Core Concepts Lab, Palo Alto, CA 12-16 January, 2015
Windows Internals & Software Drivers Lab, Seattle, WA, 16-20 February, 2015
Writing WDF Drivers: Advanced Lab, Palo Alto, CA 10-13 March, 2015


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 27  
05 Nov 12 13:18
ntdev member 132136
xxxxxx@brandonfa.lk
Join Date:
Posts To This List: 27
Hyper-V Kernel Debugging

I've decided to try out Hyper-V this week, and I've heard here and there that Hyper-V allows for really quick kernel debugging. Is this true? How do I go about kernel debugging 'properly' on Hyper-V? -Brandon --
  Message 2 of 27  
05 Nov 12 15:15
Maxim S. Shatskih
xxxxxx@storagecraft.com
Join Date: 20 Feb 2003
Posts To This List: 9459
Hyper-V Kernel Debugging

Redirect the guest's COM1 to a pipe, and then use this pipe name in WinDbg's command line (see WinDbg docs). -- Maxim S. Shatskih Windows DDK MVP xxxxx@storagecraft.com http://www.storagecraft.com "Brandon Falk" <xxxxx@brandonfa.lk> wrote in message news:184062@ntdev... I've decided to try out Hyper-V this week, and I've heard here and there that Hyper-V allows for really quick kernel debugging. Is this true? How do I go about kernel debugging 'properly' on Hyper-V? -Brandon
  Message 3 of 27  
05 Nov 12 15:20
ntdev member 132136
xxxxxx@brandonfa.lk
Join Date:
Posts To This List: 27
Hyper-V Kernel Debugging

Is it any faster than 115200, or is it just a typical COM debugging session? -Brandon On Mon, Nov 5, 2012 at 3:14 PM, Maxim S. Shatskih <xxxxx@storagecraft.com>wrote: > Redirect the guest's COM1 to a pipe, and then use this pipe name in > WinDbg's command line (see WinDbg docs). > > -- > Maxim S. Shatskih > Windows DDK MVP > xxxxx@storagecraft.com > http://www.storagecraft.com > > "Brandon Falk" <xxxxx@brandonfa.lk> wrote in message <...excess quoted lines suppressed...> --
  Message 4 of 27  
05 Nov 12 16:03
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 9567
Hyper-V Kernel Debugging

Brandon Falk wrote: > Is it any faster than 115200, or is it just a typical COM debugging > session? You should be able to answer that. It's all virtual. There is no serial hardware involved, so it runs infinitely fast. So to speak. -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 5 of 27  
05 Nov 12 17:09
ntdev member 132136
xxxxxx@brandonfa.lk
Join Date:
Posts To This List: 27
Hyper-V Kernel Debugging

I've had issues with VMWare where the emulated hardware emulates the speed as well. I guess I'll test it out to see. Hopefully it's infinitely fast :) -Brandon On Mon, Nov 5, 2012 at 4:02 PM, Tim Roberts <xxxxx@probo.com> wrote: > Brandon Falk wrote: > > Is it any faster than 115200, or is it just a typical COM debugging > > session? > > You should be able to answer that. It's all virtual. There is no > serial hardware involved, so it runs infinitely fast. So to speak. > > -- > Tim Roberts, xxxxx@probo.com > Providenza & Boekelheide, Inc. <...excess quoted lines suppressed...> --
  Message 6 of 27  
05 Nov 12 17:19
Bill Wandel
xxxxxx@bwandel.com
Join Date: 14 Sep 2010
Posts To This List: 101
Hyper-V Kernel Debugging

It is not infinitely fast. Bill Wandel From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brandon Falk Sent: Monday, November 05, 2012 5:09 PM To: Windows System Software Devs Interest List Subject: Re: [ntdev] Hyper-V Kernel Debugging I've had issues with VMWare where the emulated hardware emulates the speed as well. I guess I'll test it out to see. Hopefully it's infinitely fast :) -Brandon On Mon, Nov 5, 2012 at 4:02 PM, Tim Roberts <xxxxx@probo.com> wrote: Brandon Falk wrote: > Is it any faster than 115200, or is it just a typical COM debugging > session? You should be able to answer that. It's all virtual. There is no serial hardware involved, so it runs infinitely fast. So to speak. -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc. --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --
  Message 7 of 27  
05 Nov 12 23:34
ntdev member 134037
xxxxxx@sasken.com
Join Date:
Posts To This List: 28
Hyper-V Kernel Debugging

Hi All, I am new to KMDF USB driver. I need to develop a USB Function Driver to implement a USB CDC ACM profile. Output: 1) Device Manager should display the USB CDC ACM profiles as virtual COM port 2) When teraterm/Hyperterminal connected to the Virtual COM port, AT command /response should be working through the port Can anyone let me know how to proceed? I also want to know the difference between Virtual Serial port and usb cdc acm class driver. Thanks in advance, Shruthi From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Bill Wandel Sent: Tuesday, November 06, 2012 3:48 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] Hyper-V Kernel Debugging It is not infinitely fast. Bill Wandel From: xxxxx@lists.osr.com<mailto:xxxxx@lists.osr.com> [mailto:xxxxx@lists.osr.com]<mailto:[mailto:xxxxx@lists.osr.com]> On Behalf Of Brandon Falk Sent: Monday, November 05, 2012 5:09 PM To: Windows System Software Devs Interest List Subject: Re: [ntdev] Hyper-V Kernel Debugging I've had issues with VMWare where the emulated hardware emulates the speed as well. I guess I'll test it out to see. Hopefully it's infinitely fast :) -Brandon On Mon, Nov 5, 2012 at 4:02 PM, Tim Roberts <xxxxx@probo.com<mailto:xxxxx@probo.com>> wrote: Brandon Falk wrote: > Is it any faster than 115200, or is it just a typical COM debugging > session? You should be able to answer that. It's all virtual. There is no serial hardware involved, so it runs infinitely fast. So to speak. -- Tim Roberts, xxxxx@probo.com<mailto:xxxxx@probo.com> Providenza & Boekelheide, Inc. --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=3DListServer --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer ________________________________ SASKEN BUSINESS DISCLAIMER: This message may contain confidential, proprietary or legally privileged information. In case you are not the original intended Recipient of the message, you must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message and you are requested to delete it and inform the sender. Any views expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by Sasken Communication Technologies Limited ("Sasken") unless sent with that express intent and with due authority of Sasken. Sasken has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. Read Disclaimer at http://www.sasken.com/extras/mail_disclaimer.html --
  Message 8 of 27  
06 Nov 12 01:00
Maxim S. Shatskih
xxxxxx@storagecraft.com
Join Date: 20 Feb 2003
Posts To This List: 9459
Hyper-V Kernel Debugging

There is no speed emulation in Hyper-V's COM port, so, it is very fast (though not infinitely). According to what MS's people told on this forum once, it was designed with WinDbg in mind, if not even _for_ WinDbg. -- Maxim S. Shatskih Windows DDK MVP xxxxx@storagecraft.com http://www.storagecraft.com "Brandon Falk" <xxxxx@brandonfa.lk> wrote in message news:184072@ntdev... I've had issues with VMWare where the emulated hardware emulates the speed as well. I guess I'll test it out to see. Hopefully it's infinitely fast :) -Brandon On Mon, Nov 5, 2012 at 4:02 PM, Tim Roberts <xxxxx@probo.com> wrote: Brandon Falk wrote: > Is it any faster than 115200, or is it just a typical COM debugging > session? You should be able to answer that. It's all virtual. There is no serial hardware involved, so it runs infinitely fast. So to speak. -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc. --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
  Message 9 of 27  
06 Nov 12 08:00
Petr Kurtin
xxxxxx@avast.com
Join Date: 25 Sep 2008
Posts To This List: 76
Hyper-V Kernel Debugging

please read new windbg help topic for Hyper-V role: "Setting Up Network Debugging of a Virtual Machine Host" From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brandon Falk Sent: Monday, November 05, 2012 7:18 PM To: Windows System Software Devs Interest List Subject: [ntdev] Hyper-V Kernel Debugging I've decided to try out Hyper-V this week, and I've heard here and there that Hyper-V allows for really quick kernel debugging. Is this true? How do I go about kernel debugging 'properly' on Hyper-V? -Brandon --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --
  Message 10 of 27  
06 Nov 12 14:49
ntdev member 132136
xxxxxx@brandonfa.lk
Join Date:
Posts To This List: 27
Hyper-V Kernel Debugging

Feels a lot like 115200 to me. Although I'm using a Win XP VM right now. Is there some special configuration besides typical bcdedit/boot.ini settings to add debugging? I'm going to try out a modern Windows 8 vm with network and serial debugging and do some testing. -Brandon On Tue, Nov 6, 2012 at 7:58 AM, Petr Kurtin <xxxxx@avast.com> wrote: > please read new windbg help topic for Hyper-V role: ?Setting Up Network > Debugging of a Virtual Machine Host?**** > > ** ** > > ** ** > > *From:* xxxxx@lists.osr.com [mailto: > xxxxx@lists.osr.com] *On Behalf Of *Brandon Falk > *Sent:* Monday, November 05, 2012 7:18 PM <...excess quoted lines suppressed...> --
  Message 11 of 27  
07 Nov 12 13:34
ntdev member 134003
xxxxxx@microsoft.com
Join Date:
Posts To This List: 155
Hyper-V Kernel Debugging

Petr, I'm pretty sure that Brandon was interested in debugging a guest, not the host. And while it is possible to debug the Hyper-V parent partition using network debugging, it's more interesting for most people to debug the guest. If the guest is Windows 8 or Server 2012, or if you manually copy kdvm.dll from Windows 8 to Windows 7, you can debug the guest as if it were a network debugging target, but without ever putting it on a network. We've added a debugger transport DLL which passes packets to the Hyper-V parent for placement on the network. This requires a little extra setup, and the integration didn't make it all the way into Visual Studio. So if you're comfortable using Windbg or Kd, you can enable another debugging path which is very fast and which doesn't incur the overhead of the emulated serial port for the guest. To set it up in the guest OS, you type, for example: bcdedit /set dbgtransport kdvm.dll bcdedit /set {default} loadoptions host_ip="1.2.3.4",host_port="50000",encryption_key="cl.ea.rt.ext" bcdedit /set debug on The encryption key is up to you, but must be validly formed. The port is a dummy value which is ignored. In the host OS, you tell it which guest(s) you want to enable this for and which ports to use, using the Hyper-V WMI interface. The port is actually used here. (Pick a useful and valid port.) I use a PowerShell script to do this, and it is below. To start windbg or kd.exe in a way that will connect to this, type: windbg -k net:port=50000,target=nameofhostmachinehere,key=cl.ea.rt.ext Note again that this isn't talking to the guest's networking stack. It's talking to the parent OS's networking stack, using the parent OS's name. The guest can be network connected, or not. You can run the debugger itself either in the Parent OS or somewhere else. To the debugger, this is just another network debugging session. - Jake Oshins Windows Hyper-V Team Powershell script begins here: # # Argument initialization # $nextarg = "none" $DebugPort = "unassigned" $targetcomputer = "." $VMName = "" $AutoAssign = "false" $DebugOff = "false" function funHelp() { $helpText=@" DESCRIPTION: NAME: synthdebug.ps1 Displays (and optionally sets) the debugport for synthetic debugging. PARAMETERS: -computerName Specifies the name of the computer upon which to run the script -help prints help file -vmname name of the VM of interest -port (optional) ID of the channel to use for debugging -debugoff -autoassign SYNTAX: synthdebug.ps1 [-computerName targetcomputer] -vmname NameOfVM [-port PortNumber] "@ $helpText exit } foreach ($argument in $args) { # parse commands with no following arguments switch ($argument) { "?" {funHelp} "help" {funHelp} "-help" {funHelp} "/?" {funHelp} "-?" {funHelp} "autoassign" {$AutoAssign = "true"} "-autoassign" {$AutoAssign = "true"} "/autoassign" {$AutoAssign = "true"} "debugoff" {$DebugOff = "true"} "-debugoff" {$DebugOff = "true"} "/debugoff" {$DebugOff = "true"} default {} } # parse values that followed a switch switch ($nextarg) { "vmname" {$VMName = $argument} "-vmname" {$VMName = $argument} "/vmname" {$VMName = $argument} "port" {$DebugPort = $argument} "-port" {$DebugPort = $argument} "/port" {$DebugPort = $argument} "-computername" {$targetcomputer = $argument} default {} } $nextarg = $argument } if ($VMName -eq "") { funHelp } #Get a VMManagementService object $VMManagementService = gwmi -class "Msvm_VirtualSystemManagementService" -namespace "root\virtualization" -computername $targetcomputer #Get the VM object that we want to modify $query = "SELECT * FROM Msvm_ComputerSystem WHERE ElementName='" + $VMName + "'" $VM = gwmi -query $query -namespace "root\virtualization" -computername $targetcomputer #Get the VirtualSystemGlobalSettingData of the VM we want to modify $query = "Associators of {$VM} WHERE AssocClass=MSVM_ElementSettingData ResultClass=Msvm_VirtualSystemGlobalSettingData" $VMSystemGlobalSettingData = gwmi -query $query -namespace "root\virtualization" -computername $targetcomputer # Set a new debugport if ($DebugPort -ne "unassigned") { #Change the ElementName property $VMSystemGlobalSettingData.DebugPort = $DebugPort $VMSystemGlobalSettingData.DebugPortEnabled = 1 #Update the VM with ModifyVirtualSystem $Result = $VMManagementService.ModifyVirtualSystem($VM.__PATH,$VMSystemGlobalSettingData.ps base.GetText(1)) } # Enable auto assigned debug ports if ($AutoAssign -ne "false") { #Change the ElementName property $VMSystemGlobalSettingData.DebugPortEnabled = 2 #Update the VM with ModifyVirtualSystem $Result = $VMManagementService.ModifyVirtualSystem($VM.__PATH,$VMSystemGlobalSettingData.ps base.GetText(1)) } # Turn off debugging if ($DebugOff -ne "false") { #Change the ElementName property $VMSystemGlobalSettingData.DebugPortEnabled = 0 #Update the VM with ModifyVirtualSystem $Result = $VMManagementService.ModifyVirtualSystem($VM.__PATH,$VMSystemGlobalSettingData.ps base.GetText(1)) } $VMSystemGlobalSettingData exit ------------------------------------------------------------------------- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Petr Kurtin Sent: Tuesday, November 6, 2012 4:59 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] Hyper-V Kernel Debugging please read new windbg help topic for Hyper-V role: "Setting Up Network Debugging of a Virtual Machine Host" From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brandon Falk Sent: Monday, November 05, 2012 7:18 PM To: Windows System Software Devs Interest List Subject: [ntdev] Hyper-V Kernel Debugging I've decided to try out Hyper-V this week, and I've heard here and there that Hyper-V allows for really quick kernel debugging. Is this true? How do I go about kernel debugging 'properly' on Hyper-V? -Brandon --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=3DListServer --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
  Message 12 of 27  
16 Nov 12 16:07
ntdev member 132136
xxxxxx@brandonfa.lk
Join Date:
Posts To This List: 27
Hyper-V Kernel Debugging

Thanks a lot Jake! Would it be okay if I made a video of setting this all up and put it on YouTube? I'd be supplying the script you posted. Also, what is a good way to benchmark communication speeds in WinDbg? If there isn't a way, what would be a good way to write an extension/benchmarking script? I feel like it'd be nice to have. -Brandon On Wed, Nov 7, 2012 at 1:30 PM, Jake Oshins <xxxxx@microsoft.com> wrote: > Petr, I'm pretty sure that Brandon was interested in debugging a guest, > not the host. And while it is possible to debug the Hyper-V parent > partition using network debugging, it's more interesting for most people to > debug the guest. > > If the guest is Windows 8 or Server 2012, or if you manually copy kdvm.dll > from Windows 8 to Windows 7, you can debug the guest as if it were a > network debugging target, but without ever putting it on a network. We've > added a debugger transport DLL which passes packets to the Hyper-V parent > for placement on the network. This requires a little extra setup, and the <...excess quoted lines suppressed...> --
  Message 13 of 27  
16 Nov 12 16:19
Jeffrey Tippet [MSFT]
xxxxxx@microsoft.com
Join Date: 29 Mar 2010
Posts To This List: 351
Hyper-V Kernel Debugging

My favorite two benchmarks are: !stacks 2 ndis! !ndiskd.pendingnbls Since these are the two things I do most often :)
  Message 14 of 27  
27 Nov 12 11:57
ntdev member 134003
xxxxxx@microsoft.com
Join Date:
Posts To This List: 155
Hyper-V Kernel Debugging

This is a public forum. I'll never post anything here that you can't repeat. Thanks for asking though, Jake Oshins Microsoft From: Brandon Falk [mailto:xxxxx@brandonfa.lk] Sent: Friday, November 16, 2012 1:07 PM To: Windows System Software Devs Interest List Cc: Jake Oshins Subject: Re: [ntdev] Hyper-V Kernel Debugging Thanks a lot Jake! Would it be okay if I made a video of setting this all up and put it on YouTube? I'd be supplying the script you posted. Also, what is a good way to benchmark communication speeds in WinDbg? If there isn't a way, what would be a good way to write an extension/benchmarking script? I feel like it'd be nice to have. -Brandon On Wed, Nov 7, 2012 at 1:30 PM, Jake Oshins <xxxxx@microsoft.com<mailto:xxxxx@microsoft.com>> wrote: Petr, I'm pretty sure that Brandon was interested in debugging a guest, not the host. And while it is possible to debug the Hyper-V parent partition using network debugging, it's more interesting for most people to debug the guest. If the guest is Windows 8 or Server 2012, or if you manually copy kdvm.dll from Windows 8 to Windows 7, you can debug the guest as if it were a network debugging target, but without ever putting it on a network. We've added a debugger transport DLL which passes packets to the Hyper-V parent for placement on the network. This requires a little extra setup, and the integration didn't make it all the way into Visual Studio. So if you're comfortable using Windbg or Kd, you can enable another debugging path which is very fast and which doesn't incur the overhead of the emulated serial port for the guest. To set it up in the guest OS, you type, for example: bcdedit /set dbgtransport kdvm.dll bcdedit /set {default} loadoptions host_ip="1.2.3.4",host_port="50000",encryption_key="cl.ea.rt.ext" bcdedit /set debug on The encryption key is up to you, but must be validly formed. The port is a dummy value which is ignored. In the host OS, you tell it which guest(s) you want to enable this for and which ports to use, using the Hyper-V WMI interface. The port is actually used here. (Pick a useful and valid port.) I use a PowerShell script to do this, and it is below. To start windbg or kd.exe in a way that will connect to this, type: windbg -k net:port=50000,target=nameofhostmachinehere,key=cl.ea.rt.ext Note again that this isn't talking to the guest's networking stack. It's talking to the parent OS's networking stack, using the parent OS's name. The guest can be network connected, or not. You can run the debugger itself either in the Parent OS or somewhere else. To the debugger, this is just another network debugging session. - Jake Oshins Windows Hyper-V Team Powershell script begins here: # # Argument initialization # $nextarg = "none" $DebugPort = "unassigned" $targetcomputer = "." $VMName = "" $AutoAssign = "false" $DebugOff = "false" function funHelp() { $helpText=@" DESCRIPTION: NAME: synthdebug.ps1 Displays (and optionally sets) the debugport for synthetic debugging. PARAMETERS: -computerName Specifies the name of the computer upon which to run the script -help prints help file -vmname name of the VM of interest -port (optional) ID of the channel to use for debugging -debugoff -autoassign SYNTAX: synthdebug.ps1 [-computerName targetcomputer] -vmname NameOfVM [-port PortNumber] "@ $helpText exit } foreach ($argument in $args) { # parse commands with no following arguments switch ($argument) { "?" {funHelp} "help" {funHelp} "-help" {funHelp} "/?" {funHelp} "-?" {funHelp} "autoassign" {$AutoAssign = "true"} "-autoassign" {$AutoAssign = "true"} "/autoassign" {$AutoAssign = "true"} "debugoff" {$DebugOff = "true"} "-debugoff" {$DebugOff = "true"} "/debugoff" {$DebugOff = "true"} default {} } # parse values that followed a switch switch ($nextarg) { "vmname" {$VMName = $argument} "-vmname" {$VMName = $argument} "/vmname" {$VMName = $argument} "port" {$DebugPort = $argument} "-port" {$DebugPort = $argument} "/port" {$DebugPort = $argument} "-computername" {$targetcomputer = $argument} default {} } $nextarg = $argument } if ($VMName -eq "") { funHelp } #Get a VMManagementService object $VMManagementService = gwmi -class "Msvm_VirtualSystemManagementService" -namespace "root\virtualization" -computername $targetcomputer #Get the VM object that we want to modify $query = "SELECT * FROM Msvm_ComputerSystem WHERE ElementName='" + $VMName + "'" $VM = gwmi -query $query -namespace "root\virtualization" -computername $targetcomputer #Get the VirtualSystemGlobalSettingData of the VM we want to modify $query = "Associators of {$VM} WHERE AssocClass=MSVM_ElementSettingData ResultClass=Msvm_VirtualSystemGlobalSettingData" $VMSystemGlobalSettingData = gwmi -query $query -namespace "root\virtualization" -computername $targetcomputer # Set a new debugport if ($DebugPort -ne "unassigned") { #Change the ElementName property $VMSystemGlobalSettingData.DebugPort = $DebugPort $VMSystemGlobalSettingData.DebugPortEnabled = 1 #Update the VM with ModifyVirtualSystem $Result = $VMManagementService.ModifyVirtualSystem($VM.__PATH,$VMSystemGlobalSettingData.ps base.GetText(1)) } # Enable auto assigned debug ports if ($AutoAssign -ne "false") { #Change the ElementName property $VMSystemGlobalSettingData.DebugPortEnabled = 2 #Update the VM with ModifyVirtualSystem $Result = $VMManagementService.ModifyVirtualSystem($VM.__PATH,$VMSystemGlobalSettingData.ps base.GetText(1)) } # Turn off debugging if ($DebugOff -ne "false") { #Change the ElementName property $VMSystemGlobalSettingData.DebugPortEnabled = 0 #Update the VM with ModifyVirtualSystem $Result = $VMManagementService.ModifyVirtualSystem($VM.__PATH,$VMSystemGlobalSettingData.ps base.GetText(1)) } $VMSystemGlobalSettingData exit ------------------------------------------------------------------------- From: xxxxx@lists.osr.com<mailto:xxxxx@lists.osr.com> [mailto:xxxxx@lists.osr.com<mailto:xxxxx@lists.osr.com>] On Behalf Of Petr Kurtin Sent: Tuesday, November 6, 2012 4:59 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] Hyper-V Kernel Debugging please read new windbg help topic for Hyper-V role: "Setting Up Network Debugging of a Virtual Machine Host" From: xxxxx@lists.osr.com<mailto:xxxxx@lists.osr.com> [mailto:xxxxx@lists.osr.com<mailto:xxxxx@lists.osr.com>] On Behalf Of Brandon Falk Sent: Monday, November 05, 2012 7:18 PM To: Windows System Software Devs Interest List Subject: [ntdev] Hyper-V Kernel Debugging I've decided to try out Hyper-V this week, and I've heard here and there that Hyper-V allows for really quick kernel debugging. Is this true? How do I go about kernel debugging 'properly' on Hyper-V? -Brandon --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=3DListServer --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --
  Message 15 of 27  
26 Dec 12 20:42
ntdev member 134447
xxxxxx@gmail.com
Join Date:
Posts To This List: 6
Hyper-V Kernel Debugging

Am having trouble getting Hyper-V debugging to work after following Jake's setup prescription, all I ever see is "Microsoft (R) Windows Debugger Version 6.2.9200.16384 AMD64 Copyright (c) Microsoft Corporation. All rights reserved. Using NET for debugging Opened WinSock 2.0 Waiting to reconnect." has anyone been successful in getting this to work?
  Message 16 of 27  
28 Dec 12 13:54
Maxim S. Shatskih
xxxxxx@storagecraft.com
Join Date: 20 Feb 2003
Posts To This List: 9459
Hyper-V Kernel Debugging

Use emulated serial port instead of net, it works fine. -- Maxim S. Shatskih Windows DDK MVP xxxxx@storagecraft.com http://www.storagecraft.com <xxxxx@gmail.com> wrote in message news:185767@ntdev... > Am having trouble getting Hyper-V debugging to work after following Jake's setup prescription, all I ever see is > > "Microsoft (R) Windows Debugger Version 6.2.9200.16384 AMD64 > Copyright (c) Microsoft Corporation. All rights reserved. > > Using NET for debugging > Opened WinSock 2.0 > Waiting to reconnect." > > has anyone been successful in getting this to work? <...excess quoted lines suppressed...>
  Message 17 of 27  
28 Dec 12 17:59
ntdev member 134447
xxxxxx@gmail.com
Join Date:
Posts To This List: 6
Hyper-V Kernel Debugging

I got it working and it is much faster than serial port debugging. On Fri, Dec 28, 2012 at 10:54 AM, Maxim S. Shatskih <xxxxx@storagecraft.com>wrote: > Use emulated serial port instead of net, it works fine. > > -- > Maxim S. Shatskih > Windows DDK MVP > xxxxx@storagecraft.com > http://www.storagecraft.com > > <xxxxx@gmail.com> wrote in message news:185767@ntdev... > > Am having trouble getting Hyper-V debugging to work after following <...excess quoted lines suppressed...> --
  Message 18 of 27  
29 Dec 12 00:00
raj r
xxxxxx@gmail.com
Join Date: 20 Jul 2006
Posts To This List: 279
Hyper-V Kernel Debugging

On 12/29/12, Joseph Parness <xxxxx@gmail.com> wrote: > I got it working and it is much faster than serial port debugging. may we know why it wasn't working in the first place whose wand you got to make your spell what was the spell and what other Aramaic words did you uncover that "did what was said"
  Message 19 of 27  
29 Dec 12 01:27
ntdev member 134447
xxxxxx@gmail.com
Join Date:
Posts To This List: 6
Hyper-V Kernel Debugging

If people are interested I'll be happy to post what I learned. On Dec 28, 2012, at 9:00 PM, raj_r <xxxxx@gmail.com> wrote: > On 12/29/12, Joseph Parness <xxxxx@gmail.com> wrote: >> I got it working and it is much faster than serial port debugging. > > may we know why it wasn't working in the first place > > whose wand you got to make your spell > > what was the spell > > and what other Aramaic words did you uncover that "did what was said" <...excess quoted lines suppressed...>
  Message 20 of 27  
29 Dec 12 08:23
Maxim S. Shatskih
xxxxxx@storagecraft.com
Join Date: 20 Feb 2003
Posts To This List: 9459
Hyper-V Kernel Debugging

>I got it working and it is much faster than serial port debugging. Then _emulated_ serial port? it is amazingly fast. -- Maxim S. Shatskih Windows DDK MVP xxxxx@storagecraft.com http://www.storagecraft.com
  Message 21 of 27  
29 Dec 12 13:54
ntdev member 134447
xxxxxx@gmail.com
Join Date:
Posts To This List: 6
Hyper-V Kernel Debugging

From what I can tell there is no serial port emulation involved. I appears that the guys on the Hyper-V team installed hooks to allow for network emulation of some kind in conjunction with WMI, from what I have seen the speed is more like 1394 or faster. On Dec 29, 2012, at 5:22 AM, Maxim S. Shatskih <xxxxx@storagecraft.com> wrote: >> I got it working and it is much faster than serial port debugging. > > Then _emulated_ serial port? it is amazingly fast. > > -- > Maxim S. Shatskih > Windows DDK MVP > xxxxx@storagecraft.com > http://www.storagecraft.com > <...excess quoted lines suppressed...>
  Message 22 of 27  
29 Dec 12 13:59
Ken Johnson
xxxxxx@valhallalegends.com
Join Date: 24 Jul 2008
Posts To This List: 1000
Hyper-V Kernel Debugging

The emulated serial port transport is not particularly fast. All of the other transports are significantly higher performance, including in Hyper-V. - S (Msft) ________________________________ From: Maxim S. Shatskih<mailto:xxxxx@storagecraft.com> Sent: ?12/?29/?2012 5:23 To: Windows System Software Devs Interest List<mailto:xxxxx@lists.osr.com> Subject: Re:[ntdev] Hyper-V Kernel Debugging >I got it working and it is much faster than serial port debugging. Then _emulated_ serial port? it is amazingly fast. -- Maxim S. Shatskih Windows DDK MVP xxxxx@storagecraft.com http://www.storagecraft.com --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --
  Message 23 of 27  
17 Jan 13 02:54
Kirill
xxxxxx@gmail.com
Join Date: 21 Sep 2011
Posts To This List: 4
Hyper-V Kernel Debugging

Hi All. Jake Oshins, on what version of Hyper-V Server works yours script? I tried it on Hyper-V Server 2008 R2, but has no luck. D:\synthdebug.ps1:96 symbol:32 + $VMSystemGlobalSettingData. <<<< DebugPort = $DebugPort + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyAssignmentException Thanks.
  Message 24 of 27  
17 Jan 13 04:28
Ken Johnson
xxxxxx@valhallalegends.com
Join Date: 24 Jul 2008
Posts To This List: 1000
Hyper-V Kernel Debugging

New to Win8/WS2012. - S (Msft) ________________________________ From: xxxxx@gmail.com<mailto:xxxxx@gmail.com> Sent: ?1/?16/?2013 23:55 To: Windows System Software Devs Interest List<mailto:xxxxx@lists.osr.com> Subject: RE:[ntdev] Hyper-V Kernel Debugging Hi All. Jake Oshins, on what version of Hyper-V Server works yours script? I tried it on Hyper-V Server 2008 R2, but has no luck. D:\synthdebug.ps1:96 symbol:32 + $VMSystemGlobalSettingData. <<<< DebugPort = $DebugPort + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyAssignmentException Thanks. --- NTDEV is sponsored by OSR OSR is HIRING!! See http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --
  Message 25 of 27  
17 Jan 13 06:00
Kirill
xxxxxx@gmail.com
Join Date: 21 Sep 2011
Posts To This List: 4
Hyper-V Kernel Debugging

That means that i can't use net debug thru Hyper-V feature because I am not able to set ports to use, using Hyper-V WMI interface? Or not?
  Message 26 of 27  
17 Jan 13 12:52
ntdev member 134003
xxxxxx@microsoft.com
Join Date:
Posts To This List: 155
Hyper-V Kernel Debugging

Server 2012. - Jake -----Original Message----- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com Sent: Wednesday, January 16, 2013 11:59 PM To: Windows System Software Devs Interest List Subject: RE:[ntdev] Hyper-V Kernel Debugging Hi All. Jake Oshins, on what version of Hyper-V Server works yours script? I tried it on Hyper-V Server 2008 R2, but has no luck. D:\synthdebug.ps1:96 symbol:32 + $VMSystemGlobalSettingData. <<<< DebugPort = $DebugPort + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId : PropertyAssignmentException Thanks. --- NTDEV is sponsored by OSR OSR is HIRING!! See http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
  Message 27 of 27  
17 Jan 13 13:28
Ken Johnson
xxxxxx@valhallalegends.com
Join Date: 24 Jul 2008
Posts To This List: 1000
Hyper-V Kernel Debugging

Not if you are using a host older than when the network debugging feature was invented, no. - S (Msft) ________________________________ From: xxxxx@gmail.com<mailto:xxxxx@gmail.com> Sent: ?1/?17/?2013 3:01 To: Windows System Software Devs Interest List<mailto:xxxxx@lists.osr.com> Subject: RE:[ntdev] Hyper-V Kernel Debugging That means that i can't use net debug thru Hyper-V feature because I am not able to set ports to use, using Hyper-V WMI interface? Or not? --- NTDEV is sponsored by OSR OSR is HIRING!! See http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 01:47.


Copyright ©2014, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license