https://pnetlab.com/pages/documentation?slug=install-bare-metal
Get Ubuntu 18.04 Cloud Image
Remove netplan & reboot
apt -y purge netplan.io reboot
Config network
- /etc/network/interfaces
- /etc/resolv.conf
Add repo
/etc/apt/sources.list.d/pnetlab.list
deb [trusted=yes] http://repo.pnetlab.com ./
Install PNETLab
apt update apt -y install pnetlab
Install ishare2 Image Manager
https://github.com/ishare2-org/ishare2-cli
wget -O /usr/sbin/ishare2 https://raw.githubusercontent.com/ishare2-org/ishare2-cli/main/ishare2 && chmod +x /usr/sbin/ishare2 && ishare2
Patch
sed -i '/skip_ssl/d' /etc/mysql/mysql.conf.d/mysqld.cnf echo "skip_ssl" >> /etc/mysql/mysql.conf.d/mysqld.cnf sed -i 's/Update-Package-Lists "1"/Update-Package-Lists "0"/g' /etc/apt/apt.conf.d/20auto-upgrades
Check network and configure
# brctl show bridge name bridge id STP enabled interfaces docker0 8000.024251d06cf7 no pnet0 8000.566f4bf80108 no eth0 pnet1 8000.566f4bf80109 no eth1 pnet2 8000.566f4bf8010a no eth2 pnet3 8000.000000000000 no pnet4 8000.000000000000 no pnet5 8000.000000000000 no pnet6 8000.000000000000 no pnet7 8000.000000000000 no pnet8 8000.000000000000 no pnet9 8000.000000000000 no pnet_nat 8000.000000000000 no
/etc/network/interfaces
# The primary network interface iface eth0 inet manual auto pnet0 # For DHCP Network # iface pnet0 inet dhcp # bridge_ports eth0 # bridge_stp off # For Static Network iface pnet0 inet static address 192.168.0.10/24 gateway 192.168.0.1 bridge_ports eth0 bridge_stp off # Cloud devices iface eth1 inet manual auto pnet1 iface pnet1 inet manual bridge_ports eth1 bridge_stp off ... iface eth9 inet manual auto pnet9 iface pnet9 inet manual bridge_ports eth9 bridge_stp off
Reboot
reboot