Install OS on ESXi Arm

 Install OS on ESXi Arm

1.ติดตั้ง Ubuntu Server Arm

1.1 download ไฟล์ติดตั้งจาก https://ubuntu.com/download/server/arm

1.2 สร้าง VM ใหม่ เลือก boot จากไฟล์ ISO แล้วติดตั้งตามปกติ


2.ติดตั้ง RaspiOS Arm

2.1 download ไฟล์ image จาก https://downloads.raspberrypi.org/raspios_arm64/images/

2.2 แตกไฟล์แล้วแปลงเป็น VMDK

sudo apt install qemu-utils

qemu-img convert -f raw 2020-05-27-raspios-buster-arm64.img -O vmdk 2020-05-27-raspios-buster-arm64.vmdk

2.3 upload ไฟล์ไปไว้ที่ ESXi host แล้ว SSH เข้าไปแปลง disk แบบ thin อีกที (ต้อง start service SSH ก่อน)


cd /vmfs/volumes/datastore1

vmkfstools -i 2020-05-27-raspios-buster-arm64.vmdk -d thin raspios-buster-arm64.vmdk

2.4 สร้าง VM ใหม่ โดยใช้ disk จากไฟล์ VMDK ที่สร้างขึ้น แต่จะยัง boot ไม่ได้

2.5 download ไฟล์ ISO ของ Debian 10.x Arm Network Installer ISO จาก https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/ เพื่อมาติดตั้ง grub โดยตั้งค่าให้ boot จากไฟล์ ISO นี้

2.6 เมื่อ boot เข้า grub menu ให้เลือก Advanced options > Rescue Mode แล้ว setup ต่อไป จนถึงขั้นตอนเลือก root file system ให้เลือก /dev/sda2 ซึ่งก็คือไฟล์ VMDK ของเรา แล้วเลือก Execute a shell in /dev/sda2

2.7 ติดตั้ง GRUB แล้ว exit

apt update

apt install -y linux-image-arm64 grub-efi-arm64

grub-install --efi-directory=/boot

update-grub

2.8 Shutdown เพื่อเข้าไปขยายขนาด Disk จาก menu Edit VM ใน ESXi แล้วสั่งให้ os ใช้ disk เต็มพื้นที่

sudo raspi-config --expand-rootfs


Option : ติดตั้ง VMware Tools

sudo su -
apt update

git clone https://github.com/vmware/open-vm-tools.git
cd open-vm-tools/open-vm-tools/

apt install -y automake libtool libmspack-dev libglib2.0-dev libpam0g-dev libssl-dev libxml2-dev libxmlsec1-dev libx11-dev libxext-dev libxinerama-dev libxi-dev libxrender-dev libxrandr-dev libxtst-dev libgtk2.0-dev

autoreconf -i
./configure --without-x
make
make install
ldconfig

cat > /etc/systemd/system/vmtoolsd.service << EOF
[Unit]
Description=
Description=Open VM Tools
After=
After=network-online.target
[Service]
ExecStart=
ExecStart=/usr/local/bin/vmtoolsd
Restart=always
RestartSec=1sec
[Install]
WantedBy=multi-user.target
EOF

systemctl enable vmtoolsd.service
systemctl start vmtoolsd.service

Comments

Popular posts from this blog

Artillery Hornet + OctoPrint + Klipper

ย้ายบ้าน

ใต้ร่มกาสาวพัตร