自学内容网 自学内容网

Start LoongArch64 Alpine Linux VM on x86_64

  • 一、Build from source(build on x86_64)
    Obtain the latest libvirt, virt manager, and QEMU source code, compile and install them

1.1 Build libvirt from source

sudo apt-get update
sudo apt-get install augeas-tools bash-completion debhelper-compat dh-apparmor iptables kmod libacl1-dev libapparmor-dev libattr1-dev libaudit-dev libblkid-dev libc6-dev libcap-ng-dev libcurl4-gnutls-dev libdevmapper-dev \
libfuse3-dev libglib2.0-dev libglusterfs-dev libgnutls28-dev libiscsi-dev libnl-3-dev libnl-route-3-dev \
libnuma-dev libparted-dev libpcap0.8-dev libpciaccess-dev librados-dev librbd-dev libreadline-dev \
libsanlock-dev libsasl2-dev libselinux1-dev libssh-dev libssh2-1-dev libtasn1-6-dev libtirpc-dev \
libudev-dev libwireshark-dev libxen-dev libxml2-dev libxml2-utils libyajl-dev lvm2 meson mount \
nfs-common numad open-iscsi po-debconf python3-docutils python3 qemu-system-common qemu-utils xsltproc \
systemtap-sdt-dev 

git clone https://gitlab.com/libvirt/libvirt.git
cd libvirt
meson setup build -Dsystem=true --prefix=/usr -Ddriver_qemu=enabled  -Dlibnl=enabled
ninja -C build
ninja -C build test
ninja -C build install

1.2 Build virt-manager from source

sudo apt-get update
sudo apt-get install debhelper-compat dh-python dh-sequence-python3 gettext python3 python3-distutils python3-docutils python3-setuptools 

git clone https://github.com/virt-manager/virt-manager.git
cd virt-manager
./setup.py configure --default-hvs qemu,xen,lxc
sudo ./setup.py --no-update-icon-cache --no-compile-schemas install

1.3 Build qemu from source

sudo apt-get update
sudo apt-get install clang git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev ninja-build git-email \
                     libaio-dev libbluetooth-dev libcapstone-dev libbrlapi-dev libbz2-dev libcap-ng-dev \
                     libcurl4-gnutls-dev libgtk-3-dev libibverbs-dev libjpeg8-dev libncurses5-dev libnuma-dev \
                     librbd-dev librdmacm-dev libsasl2-dev libsdl2-dev libseccomp-dev libsnappy-dev libssh-dev \
                     libvde-dev libvdeplug-dev libvte-2.91-dev libxen-dev liblzo2-dev valgrind xfslibs-dev \
                     libnfs-dev libiscsi-dev libslirp-dev

git clone https://gitlab.com/qemu/qemu.git
cd qemu
mkdir build & cd build
../configure --enable-slirp --target-list=loongarch64-softmmu --prefix=/usr
make -j8
sudo make install
  • 二、Get LoongArch64 Alpine Linux VM

wget https://dev.alpinelinux.org/~loongarch/edge/releases/loongarch64/alpine-20240709.qcow2

  • 三、Start LoongArch64 Alpine Linux VM

Find the virt-manager icon in the menu bar and open it. Follow the steps below to install and start it.

3.1、New VM->import existing disk image->Architecture (loongarch64)->Forward
在这里插入图片描述

3.2 Browse and choose the qcow2 file storage path
在这里插入图片描述

3.3 Choose Menory and CPU settings
在这里插入图片描述

3.4 Customize configuration before install
在这里插入图片描述

3.5 概况->Firmware(UEFI)->Apply
在这里插入图片描述

3.6 IDE磁盘->Disk bus(VirtIO)->Apply
在这里插入图片描述

3.7 NIC->Device model(virtio)->Apply->Begin Installation
在这里插入图片描述

After about two or three minutes, you will see login information.
default user: root
passwd: alpine


原文地址:https://blog.csdn.net/qq_25650463/article/details/140301551

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!