2019年10月31日 星期四

Proxmox PVE 6.x 安裝後基本設定

v=$(cut -f 3 -d " " /etc/apt/sources.list.d/pve-enterprise.list)

echo "deb http://download.proxmox.com/debian/pve $v pve-no-subscription">/etc/apt/sources.list.d/pve-no-subscription.list
mv /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.bak
apt-get update

apt-get install -y sudo ipmitool
apt-get install -y snmp snmpd libpve-apiclient-perl
apt-get install -y screen iperf busybox wget curl netcat kpartx

echo "options kvm-intel nested=Y" > /etc/modprobe.d/kvm-intel.conf
echo "options kvm-amd nested=1" > /etc/modprobe.d/kvm-amd.conf
modprobe -r kvm_intel;modprobe kvm_intel
modprobe -r kvm_amd;modprobe kvm_amd

echo 'KERNEL=="sd[a-z]*", ENV[DEVTYPE]="disk", SYMLINK+="sata0/$env{ID_PATH_TAG}"'  >/etc/udev/rules.d/99-sata-hdd.rules

Proxmox 5.4 LXC 執行 Docker

proxmox 載入  aufs, overlay module
lxc 設定 features: nesting=1

udev 新增 sata hdd 裝置連結

編輯  /etc/udev/rules/99-sata-hdd.rules  內容如下
KERNEL=="sd[a-z]*", ENV[DEVTYPE]="disk", SYMLINK+="sata0/$env{ID_PATH_TAG}"

2019年10月22日 星期二

Linux bonding 筆記

modprobe bonding miimon=100 mode=0

echo +bond0 >/sys/class/net/bonding_masters
echo +bond1 >/sys/class/net/bonding_masters

echo +eth0 > /sys/class/net/bond0/bonding/slaves
echo -eth0 > /sys/class/net/bond0/bonding/slaves

echo active-backup > /sys/class/net/bond1/bonding/mode
echo 1 >/sys/class/net/bond1/bonding/mode

echo +192.168.0.1
> /sys/class/net/bond1/bonding/arp_ip_target
echo 2000 
> /sys/class/net/bond1/bonding/arp_interval

2019年10月16日 星期三

Proxmox LXC mount loop device

/etc/pve/lxc/id.conf 設定檔中加入

lxc.cgroup.devices.allow = b 7:* rwm lxc.cgroup.devices.allow = c 10:237 rwm lxc.mount.entry = /dev/loop0 dev/loop0 none bind,create=file 0 0 lxc.mount.entry = /dev/loop1 dev/loop1 none bind,create=file 0 0 lxc.mount.entry = /dev/loop2 dev/loop2 none bind,create=file 0 0 lxc.mount.entry = /dev/loop3 dev/loop3 none bind,create=file 0 0 lxc.mount.entry = /dev/loop4 dev/loop4 none bind,create=file 0 0 lxc.mount.entry = /dev/loop5 dev/loop5 none bind,create=file 0 0 lxc.mount.entry = /dev/loop6 dev/loop6 none bind,create=file 0 0 lxc.mount.entry = /dev/loop-control dev/loop-control none bind,create=file 0 0

2019年10月4日 星期五

ipmitool 常用指令

ipmitool -H server-ipmi -U root -P root  chassis bootparam set bootflag force_bios

2019年10月3日 星期四

CISCO 交換器:CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discover.

執行以下指令 ,強制交換器 CDP 協定 version 1
no cdp advertise-v2