O'Reilly logo

KVM Virtualization Cookbook by Konstantin Ivanov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

We start by listing all available networks on the host OS in step 1. As we can see from the output of the virsh command, there's only one default network running.

In step 2, we examine the configuration of the default network. The XML definition uses the following attributes:

  • The <network> attribute is the root element, instructing libvirt that we are defining a network.
  • The <name> element specifies the name of the network and needs to be unique.
  • The <uuid> attribute provides a globally unique identifier for the virtual network and if omitted, it will be autogenerated.
  • The <forward> element and its mode attribute define the network as being connected to the host network stack, using NAT. If this element is missing, libvirt ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required