Tag Archives: arm64

ARM64 Kubernetes Nginx Traefik Ingress Load Balance

My original target purpose is very simple, build deploy several webserver and assigned a external ip for internet to access it.

Most kubernetes newbie install guide won’t mention how to do that. actually that’s very simple, for external ip, it needs a load balance controller like metallb for create a external ip address to access web server. and an Ingress contoller like Traefik for http/https route to right pods .

Read more »

Ubuntu 18.04 ARM64 DPDK in VM (QEMU)

DPDK is a very popular infrastructure in high speed packet process domain, some applications will used the same architecture to process packet, like EPC.

For Ubuntu 18.04, it used dpdk 17.11, it not good for some other application like dpdk pktgen, but enough for testpmd and l3fwd test. here is some personal note for setup whole environment.

DPDK in QEMU archeticture
Read more »

Gentoo ARM64 Docker Image

There is a long time no article about gentoo on my blog.

Today, I have a whim to do a gentoo ARM64 docker image, so, we have this article.

Please understand that ARM64 Gentoo is experimental, and might be different after a while.

Read more »

QEMU Run x86_64 on ARM64 Server command

This is a work note for run x86_64 on ARM64 server .
Because they are different archeticture, so, run x86_64 on ARM server would be very slow.

and some functions might be different when run on different platform

Read more »

Kdump in ubuntu 18.04 ARM64

kdump is very good tool to debug complex system like cloud data center, it can easy to save kernel status when crash.
Running kdump in ARM64 just like running in x86, but I met a strange problem on ARM64 platform.

The kernel version is HWE kernel, current version is 4.18.0-25, mihbt be encounter those problems

Read more »

ARM64 Kdump cannot allocate crashkernel

In ARM64 server and installed memory around 128G, ubuntu default /etc/default/grub.d/kdump-tools.cfg default configuration might cause kdump allocate memory failed. error message as below

[ 0.000000] cannot allocate crashkernel (size:0x80000000)
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.18.0-25-generic root=UUID=ee8be10d-d649-425d-a807-640751836186 ro console=tty0 crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M

Read more »

unsupported configuration: CPU mode ‘host-model’ for aarch64 kvm domain on aarch64 host is not supported by hypervisor

應該改 nova.conf
將 [libvirt] 內的
cpu_mode 改成 host-passthrough

應該只有影響 ocata

OpenStack KVM

[ocata] unsupported configuration: CPU mode ‘host-model’ for aarch64 kvm domain on aarch64 host is not supported by hypervisor

aarch64: set default cpu_mode to host-passthrough

No valid host was found. There are not enough hosts available

OpenStack Horization error message
Read more »

MIPS/ARM64 Debian/Ubuntu debootstrap

這個時間點, debian mips 的 debootstrap 只有 jessie 是好的, sid 或是 stretch 都有問題.

$ debootstrap --verbose --foreign --arch mips jessie ./   http://ftp.tw.debian.org/debian

mips64 只有 mips64le , 沒有 mips64 .

其他的還是看這篇文章就好, 也快八年了.
[ARM][Linux] 建立 ARM 平台的 Debian System

懶得再開一篇, 改一改就好了.
如果是裝 ARM64 Ubuntu 呢? mirror 改到 ports.ubuntu.com 去就可以了, 也有 tw.ports.ubuntu.com 但是我記得是指向國外, 記得 arch 和版本號都要改
Ubuntu 16.04 LTS

$ debootstrap --verbose --foreign --arch arm64 xenial ./ubuntu http://tw.ports.ubuntu.com/ubuntu-ports

Ubuntu 18.04 LTS

$ debootstrap --verbose --foreign --arch arm64 bionic./ubuntu http://tw.ports.ubuntu.com/ubuntu-ports

我愛用 NFS 開機, 這是 u-boot NFS 的 example command

setenv bootargs 'console=ttyAMA0,115200n8 earlycon=pl011,0x87e028000000 debug maxcpus=24 rootwait rw ip=dhcp::eth2:off root=/dev/nfs rw nfsroot=,v3 coherent_pool=16M'
setenv start 'setenv ethact vnic2 ; dhcp ;  setenv serverip ;  tftpboot $kernel_addr Image ; booti $kernel_addr - $fdtcontroladdr'
run start

如果是在 target board 上執行, 可以 chroot 到 ubuntu 內, 如果是用 NFS 開機, 可以跳到 run second-stage

cd /ubuntu
mount --bind /proc proc
mount --bind /dev dev
mount --bind /sys sys
cd etc
cp /etc/resolv.conf . 
cd / 
chroot ubuntu bash

執行, 解壓相關的 package (run second-stage)

/debootstrap/debootstrap --second-stage

Ubuntu 16.04 編輯 /etc/apt/source.list 加上

deb http://tw.ports.ubuntu.com/ubuntu-ports xenial main restricted
deb http://tw.ports.ubuntu.com/ubuntu-ports xenial-updates main restricted
deb-src http://tw.ports.ubuntu.com/ubuntu-ports xenial main restricted universe multiverse
deb-src http://tw.ports.ubuntu.com/ubuntu-ports xenial-updates main restricted universe multiverse
deb http://tw.ports.ubuntu.com/ubuntu-ports xenial universe
deb http://tw.ports.ubuntu.com/ubuntu-ports xenial-updates universe
deb http://tw.ports.ubuntu.com/ubuntu-ports xenial multiverse
deb http://tw.ports.ubuntu.com/ubuntu-ports xenial-updates multiverse

如果是 18.04

deb http://tw.ports.ubuntu.com/ubuntu-ports bionic main restricted
deb http://tw.ports.ubuntu.com/ubuntu-ports bionic-updates main restricted
deb-src http://tw.ports.ubuntu.com/ubuntu-ports bionic main restricted universe
deb-src http://tw.ports.ubuntu.com/ubuntu-ports bionic-updates main restricted u
niverse multiverse
deb http://tw.ports.ubuntu.com/ubuntu-ports bionic universe
deb http://tw.ports.ubuntu.com/ubuntu-ports bionic-updates universe
deb http://tw.ports.ubuntu.com/ubuntu-ports bionic multiverse
deb http://tw.ports.ubuntu.com/ubuntu-ports bionic-updates multiverse


$ apt update
$ apt -y upgrade

安裝必要的程式 (註:註 net-tools 過時了, 可以我還是習慣舊指令)

$ apt install -y vim openssh-server tmux btrfs-tools net-tools sudo wget resolvconf-admin

Add User

$ adduser [username]

順便改 root 的密碼

$ passwd root

加上無密碼 請參考這個連結

註: 18.04 可能要先設定密碼之後重開機一次才能, 更新系統環境變數, 安裝套件以便之後的設定

註2: 18.04 如果時間差太多會 update 失敗, 要先調整時間到今天
先裝 nfs-common 增加 nfs access 的速度

$ apt install -y nfs-common

備用, 17.04 後似乎都會用 resolvconf 當 DNS service, 但是不知道為什麼不會取用 DHCP 得到的 DNS

$ systemctl disable systemd-resolved.service
$ service systemd-resolved stop
$ echo "nameserver" > /etc/resolv.conf


編輯 /etc/hostname
取一個合適的名字, 預設是用執行 debootstrap 的主機名稱

編輯 /etc/network/interface

如果有 cache server, 加到 /etc/apt/apt.conf

最後要產生 utf-8 的 locale 檔案

$ sudo locale-gen en_US.UTF-8

aarch64/ARM64 virt-install 啟動方法

雖然 ubuntu 有好用的 uvttool-libvirt 可以管理 cloud image , 但是似乎在 aarch64/ARM64 的平台上會有問題,
參數傳進去的時候似乎都會叫起來 VGA (cirrus), 但是 QEMU aarch64 上不支援 VGA (至少我用的不支援)
替代方案就是用 Virt Manager
Read more »