DEV Community

ChungWei Wei
ChungWei Wei

Posted on • Originally published at kmp.tw on

[Linux] Ubuntu 22.04 Install KVM And Setting Bridge

Before Install

Update, Check CPU

apt update

egrep -c '(vmx|svm)' /proc/cpuinfo
Enter fullscreen mode Exit fullscreen mode

Install Package

apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients bridge-utils
Enter fullscreen mode Exit fullscreen mode

Add Network Bridge

cd /etc/netplan
vim 01-netcfg.yaml
Enter fullscreen mode Exit fullscreen mode

01-netcfg.yaml

network:
  ethernets:
    <nic_name>:
      dhcp4: false
      dhcp6: false
  # add configuration for bridge interface
  bridges:
    br0:
      interfaces: [<nic_name>]
      dhcp4: false
      addresses: [<server_ip_and_slash>]
      macaddress: <mac_address>
      routes:
        - to: default
          via: <gw_ip>
          metric: 100
      nameservers:
        addresses: [<dns_server_ip>]
      parameters:
        stp: false
      dhcp6: false
  version: 2
Enter fullscreen mode Exit fullscreen mode

Apply Conf

netplan apply
Enter fullscreen mode Exit fullscreen mode

Verify

ip a
Enter fullscreen mode Exit fullscreen mode

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more