commit bd6d803406b9d525560718b58123cd718758ea04 Author: W. David Ashley w.david.ashley@gmail.com Date: Wed Jul 15 10:47:42 2015 -0500
Domains chapter Configuration section - finished this section - added example 41
en-US/Guest_Domains.xml | 61 ++++++---------------------------- en-US/extras/Domains-Example-41.xml | 8 ++++ 2 files changed, 19 insertions(+), 50 deletions(-) --- diff --git a/en-US/Guest_Domains.xml b/en-US/Guest_Domains.xml index 8152f1d..5395e64 100644 --- a/en-US/Guest_Domains.xml +++ b/en-US/Guest_Domains.xml @@ -1015,10 +1015,6 @@ <programlisting language="Python"><xi:include href="extras/Domains-Example-39.py" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting> </example>
- <para> - TBD - </para> - </section>
<section id="libvirt_application_development_guide_using_python-Guest_Domains-Device_Config-Networking"> @@ -1034,15 +1030,6 @@
</section>
- <section id="libvirt_application_development_guide_using_python-Guest_Domains-Device_Config-Filesystems"> - <title>Filesystems</title> - - <para> - TBD - </para> - - </section> - <section id="libvirt_application_development_guide_using_python-Guest_Domains-Device_Config-Mice"> <title>Mice, Keyboard & Tablets</title>
@@ -1066,12 +1053,15 @@ driver capabilities from the host OS. </para> <important> - USB devices are only inherited by the guest domain at boot time. USB - devices can not be inherited from the host after the guest domain has booted. + <title>Important</title> + <para> + USB devices are only inherited by the guest domain at boot time. newly activated USB + devices can not be inherited from the host after the guest domain has booted. + </para> </important>
<para> - Some caveats apply when using USB device passthrough. When a PCI device is + Some caveats apply when using USB device passthrough. When a USB device is directly assigned to a guest, migration will not be possible, without first hot-unplugging the device from the guest. In addition libvirt does not guarantee that direct device assignment is secure, leaving @@ -1128,29 +1118,8 @@ by manually detaching the device and then attempting to perform the reset operation. If this succeeds, then it will be possible to assign the device to a guest on its own. If it fails, then it will be necessary - to co-assign the device will others on the same PCI bus. The section - documenting node device APIs covers this topic in detail, but as a - quick demonstration the following code checks whether a PCI device - (represented by a virNodeDevicePtr object instance) can be reset and - is thus assignable to a guest + to co-assign the device will others on the same PCI bus. </para> - <programlisting> - <![CDATA[ - virNodeDevicePtr dev = ....get virNodeDevicePtr for the PCI device... - - if (virNodeDeviceDettach(dev) < 0) { - fprintf(stderr, "Device cannot be dettached from the host OS drivers\n"); - return; - } - - if (virNodeDeviceReset(dev) < 0) { - fprintf(stderr, "Device cannot be safely reset without affecting other devices\n"); - return; - } - - fprintf(stderr, "Device is suitable for passthrough to a guest\n"); - ]]> - </programlisting>
<para> A PCI device is attached to a guest using the 'hostdevice' element. @@ -1163,18 +1132,10 @@ This is easiest to see with a short example </para>
- <programlisting> - <![CDATA[ - <hostdev mode='subsystem' type='pci' managed='yes'> - <source> - <address domain='0x0000' - bus='0x06' - slot='0x12' - function='0x5'/> - </source> - </hostdev> - ]]> - </programlisting> + <example> + <title>Get domain's input device information</title> + <programlisting language="XML"><xi:include href="extras/Domains-Example-41.xml" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting> + </example>
</section>
diff --git a/en-US/extras/Domains-Example-41.xml b/en-US/extras/Domains-Example-41.xml new file mode 100644 index 0000000..7822b7a --- /dev/null +++ b/en-US/extras/Domains-Example-41.xml @@ -0,0 +1,8 @@ +<hostdev mode='subsystem' type='pci' managed='yes'> + <source> + <address domain='0x0000' + bus='0x06' + slot='0x12' + function='0x5'/> + </source> +</hostdev>
docs-commits@lists.fedoraproject.org