(ReactOS Wiki) VirtualBox - Getting debug output
Translations of this material:
- into Russian: (ReactOS Wiki) VirtualBox. Translation complete.
-
Submitted for translation by evilslon 10.03.2010
Published 2 years, 2 months ago.
Text
[http://www.virtualbox.org/ VirtualBox] is a virtual machine for x86 architecture developed by Innotek and maintained by Sun Microsystems. There are two versions: the full VirtualBox package with a proprietary license and the VirtualBox Open Source Edition (GPL).
It's easier to configure than [[QEMU]] and slightly slower than [[VMware]].
The best results tend to be obtained by configuring the ReactOS virtual machine using the "Windows/Windows NT4" or "Other/Other" template.
== Getting debug output ==
=== Redirect to virtual serial port (com0com, Windows host) ===
This is the recommended method on Windows host, due to problems with pipes.
# Download and install [http://sourceforge.net/project/showfiles.php?group_id=129551 com0com] virtual comport redirector. See [[com0com]] tutorial for more info.
# Setup a serial port in VirtualBox. Choose Port Mode = "Host Device", Port Path: "\\.\CNCA0" if you use the default or maybe something like "\\.\COM5" if you have renamed your ports.
# Start your favorite serial terminal (e.g. HyperTerminal, PuTTY), set it to the other serial port, set speed to 115200 and connect at any time.
# Start ReactOS in VirtualBox and watch the log.
=== Redirect to named pipe (Windows host) ===
VirtualBox, like any other application that needs to access named pipes in Windows Vista, must be elevated to Administrator. Sadly, the VirtualBox serial-to-pipe implementation seems to be a little buggy resulting in missing characters in the debug log. To avoid this problem, use the virtual COM ports.
==== Using PuTTY ====
On VirtualBox serial menu set up the following: Port mode to ''Host Pipe'', tick the ''Create Pipe'' option, and type the named pipe path, for example:
\\.\pipe\ros_pipe
Run PuTTY. On Windows Vista it must be elevated to Admin, as anything that is to use named pipes. Select the serial as connection type, set speed to 115200 baud and put the named pipe path as serial line. Instead of "ros_pipe", you can use any unique name, only mind to follow the <tt>\\.\pipe\[pipe_name]</tt> scheme.
Start virtual machine first, then open the PuTTY session. When you shut down the virtual machine, PuTTY will change to inactive state and display error message, but when you restart the virtual machine, you can easily reconnect that session by pressing right mouse button on window top bar and selecting ''Restart session''.
==== Using VMwareGateway ====
You need to download the [http://l4ka.org/tools/vmwaregateway.php VMwareGateway] application ([http://opendn.org/reactos/x64/vmwaregateway.exe VMwareGateway x64 Edition]). Start it with <tt>/r</tt> option to make it run as a service (in Windows Vista you have to use an elevated CMD for this). Next you need to start the service, using SC command:
sc start vmwaregateway
Sort out any firewall pop-up if applicable. Finally, use your favorite telnet client to connect to ''localhost'' on port 567.
To configure your virtual machine, set it to ''Host Pipe'' with the following pipe address:
\\.\pipe\vmwaredebug
Make sure you do not mark the ''Create Pipe'' box. VMwareGateway has already created it.
Debug output should appear in your telnet client ([http://opendn.org/reactos/x86/puttytel.exe PuttyTel (x86)], [http://opendn.org/reactos/x64/puttytel.exe PuttyTel (x64)]).
=== Redirect to console (Linux host) ===
==== Using socat ====
If you just simply want a display of the debug output in a terminal window, '''socat''' works nicely.
The usage is very simple:
socat unix-client:pipe_path stdout
You could also do this:
socat unix-client:pipe_path stdio
Substitute "pipe_path" with the path of the pipe you created using VirtualBox.
If ReactOS crashes, you should still be able to type in the VirtualBox window - e.g. within a debug session. You'll see the input and output on the console window which socat is running in.
==== Using minicom ====
This guide is based on the terminal application minicom. First install it by typing:
sudo apt-get install minicom
Then you will have to configure a pipe. Type <tt>Ctrl+A</tt>, then <tt>O</tt>. Select Configure serial ports, and name the device <tt>unix#pipe_path</tt> where "pipe_path" is a file like <tt>/tmp/vboxlog</tt> which will be used as pipe between the virtual machine and minicom.
Create the new Virtual Machine in VirtualBox, then go to the Serial Ports configuration. Select Host pipe, type the "pipe_path" and select Create Pipe.
Make sure that pipe_path is exactly the same on both minicom and VirtualBox.
=== Redirect to file (Linux host) ===
When running minicom, type <tt>Ctrl-A</tt> then <tt>L</tt>. Type the name of the capture file.
=== Serial port output using com0com ===
Install and configure com0com according to the [[com0com|com0com guide]].
Enable the first serial port for your ReactOS machine. Use port number "COM1", mode "host device" and port path "COM4" or whatever virtual port you created first with com0com.
Connect your terminal application to your second virtual port and start up VirtualBox.
== Installing Guest Additions ==
Mount the CD in the CD-Drive and open the file VBoxWindowsAdditions.exe and follow the setup instructions.
== Setting up audio ==
ReactOS has had limited support for sound since the 0.3.9 release, but it is recommended to test sound with a [http://www.reactos.org/getbuilds trunk build].
In VirtualBox Machine Settings, enable audio and set the following:
* Host Audio Driver: Windows DirectSound
* Audio Controller: ICH AC97
After installing ReactOS:
# Download the Intel AC 97 driver from ReactOS Application Manager
# Extract the files to <tt>C:\ReactOS\</tt>
# Restart the virtual machine
# Install and start your favorite audio playback or multimedia application (e.g. Winamp, VLC, MPlayer)
# Open an audio file and play
=== Known Issues ===
* The AC97 Driver only supports PCM Wave Audio in the range 8000-44.100Khz, 16Bit Samples and 2 Channels
* Sample rate conversion is not yet supported
* The driver has issues when changing the sample rate of the audio stream
[[Category:Tutorial]]
[[Category:Virtualization software]]
© ReactOS Team. License: FDL
