From Fedora Project Wiki

(Copy Troubleshooting section from virt quickstart to this new page)
(Redirect to How_to_debug_Virtualization_problems)
Line 1: Line 1:
== Troubleshooting virtualization ==
#REDIRECT [[How_to_debug_Virtualization_problems]]
=== SELinux ===
The SELinux policy in Fedora has the necessary rules to allow the use of virtualization. The main caveat to be aware of is that any file backed disk images need to be in the directory {{filename|/var/lib/libvirt/images}}.  This applies both to regular disk images, and ISO images.  Block device backed disks are already labelled correctly to allow them to pass SELinux checks.
Beginning with [[Releases/11|Fedora 11]], virtual machines under SELinux are isolated from each other with [[Features/SVirt_Mandatory_Access_Control|sVirt]].
=== Log files ===
The graphical interface, <code>virt-manager</code>, used to  create and manage
virtual machines, logs to {{filename|$HOME/.virt-manager/virt-manager.log}}.
The <code>virt-install</code> tool, used to create virtual machines, logs to {{filename|$HOME/.virtinst/virt-install.log}}
Logging from <code>virt-manager</code> and <code>virt-install</code> may be increased by setting the environment variable <code>LIBVIRT_DEBUG=1</code>.
All QEMU command lines executed by <code>libvirt</code> are logged to {{filename|/var/log/libvirt/qemu/$DOMAIN.log}} where <code>$DOMAIN</code> is the name of the guest.
The <code>libvirtd</code> daemon is responsible for handling connections from
tools such as <code>virsh</code> and <code>virt-manager</code>.
The level and type of logging produced by <code>libvirtd</code>
may be modified in {{filename|/etc/libvirt/libvirtd.conf}}.
=== Serial console access for troubleshooting and management ===
Serial console access is useful for debugging kernel crashes and remote management can be very helpful.
Fully-virtualized guest OS will automatically have a serial console configured, but the guest kernel will not be configured to use this out of the box. To enable the guest console in a Linux fully-virt guest, edit the /etc/grub.conf in the guest and add 'console=ttyS0 console=tty0'. This ensures that all kernel messages get sent to the serial console, and the regular graphical console. The serial console can then be access in same way as paravirt guests:
su -c "virsh console &lt;domain name&gt;"
Alternatively, the graphical <code>virt-manager</code> program can display the serial console. Simply display the 'console' or 'details' window for the guest & select 'View -> Serial console' from the menu bar.
=== Graphical console access ===
In order to get a graphical console on your guest you can either use 'virt-manager' and select the console icon for the guest, or you can use the 'virt-viewer' tool to just directly connect to the console:
virt-viewer guestname
=== Accessing data on guest disk images ===
{{Admon/caution | Remember never to do this while the guest is up and running, as it could corrupt the filesystem}}
The 'guestfish' package allows you to use a simple shell interface to manipulate guest disk images without needing to run the guest.
su -c 'yum install guestfish'
See 'man guestfish' and [ guestfish recipes] for information and some common recipes.
guestfish can also be scripted to change a group of guest disk images in a row.
=== Getting help ===
If the Troubleshooting section above does not help you to solve your problem, check the
list of existing [[Virtualization bugs|virtualization bugs]], and search the archives of the mailing lists in the resources section. If you believe your problem is a previously undiscovered bug, please [[How to debug Virtualization problems|report it]] to Bugzilla.
==== Resources ====
===== Mailing lists =====
* General virtualization discussion including [ KVM] and [ QEMU]
:  Fedora [ <code>virt</code>] mailing list
* [ Xen] discussion
: Fedora [ <code>xen</code>] mailing list
:  Xensource [ <code>xen-users</code>] mailing list
* [ Virtual Machine Manager], <code>virt-inst</code> and related tools
: Red Hat [ <code>virt-tools-list</code>] mailing list
* [ Libvirt] discussion
: Red Hat [ <code>libvir-list</code>] mailing list
===== IRC Channels =====
* Some support for libvirt can be found in the #fedora channel on
* More specific libvirt support can be found in #virt on
===== Documentation =====
The Virtulization guide can be found at
=== References ===
Previous Fedora Virtualization Guides:
[[Docs/Fedora7VirtQuickStart|  Fedora7VirtQuickStart]]
[[Docs/Fedora8VirtQuickStart|  Fedora8VirtQuickStart]]

Latest revision as of 19:54, 12 July 2010