当前位置:   article > 正文

Run LoongArch64 Alpine VM on x86_64

Run LoongArch64 Alpine 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
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15

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
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 二、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 Overview->Firmware(UEFI)->Apply
在这里插入图片描述

3.6 IDE Disk->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
default passwd: alpine

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/喵喵爱编程/article/detail/820669?site
推荐阅读
相关标签
  

闽ICP备14008679号