Ubuntu 24.04
Sponsored Link

KVM : इंस्टॉल करें2024/05/10

 
यह KVM ( Kernel-based Virtual Machine ) + QEMU के साथ वर्चुअलाइजेशन कॉन्फ़िगरेशन है।
इसके लिए आवश्यक है कि आपके कंप्यूटर पर CPU में Intel VT या AMD-V सुविधा हो।
[1] आवश्यक पैकेज स्थापित करें।
root@dlp:~#
apt -y install qemu-kvm libvirt-daemon-system libvirt-daemon virtinst bridge-utils libosinfo-bin
[2] ब्रिज नेटवर्किंग कॉन्फ़िगर करें।
root@dlp:~#
vi /etc/netplan/01-netcfg.yaml
network:
  ethernets:
    enp1s0:
      dhcp4: false
      # ईथरनेट के लिए मौजूदा कॉन्फ़िगरेशन को अक्षम करें
      #addresses: [10.0.0.30/24]
      #routes:
      #  - to: default
      #    via: 10.0.0.1
      #    metric: 100
      #nameservers:
      #  addresses: [10.0.0.10]
      #  search: [srv.world]
      dhcp6: false
  # ब्रिज इंटरफ़ेस के लिए कॉन्फ़िगरेशन जोड़ें
  # [macaddress] ⇒ enp1s0 का HW पता निर्दिष्ट करें
  bridges:
    br0:
      interfaces: [enp1s0]
      dhcp4: false
      addresses: [10.0.0.30/24]
      macaddress: 52:54:00:db:f8:fe
      routes:
        - to: default
          via: 10.0.0.1
          metric: 100
      nameservers:
        addresses: [10.0.0.10]
        search: [srv.world]
      parameters:
        stp: false
      dhcp6: 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:db:f8:fe brd ff:ff:ff:ff:ff:ff
3: enp7s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:54:00:c3:d9:a2 brd ff:ff:ff:ff:ff:ff
4: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 52:54:00:db:f8:fe 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:fedb:f8fe/64 scope link
       valid_lft forever preferred_lft forever
5: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:02:83:d0 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
मिलान सामग्री