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>.
 
See http://libvirt.org/logging.html
 
 
 
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:
 
 
 
<pre>
 
su -c "virsh console &lt;domain name&gt;"
 
</pre>
 
 
 
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:
 
 
 
<pre>
 
virt-viewer guestname
 
</pre>
 
 
 
=== 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.
 
 
 
<pre>
 
su -c 'yum install guestfish'
 
</pre>
 
 
 
See 'man guestfish' and [http://libguestfs.org/recipes.html 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 [http://www.linux-kvm.org/page/Main_Page KVM] and [http://www.nongnu.org/qemu/ QEMU]
 
:  Fedora [http://lists.fedoraproject.org/mailman/listinfo/virt <code>virt</code>] mailing list
 
 
 
* [http://www.xen.org/ Xen] discussion
 
: Fedora [http://lists.fedoraproject.org/mailman/listinfo/xen <code>xen</code>] mailing list
 
:  Xensource [http://lists.xensource.com/mailman/listinfo/xen-users <code>xen-users</code>] mailing list
 
 
 
* [http://www.virt-manager.org/ Virtual Machine Manager], <code>virt-inst</code> and related tools
 
: Red Hat [http://www.redhat.com/mailman/listinfo/virt-tools-list <code>virt-tools-list</code>] mailing list
 
 
 
* [http://www.libvirt.org Libvirt] discussion
 
: Red Hat [http://www.redhat.com/mailman/listinfo/libvir-list <code>libvir-list</code>] mailing list
 
 
 
===== IRC Channels =====
 
 
 
* Some support for libvirt can be found in the #fedora channel on irc.freenode.net
 
 
 
* More specific libvirt support can be found in #virt on irc.oftc.net.
 
 
 
===== Documentation =====
 
 
 
The Virtulization guide can be found at https://fedorahosted.org/Virtualization_Guide/
 
 
 
=== References ===
 
 
 
* http://www-128.ibm.com/developerworks/linux/library/l-linux-kvm/?ca=dgr-lnxw07LinuxKVM
 
* http://kerneltrap.org/node/8088
 
 
 
Previous Fedora Virtualization Guides:
 
 
 
[[Docs/Fedora7VirtQuickStart|  Fedora7VirtQuickStart]]
 
[[Docs/Fedora8VirtQuickStart|  Fedora8VirtQuickStart]]
 
 
 
[[Category:Documentation]]
 
[[Category:Virtualization]]
 

Latest revision as of 19:54, 12 July 2010