18.3. SPICE Log Files

SPICE log files are useful when troubleshooting SPICE connection issues. To start SPICE debugging, change the log level to debugging. Then, identify the log location.
Both the clients used to access the guest machines and the guest machines themselves have SPICE log files. For client side logs, if a SPICE client was launched using a browser plug-in, debugging is generally controlled by environment variables. If a SPICE client is launched using the native client, for which a console.vv file is downloaded, use the remote-viewer command to enable debugging and generate log output.

18.3.1. SPICE Logs for Hypervisor SPICE Servers

Table 18.3. SPICE Logs for Hypervisor SPICE Servers

Log Type Log Location To Change Log Level:
Host/Hypervisor SPICE Server
/var/log/libvirt/qemu/(guest_name).log
Run export SPICE_DEBUG_LEVEL=5 on the host/hypervisor prior to launching the guest.

18.3.2. SPICE Logs for Guest Machines

Table 18.4. SPICE Logs for Guest Machines

Log Type Log Location To Change Log Level:
Windows Guest
C:\Windows\Temp\vdagent.log
C:\Windows\Temp\vdservice.log
Not applicable
Red Hat Enterprise Linux Guest
/var/log/spice-vdagent.log
Create a /etc/sysconfig/spice-vdagentd file with this entry: SPICE_VDAGENTD_EXTRA_ARGS=”-d -d”

18.3.3. SPICE Logs for SPICE Clients Launched Using Browser Plug-ins

For SPICE client launched using browser plug-ins, the log location and change log level instructions are different depending on the OS type, OS version, and system type.

Table 18.5. SPICE Logs for Client Machines (Browser Plug-ins)

Log Type Log Location To Change Log Level:
SPICE Client (Windows 7)
C:\Windows\Temp\spicex.log
  1. Click the Computer main menu item, and select Computer.
  2. Click System properties, and select Advanced system settings.
  3. Select Advanced, and click Environment Variables.
  4. Find the User or System variables, and add a New variable called SPICEX_DEBUG_LEVEL with a value of 4.
SPICE Client (Red Hat Enterprise Linux 6)
~/home/.spicec/spice-xpi.log
Edit the /etc/spice/logger.ini file and change the log4j.rootCategory variable from INFO, R to DEBUG, R.
SPICE Client (Red Hat Enterprise Linux 7)
~/.xsession-errors
Launch Firefox from the command line with debug options: G_MESSAGES_DEBUG=all SPICE_DEBUG=1 firefox.
Touch the ~/.xsession-errors file.
USB Redirector on Windows Client
C:\Windows\Temp\usbclerk.log
Not applicable.

18.3.4. SPICE Logs for SPICE Clients Launched Using console.vv Files

For Linux client machines:

  1. Enable SPICE debugging by running the remote-viewer command with the --spice-debug option. When prompted, enter the connection URL, for example, spice://[virtual_machine_IP]:[port].
    #  remote-viewer --spice-debug
    
  2. To view logs, download the console.vv file and run the remote-viewer command with the --spice-debug option and specify the full path to the console.vv file.
    # remote-viewer --spice-debug /path/to/console.vv
For Windows client machines:

  1. Download the debug-helper.exe file and move it to the same directory as the remote-viewer.exe file. For example, the C:\Users\[user name]\AppData\Local\virt-viewer\bin directory.
  2. Execute the debug-helper.exe file to install the GNU Debugger (GDB).
  3. Enable SPICE debugging by executing the debug-helper.exe file.
    debug-helper.exe remote-viewer.exe --spice-controller
    
  4. To view logs, connect to the virtual machine, and you will see a command prompt running GDB that prints standard output and standard error of remote-viewer.