0

I just install new server with Ubuntu 20.04 (minimal, no GUI). I have 2 ethernet card with 2 IP public. connect each one with each cable. I want to create VM using virt-install which guide I found in here:

https://www.linuxtechi.com/install-kvm-on-ubuntu-20-04-lts-server/

Here is my 00-installer-config.yaml

network:
ethernets: 
    enp3s0:
        dhcp4: no
        addresses: [123.123.123.123/32]
        nameservers:
          addresses: [8.8.8.8,8.8.4.4]
        routes:
        - to: 0.0.0.0/0
          via: 12.12.12.12 
          on-link: true
    enp6s0:
        dhcp4: no
        addresses: [111.111.111.111/32]
        nameservers:
          addresses: [8.8.8.8,8.8.4.4]
        routes:
        - to: 0.0.0.0/0
          via: 11.11.11.11
          on-link: true
version: 2

I want to make the enp3s0 to used by host, and enp6s0 is to be use by my vm.

I try to set like this

network:
ethernets: 
    enp3s0:
        dhcp4: no
        addresses: [103.77.78.198/32]
        nameservers:
          addresses: [8.8.8.8,8.8.4.4]
        routes:
        - to: 0.0.0.0/0
          via: 10.77.78.198 
          on-link: true
         
    enp6s0:
      dhcp4: no      
bridges:
  br0:     
    interfaces: [enp6s0]       
    addresses: [103.77.78.199/32]
    nameservers:
          addresses: [8.8.8.8,8.8.4.4]
    routes:
    - to: 0.0.0.0/0
      via: 10.77.78.199
      on-link: true
version: 2

and I run this

virt-install -n node2 --description "VNODE2" --os-type=generic --ram=16384 --vcpus=4 --disk /dev/sdb --check all=off --network bridge:br0 --graphics none --location http://us.archive.ubuntu.com/ubuntu/dists/focal/main/installer-amd64/ --extra-args='console=tty0 console=ttyS0,115200n8 serial'

It doesn't work. Any Idea how to fix this? Thanks in advance

2
  • Before being able to use it you'd need to create the network br0 as described on netplan.io/examples#configuring-network-bridges - have you done that and is it up from libvirt's POV? IIRC it would be --network br0 for virt-install then (if you have named it that way). Is the br0 up and configured by netplan/systemd-networkd as expected? Also please share the details of the actual failure. – Christian Ehrhardt Jul 27 '20 at 6:33
  • Thanks for your answer, I think I create br0 through this netplan. Is my setting correct? – dsc81 Jul 27 '20 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.