Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

A.12. KVM Networking Performance


By default, KVM virtual machines are assigned a virtual Realtek 8139 (rtl8139) NIC (network interface controller).
The rtl8139 virtualized NIC works fine in most environments,but this device can suffer from performance degradation problems on some networks, such as a 10 Gigabit Ethernet.
To improve performance, you can switch to the paravirtualized network driver.

Note

Note that the virtualized Intel PRO/1000 (e1000) driver is also supported as an emulated driver choice. To use the e1000 driver, replace virtio in the procedure below with e1000. For the best performance it is recommended to use the virtio driver.

Procedure A.6. Switching to the virtio driver

  1. Shut down the guest operating system.
  2. Edit the guest's configuration file with the virsh command (where GUEST is the guest's name):
    # virsh edit GUESTvirsh edit GUEST
    Copy to Clipboard Toggle word wrap
    The virsh edit command uses the $EDITOR shell variable to determine which editor to use.
  3. Find the network interface section of the configuration. This section resembles the snippet below:
    <interface type='network'>
      [output truncated]
      <model type='rtl8139' />
    </interface>
    
    Copy to Clipboard Toggle word wrap
  4. Change the type attribute of the model element from 'rtl8139' to 'virtio'. This will change the driver from the rtl8139 driver to the virtio driver.
    <interface type='network'>
      [output truncated]
      <model type='virtio' />
    </interface>
    
    Copy to Clipboard Toggle word wrap
  5. Save the changes and exit the text editor
  6. Restart the guest operating system.
Creating New Guests Using Other Network Drivers

Alternatively, new guests can be created with a different network driver. This may be required if you are having difficulty installing guests over a network connection. This method requires you to have at least one guest already created (possibly installed from CD or DVD) to use as a template.

  1. Create an XML template from an existing guest (in this example, named Guest1):
    # virsh dumpxml Guest1 > /tmp/guest-template.xmlvirsh dumpxml Guest1 > /tmp/guest-template.xmlvirsh dumpxml Guest1 > /tmp/guest-template.xmlvirsh dumpxml Guest1 > /tmp/guest-template.xmlvirsh dumpxml Guest1 > /tmp/guest-template.xml
    Copy to Clipboard Toggle word wrap
  2. Copy and edit the XML file and update the unique fields: virtual machine name, UUID, disk image, MAC address, and any other unique parameters. Note that you can delete the UUID and MAC address lines and virsh will generate a UUID and MAC address.
    # cp /tmp/guest-template.xml /tmp/new-guest.xmlcp /tmp/guest-template.xml /tmp/new-guest.xmlcp /tmp/guest-template.xml /tmp/new-guest.xmlcp /tmp/guest-template.xml /tmp/new-guest.xmlcp /tmp/guest-template.xml /tmp/new-guest.xml
    # vi /tmp/new-guest.xmlvi /tmp/new-guest.xmlvi /tmp/new-guest.xml
    Copy to Clipboard Toggle word wrap
    Add the model line in the network interface section:
     <interface type='network'>
      [output truncated]
      <model type='virtio' />
    </interface>
    
    Copy to Clipboard Toggle word wrap
  3. Create the new virtual machine:
    # virsh define /tmp/new-guest.xml
    # virsh start new-guest
    Copy to Clipboard Toggle word wrap
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat