I'm currently looking into kernel driver development and have set up a Win7 Virtual Machine in VMware Workstation (Vmware academic program is great :)) and now I want to connect the Visual Studio Debugger to the VM via a virtual Serial Port Named Pipe.
Using VMware Serial Printer on VMware expect to go to real serial port or file or named pipe on HOST. Now, if I could easily figure out a way to take named pipe to USB printer queue? Or any other suggestions. Select Serial Port, then click Next. Select Use named pipe. Use the default pipe name, or enter another pipe name of your choice. The pipe name must follow the form. Pipe - that is, it must begin with. Select This end is the server or This end is the client.
In the VMware Machine Settings dialog box, click Add. In the Add Hardware Wizard dialog box, select Serial Port and click Next. On next page, select Output to named pipe and click Next. Set Name pipe to. Pipe BriolidzDbgPipe. Make sure you select This end is the server and The other end is virtual machine.
The instructions on MSDN:http://msdn.microsoft.com/en-us/library/windows/hardware/jj200334%28v=vs.85%29.aspx
right that seems pretty easy!I have created a virtual serial port on my VM named .pipekerneldebug and configured it properly. However this named pipe has no link to any COM port, i.e. 1-5, so what do I put in for n in:bcdedit /dbgsettings serial debugport: n baudrate: 115200
I couldn't find a way to map the named pipe to the port as required in the MSDN instructions.
Any help would be much appreciated!
Regards
manuell1 Answer
eventually got the solution by trial and error...
When the Debugger looks for the Pipe, it is looking on the local (debugging) machine, not the VM. This pipe maps COM1 of the VM to a named pipe on the local machine.
So in my example I would configure the Target Machine in Visual Studio as follows:
- Manually configure debugger and do not provision
- Connection Type: Serial
- Baud: 115200
- Pipe: checked
- Reconnect: checked
- Pipe name: .pipekerneldebug
- Target Port: COM1
After setting this up
XaserXaserNot the answer you're looking for? Browse other questions tagged virtual-machineremote-debuggingnamed-pipes or ask your own question.
You can add up to four serial (COM) ports to a virtual machine. Virtual serial ports can output to physical serial ports, files, or named pipes.
You might want to add a virtual serial port to a virtual machine to make devices such as modems and printers available to the virtual machine. You can also use virtual ports to send debugging data from a virtual machine to the host system or to another virtual machine
Note |
---|
The virtual printer feature configures a serial port to make host printers available to the guest. You do not need to install additional drivers in the virtual machine. |
Prerequisites
Power off the virtual machine.
Procedure
Vmware Serial Port Named Pipe
1 Select the virtual machine and select Virtual Machine > Virtual Machine Settings.
2 On the Hardware tab, click Add.
3 In the Add Hardware wizard, select Serial Port.
4 Select where the virtual serial parallel port sends output.
Option | Description |
---|---|
Use a physical parallel port | Send output to a physical serial port on the host system. |
Use output file | Send output to a file on the host system. Either locate an existing output file or browse to a directory and type a filename to create a new output file. |
Output to named pipe | Set up a direct connection between two virtual machines, or a connection between a virtual machine and an application on the host system. |
5 If you selected Output to named pipe, configure the named pipe.
a (Windows host) Use the default pipe name, or type another pipe name.
The pipe name must begin with .pipe and must be the same on both the server and the client.
Vmware Player Serial Port Named Pipe Fittings
For example: .pipenamedpipe
b (Linux host) Type /tmp/socket or another UNIX socket name in the first text box.
The pipe name must be the same on both the server and the client.
c To send debugging information to an application on the host system, select This end is the server from the first drop-down menu and select The other end is an application from the second dropdown menu.
d To send debugging information to another virtual machine, select This end is the server from the first drop-down menu and The other end is a virtual machine from the second drop-down menu.
6 To connect the port to the virtual machine when the virtual machine powers on, select Connect at power on.
7 Click Finish to add the virtual serial port to the virtual machine.
8 (Optional) On the Hardware tab, select the new serial port, select Yield CPU on poll, and click OK.
This option is useful if you are using debugging tools that communicate over a serial connection. If the serial port in the guest operating system is being used in polled mode rather than interrupt mode, you might notice performance issues. This option forces the virtual machine to yield processor time if the only task it is trying to do is poll the virtual serial port.
What to do next
Vmware Player Serial Port Named Piper
If you set up a connection between two virtual machines, the first virtual machine is set up as the server. Repeat this procedure for the second virtual machine, but set it up as the client by selecting This end is the client when you configure the named pipe.