Skip to content

Instantly share code, notes, and snippets.

@uebayasi
Last active September 5, 2016 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uebayasi/09bae1a8b6dfc3f07476cb1e7ef58b0f to your computer and use it in GitHub Desktop.
Save uebayasi/09bae1a8b6dfc3f07476cb1e7ef58b0f to your computer and use it in GitHub Desktop.
Ubuntu + KVM

Installation

  • Basically follow [1]
  • But virt-manager can't open /dev/kvm
    • Make libvirt-qemu user join kvm group (using vigr)

[1] https://help.ubuntu.com/community/KVM/Installation

Network

  • Create bridge manually
    • Edit /etc/network/interfaces
auto veth0
iface veth0 inet static
 address 192.168.128.1
 netmask 255.255.255.0
 pre-up ip link add veth0 type veth peer name veth0p
 post-down ip link del veth0

auto br0
iface br0 inet static
 address 192.168.128.254
 netmask 255.255.255.0
 bridge_ports veth0p
 bridge_stp on
 bridge_maxwait 0
iface br0 inet6 auto
  • Create a VM (using virt-manager) and joing its interface to the bridge (br0)
    <interface type='bridge'>
      <mac address='52:54:00:36:3e:86'/>
      <source bridge='br0'/>
      <model type='e1000'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment