KVM host-internal network

From Phormix Wiki
Jump to: navigation, search

One way to create a host-guest only network is to go through a lot trouble with dummy and bridge interfaces

Alternately, you can create a virtual network that works internally between the host and guests (but not the outside world)

First, create an XML file containing your network definition, e.g. /tmp/kvm-isol.xml This will contain the following info

  • The IP address that the host should assume
  • The DHCP range for addresses available to the guests (note: you can use static IP's as well)
  <ip address='' netmask=''>
      <range start='' end='' />
  • Once done, import the XML
virsh net-define kvm-isol.xml
  • You should now be able to start the network and/or set it to autostart
virsh net-start isolated
virsh net-autostart isolated