warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/ on line 33.

LXD: Create container with profile (connect to VLAN)

create profile
lxc profile copy default mgmt-dev
# lxc profile list
lxc profile device set mgmt-dev eth0 nictype macvlan
lxc profile device set mgmt-dev eth0 parent mgmt-dev-v4432
lxc profile show mgmt-dev

create container with profile
lxc launch ubuntu:18.04 bionic-mgmt-dev -p mgmt-dev
lxc ls

Enable container nesting
lxc config set bionic-mgmt-dev security.nesting true

Configure IP
cat < /var/lib/lxd/containers/bionic-mgmt-dev/rootfs/etc/netplan/50-cloud-init.yaml
version: 2

Ubuntu: Instlal lldpd (Link Layer Discovery Protocol)

sudo apt install -y lldpd

# optional: enable Cisco CDP protocol
cat < /etc/default/lldpd
service lldpd restart

# get info

Identify switch port to which the server is connected

# Show LLDP neighbors
networkctl lldp


for NIC in $(find /sys/class/net -type l -not -lname "*virtual*" -printf "%f\n" | sort); do
echo "NIC: ${NIC}"
echo "NIC MAC: $(ethtool -P ${NIC})"
timeout 300 tcpdump -nn -v -i ${NIC} -s 1500 -c 1 "ether[20:2] == 0x2000"

Flash LibreELEC to S905X

wget -P /tmp/
gzip -d /tmp/LibreELEC-S905.arm-8.2- -C /tmp
dd if=/tmp//tmp/LibreELEC.USB-SD.Creator.Linux-64bit.bin of=/dev/mmcblk0

1. remove power connector from the box
2. insert sd card to to the box
3. press button inside aux connector and connect power to the box
4. enable ssh service on the box
5. ssh root@your_box_ip (pass: libreelec)
6. installtointernal


kexec (reboot without hardware initialization)

echo "kexec-tools kexec-tools/load_kexec select false" | sudo debconf-set-selections
sudo apt install -y kexec-tools
sudo kexec -l /boot/vmlinuz-4.15.0-32-generic --initrd=/boot/initrd.img-4.15.0-32-generic --reuse-cmdline
sudo kexec -e
systemctl kexec

ironic / bifrost

# load env
. /opt/stack/bifrost/env-vars

# list nodes
ironic node-list

# remove / shutdown existing node
ironic node-set-provision-state deleted

# load node configuration
export BIFROST_INVENTORY_SOURCE=/opt/openstack-prepare-baremetal/bifrost/json/

# add new node
ansible-playbook -i inventory/ enroll-dynamic.yaml
ironic node-update add properties/capabilities='boot_mode:uefi'

# deploy
ansible-playbook -v -i inventory/ deploy-dynamic.yaml

# show node details

Configure proxy

export http_proxy=
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy
export no_proxy="localhost,,localaddress,"

cat <> /etc/environment
export http_proxy="http://${PROXY_USER}:${PROXY_PASS}@"
export https_proxy="http://${PROXY_USER}:${PROXY_PASS}@"
export no_proxy="localhost,,"

cat < /etc/apt/apt.conf.d/12proxy
Acquire::http::Proxy "http://${PROXY_USER}:${PROXY_PASS}@";

Syndicate content