Ubuntu 26.04

KVM : Install2026/04/29

 

This is the Virtualization Configuration with KVM ( Kernel-based Virtual Machine ) + QEMU.
This requires that the CPU on your computer has a feature Intel VT or AMD-V.

[1] Install required packages.
root@dlp:~#
apt -y install qemu-system libvirt-daemon-system libvirt-daemon virtinst bridge-utils libosinfo-bin
[2] Configure Bridge networking.
root@dlp:~#
vi /etc/netplan/01-netcfg.yaml
network:
  renderer: networkd
  ethernets:
    enp1s0:
      dhcp4: false
      dhcp6: false
      # disable existing configuration for ethernet
      #addresses:
      #- 10.0.0.30/24
      #dhcp6: false
      #match:
      #  macaddress: 52:54:00:75:1c:56
      #nameservers:
      #  addresses:
      #  - 10.0.0.10
      #  search:
      #  - srv.world
      #routes:
      #- to: default
      #  via: 10.0.0.1
      #  metric: 100
      #set-name: enp1s0
  # add configuration for bridge interface
  # [macaddress] ⇒ specify HW address of enp1s0
  bridges:
    br0:
      interfaces: [enp1s0]
      dhcp4: false
      dhcp6: false
      addresses:
      - 10.0.0.30/24
      macaddress: 52:54:00:75:1c:56
      nameservers:
        addresses:
        - 10.0.0.10
        search:
        - srv.world
      routes:
      - to: default
        via: 10.0.0.1
        metric: 100
      parameters:
        stp: false
  version: 2

root@dlp:~#
netplan apply
root@dlp:~#
ip address show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP group default qlen 1000
    link/ether 52:54:00:75:1c:56 brd ff:ff:ff:ff:ff:ff
    altname enx525400751c56
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:21:29:0c brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
4: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 52:54:00:75:1c:56 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.30/24 brd 10.0.0.255 scope global br0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe75:1c56/64 scope link proto kernel_ll
       valid_lft forever preferred_lft forever
Matched Content