drvqemu.html.in 4.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
<html>
  <body>
    <h1>QEMU/KVM hypervisor driver</h1>

    <p>
      The libvirt QEMU driver can manage any QEMU emulator from version 0.8.1
      or later. It can also manage anything that provides the same QEMU command
      line syntax and monitor interaction. This includes KVM, and Xenner.
    </p>

    <h2>Deployment pre-requisites</h2>

    <ul>
      <li>
	<strong>QEMU emulators</strong>: The driver will probe <code>/usr/bin</code>
	for the presence of <code>qemu</code>, <code>qemu-system-x86_64</code>,
	<code>qemu-system-mips</code>,<code>qemu-system-mipsel</code>,
	<code>qemu-system-sparc</code>,<code>qemu-system-ppc</code>. The results
	of this can be seen from the capabilities XML output.
      </li>
      <li>
	<strong>KVM hypervisor</strong>: The driver will probe <code>/usr/bin</code>
	for the presence of <code>qemu-kvm</code> and <code>/dev/kvm</code> device
	node. If both are found, then KVM fullyvirtualized, hardware accelerated
	guests will be available.
      </li>
      <li>
	<strong>Xenner hypervisor</strong>: The driver will probe <code>/usr/bin</code>
	for the presence of <code>xenner</code> and <code>/dev/kvm</code> device
	node. If both are found, then Xen paravirtualized guests can be run using
	the KVM hardware acceleration.
      </li>
    </ul>

35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
    <h2>Connections to QEMU driver</h2>

    <p>
    The libvirt QEMU driver is a multi-instance driver, providing a single
    system wide privileged driver (the "system" instance), and per-user
    unprivileged drivers (the "session" instance). The of the driver protocol
    is "qemu". Some example conection URIs for the libvirt driver are:
    </p>

    <pre>
    qemu:///session                      (local access to per-user instance)
    qemu+unix:///session                 (local access to per-user instance)

    qemu:///system                       (local access to system instance)
    qemu+unix:///system                  (local access to system instance)
    qemu://example.com/system            (remote access, TLS/x509)
    qemu+tcp://example.com/system        (remote access, SASl/Kerberos)
    qemu+ssh://root@example.com/system   (remote access, SSH tunnelled)
    </pre>

55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
    <h2><a name="xmlconfig">Example domain XML config</a></h2>

    <h3>QEMU emulated guest on x86_64</h3>

        <pre>&lt;domain type='qemu'&gt;
  &lt;name&gt;QEmu-fedora-i686&lt;/name&gt;
  &lt;uuid&gt;c7a5fdbd-cdaf-9455-926a-d65c16db1809&lt;/uuid&gt;
  &lt;memory&gt;219200&lt;/memory&gt;
  &lt;currentMemory&gt;219200&lt;/currentMemory&gt;
  &lt;vcpu&gt;2&lt;/vcpu&gt;
  &lt;os&gt;
    &lt;type arch='i686' machine='pc'&gt;hvm&lt;/type&gt;
    &lt;boot dev='cdrom'/&gt;
  &lt;/os&gt;
  &lt;devices&gt;
    &lt;emulator&gt;/usr/bin/qemu-system-x86_64&lt;/emulator&gt;
    &lt;disk type='file' device='cdrom'&gt;
      &lt;source file='/home/user/boot.iso'/&gt;
      &lt;target dev='hdc'/&gt;
      &lt;readonly/&gt;
    &lt;/disk&gt;
    &lt;disk type='file' device='disk'&gt;
      &lt;source file='/home/user/fedora.img'/&gt;
      &lt;target dev='hda'/&gt;
    &lt;/disk&gt;
    &lt;interface type='network'&gt;
81
      &lt;source network='default'/&gt;
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
    &lt;/interface&gt;
    &lt;graphics type='vnc' port='-1'/&gt;
  &lt;/devices&gt;
&lt;/domain&gt;</pre>

    <h3>KVM hardware accelerated guest on i686</h3>

        <pre>&lt;domain type='kvm'&gt;
  &lt;name&gt;demo2&lt;/name&gt;
  &lt;uuid&gt;4dea24b3-1d52-d8f3-2516-782e98a23fa0&lt;/uuid&gt;
  &lt;memory&gt;131072&lt;/memory&gt;
  &lt;vcpu&gt;1&lt;/vcpu&gt;
  &lt;os&gt;
    &lt;type arch="i686"&gt;hvm&lt;/type&gt;
  &lt;/os&gt;
  &lt;clock sync="localtime"/&gt;
  &lt;devices&gt;
    &lt;emulator&gt;/usr/bin/qemu-kvm&lt;/emulator&gt;
    &lt;disk type='file' device='disk'&gt;
      &lt;source file='/var/lib/libvirt/images/demo2.img'/&gt;
      &lt;target dev='hda'/&gt;
    &lt;/disk&gt;
    &lt;interface type='network'&gt;
      &lt;source network='default'/&gt;
      &lt;mac address='24:42:53:21:52:45'/&gt;
    &lt;/interface&gt;
G
Guido Günther 已提交
108
    &lt;graphics type='vnc' port='-1' keymap='de'/&gt;
109 110 111 112 113 114 115 116 117
  &lt;/devices&gt;
&lt;/domain&gt;</pre>

    <h3>Xen paravirtualized guests with hardware acceleration</h3>

    

  </body>
</html>